super-page-runtime 2.3.17 → 2.3.18-tmp2

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 (499) hide show
  1. package/dist/es/components/runtime/utils/page-init-util.d.ts +2 -1
  2. package/dist/es/components/runtime/utils/page-init-util.js +84 -65
  3. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +3 -3
  4. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +3 -3
  5. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -3
  6. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +1 -1
  7. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +3 -3
  8. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +1 -1
  9. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +17 -17
  10. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +1 -1
  11. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +1 -1
  12. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +1 -1
  13. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +1 -1
  14. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +1 -1
  15. package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
  16. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +3 -3
  17. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +3 -3
  18. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +3 -3
  19. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +3 -3
  20. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +3 -3
  21. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +1 -1
  22. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +3 -3
  23. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +1 -1
  24. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +27 -27
  25. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +3 -3
  26. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +3 -3
  27. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +3 -3
  28. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +3 -3
  29. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +3 -3
  30. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -3
  31. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +3 -3
  32. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +3 -3
  33. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +5 -5
  34. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +3 -3
  35. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +3 -3
  36. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +3 -3
  37. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +1 -1
  38. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +4 -4
  39. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +1 -1
  40. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -3
  41. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +11 -11
  42. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +3 -3
  43. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +3 -3
  44. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +1 -1
  45. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +6 -6
  46. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +1 -1
  47. package/dist/es/components/runtime/views/super-page.vue.d.ts +11 -2
  48. package/dist/es/components/runtime/views/super-page.vue.js +1 -1
  49. package/dist/es/components/runtime/views/super-page.vue2.js +136 -128
  50. package/dist/es/style.css +76 -76
  51. package/dist/lib/_virtual/AttributeMap.js +4 -0
  52. package/dist/lib/_virtual/Barcode.js +4 -0
  53. package/dist/lib/_virtual/CODE128.js +4 -0
  54. package/dist/lib/_virtual/CODE128A.js +4 -0
  55. package/dist/lib/_virtual/CODE128B.js +4 -0
  56. package/dist/lib/_virtual/CODE128C.js +4 -0
  57. package/dist/lib/_virtual/CODE128_AUTO.js +4 -0
  58. package/dist/lib/_virtual/CODE93.js +4 -0
  59. package/dist/lib/_virtual/CODE93FullASCII.js +4 -0
  60. package/dist/lib/_virtual/Delta.js +4 -0
  61. package/dist/lib/_virtual/EAN.js +4 -0
  62. package/dist/lib/_virtual/EAN13.js +4 -0
  63. package/dist/lib/_virtual/EAN2.js +4 -0
  64. package/dist/lib/_virtual/EAN5.js +4 -0
  65. package/dist/lib/_virtual/EAN8.js +4 -0
  66. package/dist/lib/_virtual/ErrorHandler.js +4 -0
  67. package/dist/lib/_virtual/ITF.js +4 -0
  68. package/dist/lib/_virtual/ITF14.js +4 -0
  69. package/dist/lib/_virtual/JsBarcode.js +6 -0
  70. package/dist/lib/_virtual/MSI.js +4 -0
  71. package/dist/lib/_virtual/MSI10.js +4 -0
  72. package/dist/lib/_virtual/MSI1010.js +4 -0
  73. package/dist/lib/_virtual/MSI11.js +4 -0
  74. package/dist/lib/_virtual/MSI1110.js +4 -0
  75. package/dist/lib/_virtual/Op.js +4 -0
  76. package/dist/lib/_virtual/OpIterator.js +4 -0
  77. package/dist/lib/_virtual/OverloadYield.js +4 -0
  78. package/dist/lib/_virtual/SVGPathData.js +4 -0
  79. package/dist/lib/_virtual/SVGPathData2.js +5 -0
  80. package/dist/lib/_virtual/UPC.js +4 -0
  81. package/dist/lib/_virtual/UPCE.js +4 -0
  82. package/dist/lib/_virtual/_commonjsHelpers.js +33 -0
  83. package/dist/lib/_virtual/_plugin-vue_export-helper.js +9 -0
  84. package/dist/lib/_virtual/alignment-pattern.js +4 -0
  85. package/dist/lib/_virtual/arrayLikeToArray.js +4 -0
  86. package/dist/lib/_virtual/arrayWithHoles.js +4 -0
  87. package/dist/lib/_virtual/arrayWithoutHoles.js +4 -0
  88. package/dist/lib/_virtual/assertThisInitialized.js +4 -0
  89. package/dist/lib/_virtual/asyncToGenerator.js +4 -0
  90. package/dist/lib/_virtual/asyncToGenerator2.js +6 -0
  91. package/dist/lib/_virtual/auto.js +4 -0
  92. package/dist/lib/_virtual/backo2.js +4 -0
  93. package/dist/lib/_virtual/base64-arraybuffer.js +4 -0
  94. package/dist/lib/_virtual/binary.js +4 -0
  95. package/dist/lib/_virtual/browser.js +4 -0
  96. package/dist/lib/_virtual/browser2.js +4 -0
  97. package/dist/lib/_virtual/canvas.js +4 -0
  98. package/dist/lib/_virtual/canvas2.js +4 -0
  99. package/dist/lib/_virtual/checksums.js +4 -0
  100. package/dist/lib/_virtual/classCallCheck.js +4 -0
  101. package/dist/lib/_virtual/clipboard.js +4 -0
  102. package/dist/lib/_virtual/commons.js +4 -0
  103. package/dist/lib/_virtual/constants.js +4 -0
  104. package/dist/lib/_virtual/constants2.js +4 -0
  105. package/dist/lib/_virtual/constants3.js +4 -0
  106. package/dist/lib/_virtual/constants4.js +4 -0
  107. package/dist/lib/_virtual/createClass.js +4 -0
  108. package/dist/lib/_virtual/dayjs.min.js +4 -0
  109. package/dist/lib/_virtual/decodePacket.browser.js +4 -0
  110. package/dist/lib/_virtual/defaults.js +4 -0
  111. package/dist/lib/_virtual/defineProperty.js +4 -0
  112. package/dist/lib/_virtual/defineProperty2.js +6 -0
  113. package/dist/lib/_virtual/dijkstra.js +4 -0
  114. package/dist/lib/_virtual/encodePacket.browser.js +4 -0
  115. package/dist/lib/_virtual/encoder.js +4 -0
  116. package/dist/lib/_virtual/error-correction-code.js +4 -0
  117. package/dist/lib/_virtual/error-correction-level.js +4 -0
  118. package/dist/lib/_virtual/es.array.concat.js +4 -0
  119. package/dist/lib/_virtual/es.array.every.js +4 -0
  120. package/dist/lib/_virtual/es.array.fill.js +4 -0
  121. package/dist/lib/_virtual/es.array.for-each.js +4 -0
  122. package/dist/lib/_virtual/es.array.from.js +4 -0
  123. package/dist/lib/_virtual/es.array.includes.js +4 -0
  124. package/dist/lib/_virtual/es.array.index-of.js +4 -0
  125. package/dist/lib/_virtual/es.array.index-of2.js +3 -0
  126. package/dist/lib/_virtual/es.array.iterator.js +3 -0
  127. package/dist/lib/_virtual/es.array.join.js +4 -0
  128. package/dist/lib/_virtual/es.array.map.js +4 -0
  129. package/dist/lib/_virtual/es.array.reduce.js +4 -0
  130. package/dist/lib/_virtual/es.array.reduce2.js +3 -0
  131. package/dist/lib/_virtual/es.array.reverse.js +4 -0
  132. package/dist/lib/_virtual/es.array.reverse2.js +3 -0
  133. package/dist/lib/_virtual/es.array.some.js +4 -0
  134. package/dist/lib/_virtual/es.function.name.js +4 -0
  135. package/dist/lib/_virtual/es.map.constructor.js +4 -0
  136. package/dist/lib/_virtual/es.map.js +4 -0
  137. package/dist/lib/_virtual/es.number.constructor.js +4 -0
  138. package/dist/lib/_virtual/es.object.to-string.js +4 -0
  139. package/dist/lib/_virtual/es.parse-float.js +4 -0
  140. package/dist/lib/_virtual/es.promise.all.js +4 -0
  141. package/dist/lib/_virtual/es.promise.catch.js +4 -0
  142. package/dist/lib/_virtual/es.promise.constructor.js +4 -0
  143. package/dist/lib/_virtual/es.promise.js +4 -0
  144. package/dist/lib/_virtual/es.promise.race.js +4 -0
  145. package/dist/lib/_virtual/es.promise.reject.js +4 -0
  146. package/dist/lib/_virtual/es.promise.resolve.js +4 -0
  147. package/dist/lib/_virtual/es.promise2.js +3 -0
  148. package/dist/lib/_virtual/es.reflect.apply.js +4 -0
  149. package/dist/lib/_virtual/es.reflect.delete-property.js +4 -0
  150. package/dist/lib/_virtual/es.reflect.get-prototype-of.js +4 -0
  151. package/dist/lib/_virtual/es.regexp.exec.js +4 -0
  152. package/dist/lib/_virtual/es.regexp.to-string.js +4 -0
  153. package/dist/lib/_virtual/es.regexp.to-string2.js +3 -0
  154. package/dist/lib/_virtual/es.string.ends-with.js +4 -0
  155. package/dist/lib/_virtual/es.string.ends-with2.js +3 -0
  156. package/dist/lib/_virtual/es.string.includes.js +4 -0
  157. package/dist/lib/_virtual/es.string.includes2.js +3 -0
  158. package/dist/lib/_virtual/es.string.iterator.js +4 -0
  159. package/dist/lib/_virtual/es.string.match.js +4 -0
  160. package/dist/lib/_virtual/es.string.match2.js +3 -0
  161. package/dist/lib/_virtual/es.string.replace.js +4 -0
  162. package/dist/lib/_virtual/es.string.replace2.js +3 -0
  163. package/dist/lib/_virtual/es.string.split.js +4 -0
  164. package/dist/lib/_virtual/es.string.split2.js +3 -0
  165. package/dist/lib/_virtual/es.string.starts-with.js +4 -0
  166. package/dist/lib/_virtual/es.string.starts-with2.js +3 -0
  167. package/dist/lib/_virtual/es.string.trim.js +4 -0
  168. package/dist/lib/_virtual/es.string.trim2.js +3 -0
  169. package/dist/lib/_virtual/exceptions.js +4 -0
  170. package/dist/lib/_virtual/finder-pattern.js +4 -0
  171. package/dist/lib/_virtual/fixOptions.js +4 -0
  172. package/dist/lib/_virtual/format-info.js +4 -0
  173. package/dist/lib/_virtual/galois-field.js +4 -0
  174. package/dist/lib/_virtual/get.js +4 -0
  175. package/dist/lib/_virtual/getOptionsFromElement.js +4 -0
  176. package/dist/lib/_virtual/getPrototypeOf.js +4 -0
  177. package/dist/lib/_virtual/getRenderProperties.js +4 -0
  178. package/dist/lib/_virtual/globals.js +4 -0
  179. package/dist/lib/_virtual/has-cors.js +4 -0
  180. package/dist/lib/_virtual/html2canvas.js +4 -0
  181. package/dist/lib/_virtual/index.js +4 -0
  182. package/dist/lib/_virtual/index10.js +4 -0
  183. package/dist/lib/_virtual/index11.js +4 -0
  184. package/dist/lib/_virtual/index12.js +4 -0
  185. package/dist/lib/_virtual/index13.js +4 -0
  186. package/dist/lib/_virtual/index14.js +4 -0
  187. package/dist/lib/_virtual/index15.js +4 -0
  188. package/dist/lib/_virtual/index16.js +4 -0
  189. package/dist/lib/_virtual/index17.js +4 -0
  190. package/dist/lib/_virtual/index18.js +4 -0
  191. package/dist/lib/_virtual/index19.js +4 -0
  192. package/dist/lib/_virtual/index2.js +4 -0
  193. package/dist/lib/_virtual/index20.js +4 -0
  194. package/dist/lib/_virtual/index21.js +4 -0
  195. package/dist/lib/_virtual/index22.js +4 -0
  196. package/dist/lib/_virtual/index23.js +4 -0
  197. package/dist/lib/_virtual/index24.js +4 -0
  198. package/dist/lib/_virtual/index3.js +4 -0
  199. package/dist/lib/_virtual/index4.js +5 -0
  200. package/dist/lib/_virtual/index5.js +4 -0
  201. package/dist/lib/_virtual/index6.js +4 -0
  202. package/dist/lib/_virtual/index7.js +4 -0
  203. package/dist/lib/_virtual/index8.js +6 -0
  204. package/dist/lib/_virtual/index9.js +6 -0
  205. package/dist/lib/_virtual/inherits.js +4 -0
  206. package/dist/lib/_virtual/internal-metadata.js +4 -0
  207. package/dist/lib/_virtual/is-binary.js +4 -0
  208. package/dist/lib/_virtual/iterableToArray.js +4 -0
  209. package/dist/lib/_virtual/iterableToArrayLimit.js +4 -0
  210. package/dist/lib/_virtual/jquery.js +4 -0
  211. package/dist/lib/_virtual/jspdf.es.min.js +5 -0
  212. package/dist/lib/_virtual/linearizeEncodings.js +4 -0
  213. package/dist/lib/_virtual/make-built-in.js +4 -0
  214. package/dist/lib/_virtual/manager.js +4 -0
  215. package/dist/lib/_virtual/mask-pattern.js +4 -0
  216. package/dist/lib/_virtual/merge.js +4 -0
  217. package/dist/lib/_virtual/mode.js +4 -0
  218. package/dist/lib/_virtual/new-promise-capability.js +4 -0
  219. package/dist/lib/_virtual/nonIterableRest.js +4 -0
  220. package/dist/lib/_virtual/nonIterableSpread.js +4 -0
  221. package/dist/lib/_virtual/object-define-properties.js +4 -0
  222. package/dist/lib/_virtual/object-define-property.js +4 -0
  223. package/dist/lib/_virtual/object-get-own-property-descriptor.js +4 -0
  224. package/dist/lib/_virtual/object-get-own-property-names-external.js +4 -0
  225. package/dist/lib/_virtual/object-get-own-property-names.js +4 -0
  226. package/dist/lib/_virtual/object-get-own-property-symbols.js +4 -0
  227. package/dist/lib/_virtual/object-property-is-enumerable.js +4 -0
  228. package/dist/lib/_virtual/object.js +4 -0
  229. package/dist/lib/_virtual/on.js +4 -0
  230. package/dist/lib/_virtual/optionsFromStrings.js +4 -0
  231. package/dist/lib/_virtual/parseqs.js +4 -0
  232. package/dist/lib/_virtual/parseuri.js +4 -0
  233. package/dist/lib/_virtual/performance-now.js +4 -0
  234. package/dist/lib/_virtual/polling-fetch.js +4 -0
  235. package/dist/lib/_virtual/polling-xhr.js +4 -0
  236. package/dist/lib/_virtual/polling.js +4 -0
  237. package/dist/lib/_virtual/polynomial.js +4 -0
  238. package/dist/lib/_virtual/possibleConstructorReturn.js +4 -0
  239. package/dist/lib/_virtual/qrcode.js +4 -0
  240. package/dist/lib/_virtual/regenerator.js +4 -0
  241. package/dist/lib/_virtual/regeneratorAsync.js +4 -0
  242. package/dist/lib/_virtual/regeneratorAsyncGen.js +4 -0
  243. package/dist/lib/_virtual/regeneratorAsyncIterator.js +4 -0
  244. package/dist/lib/_virtual/regeneratorDefine.js +4 -0
  245. package/dist/lib/_virtual/regeneratorKeys.js +4 -0
  246. package/dist/lib/_virtual/regeneratorRuntime.js +4 -0
  247. package/dist/lib/_virtual/regeneratorValues.js +4 -0
  248. package/dist/lib/_virtual/regex.js +4 -0
  249. package/dist/lib/_virtual/segments.js +4 -0
  250. package/dist/lib/_virtual/setPrototypeOf.js +4 -0
  251. package/dist/lib/_virtual/shared-store.js +4 -0
  252. package/dist/lib/_virtual/shared.js +4 -0
  253. package/dist/lib/_virtual/slicedToArray.js +4 -0
  254. package/dist/lib/_virtual/socket.js +4 -0
  255. package/dist/lib/_virtual/socket2.js +4 -0
  256. package/dist/lib/_virtual/stackblur-es.js +5 -0
  257. package/dist/lib/_virtual/superPropBase.js +4 -0
  258. package/dist/lib/_virtual/svg-tag.js +4 -0
  259. package/dist/lib/_virtual/svg.js +4 -0
  260. package/dist/lib/_virtual/toConsumableArray.js +4 -0
  261. package/dist/lib/_virtual/toPrimitive.js +4 -0
  262. package/dist/lib/_virtual/toPropertyKey.js +4 -0
  263. package/dist/lib/_virtual/transport.js +4 -0
  264. package/dist/lib/_virtual/typeof.js +4 -0
  265. package/dist/lib/_virtual/unsupportedIterableToArray.js +4 -0
  266. package/dist/lib/_virtual/url.js +4 -0
  267. package/dist/lib/_virtual/util.js +4 -0
  268. package/dist/lib/_virtual/utils.js +4 -0
  269. package/dist/lib/_virtual/utils2.js +4 -0
  270. package/dist/lib/_virtual/version-check.js +4 -0
  271. package/dist/lib/_virtual/version.js +4 -0
  272. package/dist/lib/_virtual/vue-plugin-hiprint.js +4 -0
  273. package/dist/lib/_virtual/web.dom-collections.for-each.js +4 -0
  274. package/dist/lib/_virtual/web.dom-collections.iterator.js +4 -0
  275. package/dist/lib/_virtual/web.dom-collections.iterator2.js +3 -0
  276. package/dist/lib/_virtual/websocket.js +4 -0
  277. package/dist/lib/_virtual/webtransport.js +4 -0
  278. package/dist/lib/assets/chart-themes/theme1.d.ts +4 -0
  279. package/dist/lib/assets/chart-themes/theme1.js +7 -0
  280. package/dist/lib/assets/chart-themes/theme2.d.ts +4 -0
  281. package/dist/lib/assets/chart-themes/theme2.js +7 -0
  282. package/dist/lib/assets/chart-themes/theme3.d.ts +4 -0
  283. package/dist/lib/assets/chart-themes/theme3.js +7 -0
  284. package/dist/lib/assets/file.png.js +3 -0
  285. package/dist/lib/assets/folder.png.js +3 -0
  286. package/dist/lib/components/runtime/index.d.ts +5 -0
  287. package/dist/lib/components/runtime/utils/ai-chat-util.js +38 -0
  288. package/dist/lib/components/runtime/utils/api/api-util.d.ts +1 -0
  289. package/dist/lib/components/runtime/utils/api/api-util.js +9 -0
  290. package/dist/lib/components/runtime/utils/api/page-expose-util.d.ts +1 -0
  291. package/dist/lib/components/runtime/utils/api/page-expose-util.js +494 -0
  292. package/dist/lib/components/runtime/utils/assemblys-config.js +384 -0
  293. package/dist/lib/components/runtime/utils/barcode-util.d.ts +8 -0
  294. package/dist/lib/components/runtime/utils/barcode-util.js +36 -0
  295. package/dist/lib/components/runtime/utils/charts/chart-columnline-util.js +327 -0
  296. package/dist/lib/components/runtime/utils/charts/chart-gauge-util.js +77 -0
  297. package/dist/lib/components/runtime/utils/charts/chart-pie-util.js +162 -0
  298. package/dist/lib/components/runtime/utils/charts/chart-radar-util.js +130 -0
  299. package/dist/lib/components/runtime/utils/charts/chart-scatter-util.js +106 -0
  300. package/dist/lib/components/runtime/utils/charts/chart-util.d.ts +113 -0
  301. package/dist/lib/components/runtime/utils/charts/chart-util.js +550 -0
  302. package/dist/lib/components/runtime/utils/common-util.d.ts +33 -0
  303. package/dist/lib/components/runtime/utils/common-util.js +219 -0
  304. package/dist/lib/components/runtime/utils/eventBus.d.ts +7 -0
  305. package/dist/lib/components/runtime/utils/eventBus.js +9 -0
  306. package/dist/lib/components/runtime/utils/events/event-util.d.ts +92 -0
  307. package/dist/lib/components/runtime/utils/events/event-util.js +752 -0
  308. package/dist/lib/components/runtime/utils/events/print-label.d.ts +5 -0
  309. package/dist/lib/components/runtime/utils/events/print-label.js +174 -0
  310. package/dist/lib/components/runtime/utils/events/standard-event.d.ts +96 -0
  311. package/dist/lib/components/runtime/utils/events/standard-event.js +2837 -0
  312. package/dist/lib/components/runtime/utils/events/validator-util.d.ts +25 -0
  313. package/dist/lib/components/runtime/utils/events/validator-util.js +730 -0
  314. package/dist/lib/components/runtime/utils/form/date-shortcuts.d.ts +7 -0
  315. package/dist/lib/components/runtime/utils/form/date-shortcuts.js +96 -0
  316. package/dist/lib/components/runtime/utils/form/scan-util.js +194 -0
  317. package/dist/lib/components/runtime/utils/global-refs.d.ts +65 -0
  318. package/dist/lib/components/runtime/utils/global-refs.js +88 -0
  319. package/dist/lib/components/runtime/utils/i18n-util.d.ts +1 -0
  320. package/dist/lib/components/runtime/utils/i18n-util.js +23 -0
  321. package/dist/lib/components/runtime/utils/interfaces/page-design-types.d.ts +247 -0
  322. package/dist/lib/components/runtime/utils/interfaces/page-design-types.js +9 -0
  323. package/dist/lib/components/runtime/utils/page-helper-util.d.ts +174 -0
  324. package/dist/lib/components/runtime/utils/page-helper-util.js +767 -0
  325. package/dist/lib/components/runtime/utils/page-init-util.d.ts +48 -0
  326. package/dist/lib/components/runtime/utils/page-init-util.js +502 -0
  327. package/dist/lib/components/runtime/utils/page-permission-util.d.ts +26 -0
  328. package/dist/lib/components/runtime/utils/page-permission-util.js +717 -0
  329. package/dist/lib/components/runtime/utils/page-store.d.ts +46 -0
  330. package/dist/lib/components/runtime/utils/page-store.js +71 -0
  331. package/dist/lib/components/runtime/utils/store-util.d.ts +15 -0
  332. package/dist/lib/components/runtime/utils/store-util.js +17 -0
  333. package/dist/lib/components/runtime/utils/store.d.ts +2 -0
  334. package/dist/lib/components/runtime/utils/store.js +3 -0
  335. package/dist/lib/components/runtime/utils/table-utils.d.ts +34 -0
  336. package/dist/lib/components/runtime/utils/table-utils.js +126 -0
  337. package/dist/lib/components/runtime/utils/tree-utils.js +121 -0
  338. package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue.js +3 -0
  339. package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +118 -0
  340. package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +6 -0
  341. package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +55 -0
  342. package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +3 -0
  343. package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +135 -0
  344. package/dist/lib/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +3 -0
  345. package/dist/lib/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +19 -0
  346. package/dist/lib/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +3 -0
  347. package/dist/lib/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +110 -0
  348. package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +6 -0
  349. package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +213 -0
  350. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +43 -0
  351. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +3 -0
  352. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +61 -0
  353. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +3 -0
  354. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +208 -0
  355. package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +3 -0
  356. package/dist/lib/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +6 -0
  357. package/dist/lib/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +179 -0
  358. package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +6 -0
  359. package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +121 -0
  360. package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +6 -0
  361. package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +171 -0
  362. package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +6 -0
  363. package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +122 -0
  364. package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +6 -0
  365. package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +132 -0
  366. package/dist/lib/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +121 -0
  367. package/dist/lib/components/runtime/views/assemblys/chart/table/chart-table-util.js +786 -0
  368. package/dist/lib/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +43 -0
  369. package/dist/lib/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +3 -0
  370. package/dist/lib/components/runtime/views/assemblys/chart/table/group-column.vue.js +63 -0
  371. package/dist/lib/components/runtime/views/assemblys/chart/table/group-column.vue2.js +3 -0
  372. package/dist/lib/components/runtime/views/assemblys/chart/table/normal-column.vue.js +169 -0
  373. package/dist/lib/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +3 -0
  374. package/dist/lib/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +63 -0
  375. package/dist/lib/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +3 -0
  376. package/dist/lib/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +3 -0
  377. package/dist/lib/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +631 -0
  378. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +28 -0
  379. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +163 -0
  380. package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +3 -0
  381. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +35 -0
  382. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +90 -0
  383. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +3 -0
  384. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-table.vue.d.ts +26 -0
  385. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-table.vue.js +76 -0
  386. package/dist/lib/components/runtime/views/assemblys/common/remove-signer-table.vue2.js +3 -0
  387. package/dist/lib/components/runtime/views/assemblys/common/remove-transactor-dialog.vue.d.ts +35 -0
  388. package/dist/lib/components/runtime/views/assemblys/common/remove-transactor-dialog.vue.js +114 -0
  389. package/dist/lib/components/runtime/views/assemblys/common/remove-transactor-dialog.vue2.js +3 -0
  390. package/dist/lib/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.d.ts +31 -0
  391. package/dist/lib/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +181 -0
  392. package/dist/lib/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue2.js +3 -0
  393. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +26 -0
  394. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +122 -0
  395. package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +3 -0
  396. package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue.js +6 -0
  397. package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +106 -0
  398. package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +3 -0
  399. package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +85 -0
  400. package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue.js +3 -0
  401. package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +89 -0
  402. package/dist/lib/components/runtime/views/assemblys/container/fixed/FixedBox.vue.js +6 -0
  403. package/dist/lib/components/runtime/views/assemblys/container/fixed/FixedBox.vue2.js +99 -0
  404. package/dist/lib/components/runtime/views/assemblys/container/fixed/YxAffix.vue.d.ts +94 -0
  405. package/dist/lib/components/runtime/views/assemblys/container/fixed/YxAffix.vue.js +6 -0
  406. package/dist/lib/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +224 -0
  407. package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +3 -0
  408. package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +82 -0
  409. package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue.js +3 -0
  410. package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +69 -0
  411. package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +3 -0
  412. package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +40 -0
  413. package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +6 -0
  414. package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +272 -0
  415. package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +6 -0
  416. package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +144 -0
  417. package/dist/lib/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +3 -0
  418. package/dist/lib/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +184 -0
  419. package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +943 -0
  420. package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +3 -0
  421. package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +718 -0
  422. package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +3 -0
  423. package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue.js +3 -0
  424. package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +187 -0
  425. package/dist/lib/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +6 -0
  426. package/dist/lib/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +531 -0
  427. package/dist/lib/components/runtime/views/assemblys/error-render.vue.d.ts +22 -0
  428. package/dist/lib/components/runtime/views/assemblys/error-render.vue.js +22 -0
  429. package/dist/lib/components/runtime/views/assemblys/error-render.vue2.js +3 -0
  430. package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +3 -0
  431. package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +163 -0
  432. package/dist/lib/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +101 -0
  433. package/dist/lib/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +3 -0
  434. package/dist/lib/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +3 -0
  435. package/dist/lib/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +212 -0
  436. package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +3 -0
  437. package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +290 -0
  438. package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +3 -0
  439. package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +176 -0
  440. package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +3 -0
  441. package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +61 -0
  442. package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +3 -0
  443. package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +225 -0
  444. package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +3 -0
  445. package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +116 -0
  446. package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +3 -0
  447. package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +310 -0
  448. package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue.js +3 -0
  449. package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +176 -0
  450. package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue.js +3 -0
  451. package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +109 -0
  452. package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +6 -0
  453. package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +52 -0
  454. package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +3 -0
  455. package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +208 -0
  456. package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +6 -0
  457. package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +287 -0
  458. package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue.js +3 -0
  459. package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +364 -0
  460. package/dist/lib/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +3 -0
  461. package/dist/lib/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +54 -0
  462. package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +3 -0
  463. package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +168 -0
  464. package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +3 -0
  465. package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +132 -0
  466. package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +3 -0
  467. package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +116 -0
  468. package/dist/lib/components/runtime/views/assemblys/home-chart-render.vue.d.ts +17 -0
  469. package/dist/lib/components/runtime/views/assemblys/home-chart-render.vue.js +169 -0
  470. package/dist/lib/components/runtime/views/assemblys/home-chart-render.vue2.js +3 -0
  471. package/dist/lib/components/runtime/views/assemblys/object-render.vue.d.ts +17 -0
  472. package/dist/lib/components/runtime/views/assemblys/object-render.vue.js +265 -0
  473. package/dist/lib/components/runtime/views/assemblys/object-render.vue2.js +3 -0
  474. package/dist/lib/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue.js +6 -0
  475. package/dist/lib/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +209 -0
  476. package/dist/lib/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +3 -0
  477. package/dist/lib/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +47 -0
  478. package/dist/lib/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +3 -0
  479. package/dist/lib/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +50 -0
  480. package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +6 -0
  481. package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +64 -0
  482. package/dist/lib/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +3 -0
  483. package/dist/lib/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +58 -0
  484. package/dist/lib/components/runtime/views/home-chart.vue.d.ts +23 -0
  485. package/dist/lib/components/runtime/views/home-chart.vue.js +168 -0
  486. package/dist/lib/components/runtime/views/home-chart.vue2.js +3 -0
  487. package/dist/lib/components/runtime/views/super-page-dialog.vue.d.ts +40 -0
  488. package/dist/lib/components/runtime/views/super-page-dialog.vue.js +154 -0
  489. package/dist/lib/components/runtime/views/super-page-dialog.vue3.js +4 -0
  490. package/dist/lib/components/runtime/views/super-page.vue.d.ts +126 -0
  491. package/dist/lib/components/runtime/views/super-page.vue.js +6 -0
  492. package/dist/lib/components/runtime/views/super-page.vue2.js +856 -0
  493. package/dist/lib/favicon.ico +0 -0
  494. package/dist/lib/i18n/langs/cn.js +78 -0
  495. package/dist/lib/i18n/langs/en.js +78 -0
  496. package/dist/lib/index.d.ts +16 -0
  497. package/dist/lib/index.js +30 -0
  498. package/dist/lib/style.css +1169 -0
  499. package/package.json +2 -2
@@ -0,0 +1,2837 @@
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.1.58_@vue_29e6d749740d5c0a82211de8e577b320/node_modules/agilebuilder-ui/src/utils/request.js");
5
+ const util = require("../../../../node_modules/.pnpm/agilebuilder-ui@1.1.58_@vue_29e6d749740d5c0a82211de8e577b320/node_modules/agilebuilder-ui/src/utils/util.js");
6
+ const auth = require("../../../../node_modules/.pnpm/agilebuilder-ui@1.1.58_@vue_29e6d749740d5c0a82211de8e577b320/node_modules/agilebuilder-ui/src/utils/auth.js");
7
+ const globalRefs = require("../global-refs.js");
8
+ const eventBus = require("../eventBus.js");
9
+ require("../../../../node_modules/.pnpm/axios@1.11.0_debug@4.4.1/node_modules/axios/index.js");
10
+ const eventUtil = require("./event-util.js");
11
+ const storeUtil = require("../store-util.js");
12
+ const pageInitUtil = require("../page-init-util.js");
13
+ const pageHelperUtil = require("../page-helper-util.js");
14
+ const printLabel$1 = require("./print-label.js");
15
+ const tableUtils = require("../table-utils.js");
16
+ const validatorUtil = require("./validator-util.js");
17
+ const pageExposeUtil = require("../api/page-expose-util.js");
18
+ const pageStore = require("../page-store.js");
19
+ const index = require("../../../../node_modules/.pnpm/element-plus@2.10.5_vue@3.5.18_typescript@5.4.5_/node_modules/element-plus/es/components/message/index.js");
20
+ const axios = require("../../../../node_modules/.pnpm/axios@1.11.0_debug@4.4.1/node_modules/axios/lib/axios.js");
21
+ const index$1 = require("../../../../node_modules/.pnpm/element-plus@2.10.5_vue@3.5.18_typescript@5.4.5_/node_modules/element-plus/es/components/message-box/index.js");
22
+ const standardEvents = {
23
+ // 表单标准事件保存save
24
+ save: function(params) {
25
+ console.log("表单标准事件保存save--params=", params);
26
+ return saveFunc(params, false);
27
+ },
28
+ // 列表标准事件保存saveList
29
+ saveList: function(params) {
30
+ console.log("列表标准事件保存saveList--params=", params);
31
+ return saveFunc(params, true);
32
+ },
33
+ // 表单标准事件导出报告exportForm
34
+ exportForm: function(params) {
35
+ console.log("表单标准事件导出报告exportForm--params=", params);
36
+ const pageContext = params.pageContext;
37
+ const pagCode = pageContext.code;
38
+ const eventPageInfo = pagCode + "_";
39
+ eventBus.$emit(eventPageInfo + "export-form-report", params);
40
+ },
41
+ // 表单标准事件导出报告exportPDF
42
+ exportPDF: function(params) {
43
+ console.log("表单标准事件导出报告exportPDF--params=", params);
44
+ const pageContext = params.pageContext;
45
+ const pagCode = pageContext.code;
46
+ const eventPageInfo = pagCode + "_";
47
+ eventBus.$emit(eventPageInfo + "export-pdf-report", params);
48
+ },
49
+ // 表单标准事件提交submit
50
+ submit: function(params) {
51
+ console.log("表单标准事件提交submit--params=", params);
52
+ return submitForm(params, false, "submit", "/dsc/commons/submits");
53
+ },
54
+ // 列表标准事件提交submitList
55
+ submitList: function(params) {
56
+ console.log("列表标准事件提交submitList--params=", params);
57
+ return submitForm(params, true, "submit", "/dsc/commons/batch-submits");
58
+ },
59
+ // 表单标准事件同意agree
60
+ agree: function(params) {
61
+ console.log("表单标准事件同意agree--params=", params);
62
+ return submitForm(params, false, "agree", "/dsc/commons/approves");
63
+ },
64
+ // 列表标准事件同意agreeList
65
+ agreeList: function(params) {
66
+ console.log("列表标准事件同意agreeList--params=", params);
67
+ return submitForm(params, true, "agree", "/dsc/commons/batch-approves");
68
+ },
69
+ // 表单标准事件不同意disagree
70
+ disagree: function(params) {
71
+ console.log("表单标准事件不同意disagree--params=", params);
72
+ return submitForm(params, false, "disagree", "/dsc/commons/refuses");
73
+ },
74
+ // 列表标准事件不同意disagreeList
75
+ disagreeList: function(params) {
76
+ console.log("列表标准事件不同意disagreeList--params=", params);
77
+ return submitForm(params, true, "disagree", "/dsc/commons/batch-refuses");
78
+ },
79
+ // TODO: 待页面跳转功能完善后再实现
80
+ back: function(params) {
81
+ console.log("表单标准事件返回back--params=", params);
82
+ const pageContext = params.pageContext;
83
+ const dataModel = pageContext.entity ? pageContext.entity.data : {};
84
+ const isNeedValueMapping = params.configureObj.props && params.configureObj.props.base ? params.configureObj.props.base.isNeedValueMapping : false;
85
+ closeDialog(pageContext, params.configureObj, dataModel, isNeedValueMapping);
86
+ },
87
+ // 列表标准事件删除delete
88
+ delete: function(params) {
89
+ console.log("列表标准事件删除delete--params=", params);
90
+ return deleteFunc(params);
91
+ },
92
+ // 列表标准事件下载导入模板downloadTemplate
93
+ downloadTemplate: function(params) {
94
+ console.log("列表标准事件下载导入模板downloadTemplate--params=", params);
95
+ downloadTemplateFunc(params);
96
+ },
97
+ // 列表标准事件 导入import
98
+ import: function(params) {
99
+ console.log("列表标准事件 导入import--params=", params);
100
+ const pageContext = params.pageContext;
101
+ const pagCode = pageContext.code;
102
+ const eventPageInfo = pagCode + "_";
103
+ eventBus.$emit(eventPageInfo + "import-file", params);
104
+ },
105
+ // 列表标准事件 导出export
106
+ export: function(params) {
107
+ console.log("列表标准事件 导出export--params=", params);
108
+ return exportFunc(params);
109
+ },
110
+ // 列表标准事件 查询search
111
+ search: function(params) {
112
+ console.log("列表标准事件 刷新列表 search--params=", params);
113
+ const pageContext = params.pageContext;
114
+ const tableUuid = params.tableUuid;
115
+ const gridRef = globalRefs.getComponentRef(pageContext, tableUuid);
116
+ gridRef.refresh();
117
+ },
118
+ showSearch: function(params) {
119
+ console.log("列表标准事件 显示查询区域 showSearch--params=", params);
120
+ const pageContext = params.pageContext;
121
+ const tableUuid = params.tableUuid;
122
+ const gridRef = globalRefs.getComponentRef(pageContext, tableUuid);
123
+ gridRef.showMobileSearch();
124
+ },
125
+ // 流程表单标准事件 暂存workflowSave
126
+ workflowSave: function(params) {
127
+ eventBus.$emit("clearTableAllStartEditing");
128
+ console.log("流程表单标准事件 暂存workflowSave--params=", params);
129
+ return workflowSaveFunc(params);
130
+ },
131
+ // 流程表单标准事件 起草workflowStart
132
+ workflowStart: function(params) {
133
+ eventBus.$emit("clearTableAllStartEditing");
134
+ console.log("流程表单标准事件 起草workflowStart--params=", params);
135
+ return workflowStartFunc(params);
136
+ },
137
+ // 流程表单标准事件 提交流程submitProcess
138
+ submitProcess: function(params) {
139
+ eventBus.$emit("clearTableAllStartEditing");
140
+ console.log("流程表单标准事件 提交流程submitProcess--params=", params);
141
+ return submitProcessFunc(params);
142
+ },
143
+ // 流程表单标准事件 提交任务submitTask
144
+ submitTask: function(params) {
145
+ console.log("流程表单标准事件 提交任务submitTask--params=", params);
146
+ return completeTaskFunc(params, "SUBMIT");
147
+ },
148
+ // 流程表单标准事件 同意approve
149
+ approve: function(params) {
150
+ console.log("流程表单标准事件 同意approve--params=", params);
151
+ return completeTaskFunc(params, "APPROVE");
152
+ },
153
+ // 流程表单标准事件 不同意refuse
154
+ refuse: function(params) {
155
+ console.log("流程表单标准事件 不同意refuse--params=", params);
156
+ return completeTaskFunc(params, "REFUSE");
157
+ },
158
+ // 流程表单标准事件 已阅readed
159
+ readed: function(params) {
160
+ console.log("流程表单标准事件 已阅readed--params=", params);
161
+ return completeTaskFunc(params, "READED");
162
+ },
163
+ // 流程表单标准事件 赞成agreemen
164
+ agreement: function(params) {
165
+ console.log("流程表单标准事件 赞成agreement--params=", params);
166
+ return completeTaskFunc(params, "AGREEMENT");
167
+ },
168
+ // 流程表单标准事件 反对oppose
169
+ oppose: function(params) {
170
+ console.log("流程表单标准事件 反对oppose--params=", params);
171
+ return completeTaskFunc(params, "OPPOSE");
172
+ },
173
+ // 流程表单标准事件 弃权kiken
174
+ kiken: function(params) {
175
+ console.log("流程表单标准事件 弃权kiken--params=", params);
176
+ return completeTaskFunc(params, "KIKEN");
177
+ },
178
+ // 流程表单标准事件 指派assign
179
+ assign: function(params) {
180
+ console.log("流程表单标准事件 指派assign--params=", params);
181
+ return assignTask(params);
182
+ },
183
+ // 流程表单标准事件 抄送copyTask
184
+ copyTask: function(params) {
185
+ console.log("流程表单标准事件 抄送copyTask--params=", params);
186
+ return createCopyTask(params);
187
+ },
188
+ // 流程表单标准事件 加签addSigner
189
+ addSigner: function(params) {
190
+ console.log("流程表单标准事件 加签addSigner--params=", params);
191
+ return addSignerFunc(params);
192
+ },
193
+ // 流程表单标准事件 领取drawTask
194
+ drawTask: function(params) {
195
+ console.log("流程表单标准事件 领取drawTask--params=", params);
196
+ return drawTaskFunc(params);
197
+ },
198
+ // 放弃领取abandonReceive
199
+ abandonReceive: function(params) {
200
+ console.log("流程表单标准事件 放弃领取abandonReceive--params=", params);
201
+ return abandonReceiveFunc(params);
202
+ },
203
+ // 流程表单标准事件 驳回returnToPreviousTask
204
+ returnToPreviousTask: function(params) {
205
+ console.log("流程表单标准事件 驳回returnToPreviousTask--params=", params);
206
+ return returnToPreviousTaskFunc(params);
207
+ },
208
+ // 流程表单标准事件 强制结束endInstance
209
+ endInstance: function(params) {
210
+ console.log("流程表单标准事件 强制结束endInstance--params=", params);
211
+ return endInstanceFunc(params);
212
+ },
213
+ // 流程表单标准事件 退回returnTaskTo
214
+ returnTaskTo: function(params) {
215
+ console.log("流程表单标准事件 退回returnTaskTo--params=", params);
216
+ return returnTaskToFunc(params);
217
+ },
218
+ // 流程表单标准事件 减签removeSigner
219
+ removeSigner: function(params) {
220
+ console.log("流程表单标准事件 减签removeSigner--params=", params);
221
+ return removeSignerfunc(params);
222
+ },
223
+ // 流程表单标准事件 取回retrieveTask
224
+ retrieveTask: function(params) {
225
+ console.log("流程表单标准事件 取回retrieveTask--params=", params);
226
+ return retrieveTaskFunc(params);
227
+ },
228
+ // 流程表单标准事件 extractWorkflow 发起抽单
229
+ extractWorkflow: function(params) {
230
+ console.log("流程表单标准事件 extractWorkflow--params=", params);
231
+ return extractWorkflowFunc(params);
232
+ },
233
+ // 流程表单标准事件 cancelExtractWorkflow 取消抽单
234
+ cancelExtractWorkflow: function(params) {
235
+ console.log("流程表单标准事件 extractWorkflow--params=", params);
236
+ return cancelExtractWorkflowFunc(params);
237
+ },
238
+ // 流程表单标准事件 approveExtractWorkflow 同意抽单
239
+ approveExtractWorkflow: function(params) {
240
+ console.log("流程表单标准事件 extractWorkflow--params=", params);
241
+ return approveExtractWorkflowFunc(params);
242
+ },
243
+ // 流程表单标准事件 refuseExtractWorkflow 不同意抽单
244
+ refuseExtractWorkflow: function(params) {
245
+ console.log("流程表单标准事件 extractWorkflow--params=", params);
246
+ return refuseExtractWorkflowFunc(params);
247
+ },
248
+ viewDetail: function(params) {
249
+ },
250
+ lineEditCreate: function(params) {
251
+ console.log("列表行编辑 新建lineEditCreate--params=", params);
252
+ return lineEditCreateFunc(params);
253
+ },
254
+ printLabel: function(params) {
255
+ console.log("打印标签 打印标签事件--params=", params);
256
+ return printLabel(params);
257
+ },
258
+ queryCharts: function(params) {
259
+ console.log("查询统计图--params=", params);
260
+ queryPageCharts(params);
261
+ },
262
+ resetCharts: function(params) {
263
+ var _a, _b;
264
+ console.log("重置统计图--params=", params);
265
+ const pageContext = params.pageContext;
266
+ Object.assign(pageContext.entity.data, commonUtil.deepCopy((_a = pageContext.initChartData) == null ? void 0 : _a.data));
267
+ Object.assign(pageContext.entity.page, commonUtil.deepCopy((_b = pageContext.initChartData) == null ? void 0 : _b.page));
268
+ params.isInitChart = true;
269
+ queryPageCharts(params);
270
+ },
271
+ exportCharts: function(params) {
272
+ console.log("导出统计图--params=", params);
273
+ exportPageCharts(params);
274
+ },
275
+ saveQueryCharts: function(params) {
276
+ console.log("保存统计图条件--params=", params);
277
+ saveChartQuery(params);
278
+ },
279
+ // 流程表单标准事件 增加办理人addTransactor
280
+ addTransactor: function(params) {
281
+ console.log("流程表单标准事件 增加办理人addTransactor--params=", params);
282
+ return addTransactorFunc(params);
283
+ },
284
+ // 流程表单标准事件 减少办理人removeTransactor
285
+ removeTransactor: function(params) {
286
+ console.log("流程表单标准事件 减少办理人removeTransactor--params=", params);
287
+ return removeTransactorFunc(params);
288
+ }
289
+ };
290
+ function queryPageCharts(params) {
291
+ const pageContext = params.pageContext;
292
+ const chartConfigs = pageContext.initChartServiceConfigs;
293
+ if (!chartConfigs || chartConfigs.length == 0) {
294
+ console.log("无需要查询的统计图数据");
295
+ return;
296
+ }
297
+ const configure = params.configureObj;
298
+ let runtimeProps = null;
299
+ if (configure && configure.runtime) {
300
+ runtimeProps = configure.runtime.props;
301
+ }
302
+ const hisState = runtimeProps ? runtimeProps.state : void 0;
303
+ if (runtimeProps) {
304
+ runtimeProps.state = "disabled";
305
+ }
306
+ pageHelperUtil.updateChartDatasources(pageContext, chartConfigs, void 0, params.isInitChart).then(() => {
307
+ if (runtimeProps) {
308
+ runtimeProps.state = hisState;
309
+ }
310
+ }).catch(() => {
311
+ if (runtimeProps) {
312
+ runtimeProps.state = hisState;
313
+ }
314
+ });
315
+ }
316
+ function saveChartQuery(params) {
317
+ const pageContext = params.pageContext;
318
+ const configure = params.configureObj;
319
+ const myPageCode = pageContext.code;
320
+ const eventPageInfo = myPageCode + "_";
321
+ eventBus.$emit(eventPageInfo + "save-chart-condition", {
322
+ pageContext,
323
+ configureObj: configure
324
+ });
325
+ }
326
+ function exportPageCharts(params) {
327
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
328
+ const pageContext = params.pageContext;
329
+ const allChartUuids = pageContext.allChartUuids;
330
+ if (!allChartUuids || allChartUuids.length == 0) {
331
+ console.log("无需要导出的统计图数据");
332
+ return;
333
+ }
334
+ const configure = params.configureObj;
335
+ let runtimeProps = null;
336
+ if (configure && configure.runtime) {
337
+ runtimeProps = configure.runtime.props;
338
+ }
339
+ const hisState = runtimeProps ? runtimeProps.state : void 0;
340
+ if (runtimeProps) {
341
+ runtimeProps.state = "disabled";
342
+ }
343
+ const exportChartList = [];
344
+ for (let i = 0; i < allChartUuids.length; i++) {
345
+ const chartUuid = allChartUuids[i];
346
+ const componentObj = globalRefs.getComponentRef(pageContext, chartUuid);
347
+ if (componentObj) {
348
+ const chartConfig = componentObj.getConfigure();
349
+ if (chartConfig && chartConfig.exportable && chartConfig._dynamicShowFlag && componentObj.exportChart) {
350
+ exportChartList.push(componentObj.exportChart());
351
+ }
352
+ }
353
+ }
354
+ if (!exportChartList || exportChartList.length == 0) {
355
+ console.log("无需要导出的统计图数据");
356
+ return;
357
+ }
358
+ let exportFileName;
359
+ let pageName = pageContext.label;
360
+ if (!pageName) {
361
+ pageName = pageContext.code;
362
+ }
363
+ exportFileName = pageName;
364
+ const param = {
365
+ reportDataList: exportChartList,
366
+ beanName: pageContext.beanName
367
+ };
368
+ const additionalParamMap = getAdditionalParamMap(pageContext);
369
+ param["additionalParamMap"] = additionalParamMap;
370
+ param["isShowWatermark"] = ((_b = (_a = configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) === void 0 ? "true" : ((_d = (_c = configure.props) == null ? void 0 : _c.watermark) == null ? void 0 : _d.isShowWatermark) + "";
371
+ param["watermark"] = ((_f = (_e = configure.props) == null ? void 0 : _e.watermark) == null ? void 0 : _f.content) && ((_h = (_g = configure.props) == null ? void 0 : _g.watermark) == null ? void 0 : _h.content.length) > 0 ? (_j = (_i = configure.props) == null ? void 0 : _i.watermark) == null ? void 0 : _j.content.join("-~") : "";
372
+ const backendUrl = pageContext.backendUrl;
373
+ const baseUrl = commonUtil.getBaseUrl(backendUrl, pageContext.isTest);
374
+ const path = baseUrl + "/dsc/commons/exportChart";
375
+ setAxiosHeader();
376
+ const request2 = axios.post(path, param, { responseType: "blob" });
377
+ request2.then((res) => {
378
+ const link = document.createElement("a");
379
+ link.style.display = "none";
380
+ link.href = URL.createObjectURL(res.data);
381
+ link.setAttribute("download", exportFileName + ".xlsx");
382
+ document.body.appendChild(link);
383
+ link.click();
384
+ document.body.removeChild(link);
385
+ }).finally(() => {
386
+ if (runtimeProps) {
387
+ runtimeProps.state = hisState;
388
+ }
389
+ });
390
+ }
391
+ function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
392
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
393
+ pageContext.clickUuid = configureObj.uuid;
394
+ pageContext.canClick = false;
395
+ const templateUUID = templateFile.templateUuid;
396
+ const fileName = templateFile.templateName;
397
+ const systemCode = pageContext.systemCode;
398
+ const logSetting = (_a = configureObj.props.base) == null ? void 0 : _a.logSetting;
399
+ const isWorkflowForm = commonUtil.isWorkflowPage(pageContext);
400
+ const beanName = pageContext.beanName;
401
+ const button = configureObj.props.base;
402
+ const tableName = configureObj.tableName ? configureObj.tableName : pageContext.tableName;
403
+ const backendUrl = pageContext.backendUrl;
404
+ const viewModels = pageExposeUtil.functions.getFormViewData(pageContext);
405
+ console.log("exportFormReport----viewModels=", viewModels);
406
+ const isPermission = button.isPermission === void 0 || button.isPermission === "true" || button.isPermission;
407
+ const functionCodes = pageInitUtil.getPermissionCodes(configureObj, pageContext);
408
+ const param = {
409
+ entity: viewModels,
410
+ fileName: templateUUID,
411
+ // uuid
412
+ showName: fileName,
413
+ // 下载的文件名称
414
+ beanName,
415
+ isWorkflowForm,
416
+ // 是否是流程表单
417
+ functionCode: functionCodes,
418
+ tableName,
419
+ isPermission: isPermission + "",
420
+ systemCode,
421
+ listCodesMap: pageContext.listCodesMap,
422
+ pageCode: pageContext.code,
423
+ pageVersion: pageContext.version,
424
+ listCodesInitSearchForm: pageContext.listCodesInitSearchForm
425
+ };
426
+ if (logSetting) {
427
+ param["logSettingText"] = logSetting.join("");
428
+ }
429
+ const additionalParamMap = getAdditionalParamMap(pageContext);
430
+ param["additionalParamMap"] = additionalParamMap;
431
+ param["isShowWatermark"] = ((_c = (_b = configureObj.props) == null ? void 0 : _b.watermark) == null ? void 0 : _c.isShowWatermark) === void 0 ? "true" : ((_e = (_d = configureObj.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.isShowWatermark) + "";
432
+ param["watermark"] = ((_g = (_f = configureObj.props) == null ? void 0 : _f.watermark) == null ? void 0 : _g.content) && ((_i = (_h = configureObj.props) == null ? void 0 : _h.watermark) == null ? void 0 : _i.content.length) > 0 ? (_k = (_j = configureObj.props) == null ? void 0 : _j.watermark) == null ? void 0 : _k.content.join("-~") : "";
433
+ let exportResult;
434
+ if (isPdf) {
435
+ exportResult = exportFormPdf(fileName, backendUrl, param, pageContext.isTest);
436
+ } else {
437
+ exportResult = exportFormReportSuccess(fileName, backendUrl, param, pageContext.isTest);
438
+ }
439
+ if (exportResult) {
440
+ exportResult.then(() => {
441
+ eventUtil.doAfterClickEvent(pageContext, configureObj);
442
+ }).catch((error) => {
443
+ });
444
+ }
445
+ }
446
+ function exportFormReportSuccess(fileName, backendUrl, param, isTest) {
447
+ return new Promise((resolve, reject) => {
448
+ const baseUrl = commonUtil.getBaseUrl(backendUrl, isTest);
449
+ const path = baseUrl + "/dsc/commons/export-reports";
450
+ setAxiosHeader();
451
+ const request2 = axios.post(path, param, {
452
+ // headers: {
453
+ // 'content-type': 'application/x-www-form-urlencoded'
454
+ // },
455
+ responseType: "blob"
456
+ });
457
+ request2.then((response) => {
458
+ const blob = new Blob([response.data]);
459
+ let fileNameTwo = "报告.xlsx";
460
+ if (fileName) {
461
+ fileNameTwo = fileName;
462
+ }
463
+ const elink = document.createElement("a");
464
+ elink.download = fileNameTwo;
465
+ elink.style.display = "none";
466
+ elink.target = "_blank";
467
+ elink.href = URL.createObjectURL(blob);
468
+ document.body.appendChild(elink);
469
+ elink.click();
470
+ URL.revokeObjectURL(elink.href);
471
+ document.body.removeChild(elink);
472
+ resolve(true);
473
+ }).catch((error) => {
474
+ reject(error);
475
+ });
476
+ });
477
+ }
478
+ function setAxiosHeader() {
479
+ axios.defaults.headers.common.Authorization = auth.getToken();
480
+ const currentRole = auth.getRunCurrentRole();
481
+ if (currentRole) {
482
+ const runCurrentRoleKey = "_RUN_CURRENT_ROLE";
483
+ axios.defaults.headers.common[runCurrentRoleKey] = currentRole;
484
+ }
485
+ }
486
+ function exportFormPdf(fileName, backendUrl, param, isTest) {
487
+ return new Promise((resolve, reject) => {
488
+ const baseUrl = commonUtil.getBaseUrl(backendUrl, isTest);
489
+ const path = baseUrl + "/dsc/commons/export-pdf";
490
+ setAxiosHeader();
491
+ const request2 = axios.post(path, param, {
492
+ headers: {
493
+ "content-type": "application/json"
494
+ },
495
+ responseType: "blob"
496
+ });
497
+ window.$message.info("正在导出中...");
498
+ request2.then((response) => {
499
+ const blob = new Blob([response.data]);
500
+ const elink = document.createElement("a");
501
+ elink.download = fileName.substring(0, fileName.lastIndexOf(".")) + ".pdf";
502
+ elink.style.display = "none";
503
+ elink.target = "_blank";
504
+ elink.href = URL.createObjectURL(blob);
505
+ document.body.appendChild(elink);
506
+ elink.click();
507
+ URL.revokeObjectURL(elink.href);
508
+ document.body.removeChild(elink);
509
+ resolve(true);
510
+ }).catch((error) => {
511
+ reject(error);
512
+ });
513
+ });
514
+ }
515
+ function saveFunc(params, isListButton) {
516
+ return new Promise((resolve, reject) => {
517
+ const pageContext = params.pageContext;
518
+ const configureObj = params.configureObj;
519
+ const mainDefaultValueColumns = params.mainDefaultValueColumns;
520
+ const dynamicColumnInfo = params.dynamicColumnInfo;
521
+ const successOperation = configureObj.props.base.successOperation;
522
+ let isUnControlVersion = false;
523
+ if (successOperation && successOperation === "noOperation") {
524
+ isUnControlVersion = true;
525
+ }
526
+ const request2 = getSaveFormRequest(
527
+ pageContext,
528
+ configureObj,
529
+ "/dsc/commons",
530
+ isUnControlVersion,
531
+ mainDefaultValueColumns,
532
+ dynamicColumnInfo
533
+ );
534
+ if (request2) {
535
+ request2.then((data) => {
536
+ dealAfterOperate(pageContext, configureObj, data, "superPageRuntimeMessage.successfulSave", isListButton);
537
+ resolve(data);
538
+ }).catch((error) => {
539
+ reject(error);
540
+ });
541
+ } else {
542
+ reject("保存时request不存在");
543
+ }
544
+ });
545
+ }
546
+ function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, ids2, row) {
547
+ var _a;
548
+ const isWorkflow = commonUtil.isWorkflowPage(pageContext);
549
+ const systemCode = pageContext.systemCode;
550
+ const isPermission = configureObj.props.base.isPermission === void 0 || configureObj.props.base.isPermission === "true" || configureObj.props.base.isPermission;
551
+ const functionCodes = pageInitUtil.getPermissionCodes(configureObj, pageContext);
552
+ let entity = row;
553
+ if (!entity) {
554
+ entity = pageContext.entity.data;
555
+ }
556
+ const param = {
557
+ entity,
558
+ tableName: pageContext.tableName,
559
+ formNoRuleCode: pageContext.formNoRuleCode,
560
+ isWorkflowEntity: isWorkflow,
561
+ functionCode: functionCodes,
562
+ isPermission: isPermission + "",
563
+ listCodesMap: pageContext.listCodesMap,
564
+ pageCode: pageContext.code,
565
+ pageVersion: pageContext.version,
566
+ listCodesInitSearchForm: pageContext.listCodesInitSearchForm
567
+ };
568
+ if (ids2) {
569
+ param["ids"] = ids2;
570
+ }
571
+ if (pageContext.judgeHeavyList) {
572
+ if (commonUtil.isArrayFn(pageContext.judgeHeavyList)) {
573
+ param["judgeHeavyList"] = JSON.stringify(pageContext.judgeHeavyList);
574
+ } else {
575
+ param["judgeHeavyList"] = pageContext.judgeHeavyList;
576
+ }
577
+ }
578
+ const conversionCodes = configureObj.props.base.conversionCodes;
579
+ if (conversionCodes) {
580
+ if (commonUtil.isArrayFn(conversionCodes)) {
581
+ param["dataConversionRule"] = conversionCodes.join(",");
582
+ } else if (typeof conversionCodes === "string") {
583
+ param["dataConversionRule"] = conversionCodes;
584
+ }
585
+ }
586
+ console.log("getCommonFormRequestParam--------configureObj----", configureObj);
587
+ const autoSetValueData = getButtonAutoSetValueData(configureObj);
588
+ if (autoSetValueData) {
589
+ param["autoSetValueData"] = autoSetValueData;
590
+ }
591
+ const logSetting = (_a = configureObj.props.base) == null ? void 0 : _a.logSetting;
592
+ if (logSetting) {
593
+ param["logSettingText"] = logSetting.join("");
594
+ }
595
+ if (!param["systemCode"]) {
596
+ param["systemCode"] = systemCode;
597
+ }
598
+ const beanName = pageContext.beanName;
599
+ if (beanName) {
600
+ param["beanName"] = beanName;
601
+ }
602
+ if (dynamicColumnInfo) {
603
+ param["dynamicColumnInfo"] = dynamicColumnInfo;
604
+ }
605
+ if (mainDefaultValueColumns) {
606
+ param["mainDefaultValueColumns"] = mainDefaultValueColumns;
607
+ }
608
+ const additionalParamMap = getAdditionalParamMap(pageContext);
609
+ param["additionalParamMap"] = additionalParamMap;
610
+ if (isUnControlVersion !== void 0) {
611
+ param["unControlVersion"] = isUnControlVersion;
612
+ }
613
+ return param;
614
+ }
615
+ function getSaveFormRequestWithRow(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, row, otherParams) {
616
+ const systemCode = pageContext.systemCode;
617
+ const backendUrl = pageContext.backendUrl;
618
+ const param = getCommonFormRequestParam(
619
+ pageContext,
620
+ configureObj,
621
+ isUnControlVersion,
622
+ mainDefaultValueColumns,
623
+ dynamicColumnInfo,
624
+ null,
625
+ row
626
+ );
627
+ if (otherParams) {
628
+ if (otherParams.tableName) {
629
+ param.tableName = otherParams.tableName;
630
+ }
631
+ }
632
+ return getSaveFormRequestByParam(systemCode, backendUrl, param, url, pageContext.entity.data, pageContext.isTest);
633
+ }
634
+ function getSaveFormRequest(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo) {
635
+ return getSaveFormRequestWithRow(
636
+ pageContext,
637
+ configureObj,
638
+ url,
639
+ isUnControlVersion,
640
+ mainDefaultValueColumns,
641
+ dynamicColumnInfo,
642
+ null,
643
+ null
644
+ );
645
+ }
646
+ function getSaveFormRequestByParam(systemCode, backendUrl, param, url, formData, isTest) {
647
+ const baseUrl = commonUtil.getBaseUrl(backendUrl, isTest);
648
+ let path = baseUrl + url;
649
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, isTest);
650
+ let request$1;
651
+ if (formData && (formData.id || formData.ID)) {
652
+ request$1 = request.put(path, param);
653
+ } else {
654
+ request$1 = request.post(path, param);
655
+ }
656
+ return request$1;
657
+ }
658
+ function dealAfterOperate(pageContext, configureObj, data, successTip, isListButton) {
659
+ const buttonForPageType = getPageType(pageContext, configureObj, isListButton);
660
+ if (buttonForPageType && buttonForPageType === "list") {
661
+ dealAfterWithList(pageContext, configureObj, data, successTip);
662
+ pageContext.canClick = true;
663
+ } else if (buttonForPageType && buttonForPageType === "form") {
664
+ dealAfterWithForm(pageContext, configureObj, data, successTip);
665
+ } else {
666
+ const successOperation = configureObj.props.base.successOperation;
667
+ if (!successOperation || successOperation === null) {
668
+ pageContext.canClick = true;
669
+ } else {
670
+ afterSuccessOperateInForm(pageContext, configureObj, null);
671
+ }
672
+ }
673
+ }
674
+ function getPageType(pageContext, configureObj, isListButton) {
675
+ let pageType;
676
+ if (isListButton === void 0) {
677
+ pageType = configureObj.props.base.tableUuid ? "list" : null;
678
+ } else if (isListButton === false) {
679
+ pageType = "form";
680
+ }
681
+ if (!pageType) {
682
+ pageType = pageContext.pageType;
683
+ }
684
+ return pageType;
685
+ }
686
+ function dealAfterWithForm(pageContext, configureObj, data, successTip) {
687
+ if (data) {
688
+ const commonEntity = data;
689
+ let dataModel;
690
+ if (commonEntity.entity) {
691
+ dataModel = commonEntity.entity;
692
+ } else {
693
+ dataModel = commonEntity;
694
+ }
695
+ if (commonEntity.formNo) {
696
+ pageContext.initFormNo = commonEntity.formNo;
697
+ }
698
+ const totalModel = { ...dataModel, ...pageContext.entity.page };
699
+ afterSuccessOperateInForm(pageContext, configureObj, totalModel);
700
+ } else {
701
+ const successOperation = configureObj.props.base.successOperation;
702
+ if (!successOperation || successOperation === null) {
703
+ pageContext.canClick = true;
704
+ } else {
705
+ const totalModel = { ...pageContext.entity.page };
706
+ afterSuccessOperateInForm(pageContext, configureObj, totalModel);
707
+ }
708
+ }
709
+ if (successTip) {
710
+ index.ElMessage({
711
+ message: util.getI18n().t(successTip),
712
+ type: "success",
713
+ showClose: true
714
+ });
715
+ }
716
+ }
717
+ function afterSuccessOperateInForm(pageContext, configureObj, dataModel) {
718
+ debugger;
719
+ const successOperation = configureObj.props.base.successOperation;
720
+ if (!successOperation || successOperation === null) {
721
+ return;
722
+ }
723
+ const isNeedValueMapping = configureObj.props.base.isNeedValueMapping;
724
+ if (successOperation === "noOperation") {
725
+ pageContext.canClick = true;
726
+ } else if (successOperation === "refresh") {
727
+ if (dataModel && (dataModel.id || dataModel.ID)) {
728
+ refreshPage(pageContext, dataModel.ID ? dataModel.ID : dataModel.id);
729
+ } else {
730
+ pageContext.canClick = true;
731
+ }
732
+ } else if (successOperation === "closeWindow" || successOperation === "closeWindowAndRefresh") {
733
+ closeDialog(pageContext, configureObj, dataModel, isNeedValueMapping);
734
+ pageContext.canClick = true;
735
+ }
736
+ }
737
+ function closeDialog(pageContext, configureObj, dataModel, isNeedValueMapping) {
738
+ const jumpMode = pageContext.entity && pageContext.entity.request ? pageContext.entity.request.jumpMode : null;
739
+ if (jumpMode === "openWindow" || jumpMode === "newTab") {
740
+ if (window.parent) {
741
+ window.parent.close();
742
+ } else {
743
+ window.close();
744
+ }
745
+ } else {
746
+ const sourceTableName = pageContext.tableName;
747
+ const isNeedValueMappingFinal = isNeedValueMapping !== void 0 && isNeedValueMapping === true && dataModel && dataModel !== void 0;
748
+ const parentPageCode = pageContext.entity && pageContext.entity.request ? pageContext.entity.request.parentPageCode : null;
749
+ const eventPageInfo = parentPageCode + "_";
750
+ eventBus.$emit(eventPageInfo + "close-dialog", {
751
+ isNeedValueMapping: isNeedValueMappingFinal,
752
+ dataModel,
753
+ sourceConfigureObj: configureObj,
754
+ sourceTableName,
755
+ jumpMode
756
+ });
757
+ }
758
+ }
759
+ function updateValuesWhenCloseDialog(parentPageContext, parentConfigureObj, sourceModel, sourceTableName, valueMappings) {
760
+ var _a;
761
+ if (!valueMappings) {
762
+ valueMappings = parentConfigureObj.runtime && parentConfigureObj.runtime.linkPage && parentConfigureObj.runtime.linkPage.valueMappings ? parentConfigureObj.runtime.linkPage.valueMappings : null;
763
+ if (!valueMappings) {
764
+ valueMappings = (_a = parentConfigureObj.props.linkPage) == null ? void 0 : _a.valueMappings;
765
+ }
766
+ }
767
+ const targetTableName = parentPageContext.tableName;
768
+ console.log("update-value66-", sourceModel, sourceTableName);
769
+ updateWithPageValue(sourceModel, valueMappings, parentPageContext);
770
+ eventUtil.handleEvent(null, parentPageContext, parentConfigureObj, "setValue", {
771
+ sourceModel,
772
+ sourceTableName,
773
+ entity: parentPageContext.entity.data,
774
+ targetTableName
775
+ });
776
+ }
777
+ function updateWithPageValue(sourceModel, valueMappings, parentPageContext) {
778
+ if (sourceModel && sourceModel !== null && valueMappings) {
779
+ let sourceEntity = sourceModel;
780
+ if (Array.isArray(sourceModel) && sourceModel.length > 0) {
781
+ sourceEntity = sourceModel[0];
782
+ }
783
+ valueMappings.forEach((valueMapping) => {
784
+ const sourceField = valueMapping.source;
785
+ if (!sourceField) {
786
+ return;
787
+ }
788
+ const sourceFields = sourceField.split(".");
789
+ const targetValue = pageHelperUtil.getVariableValue(sourceEntity, sourceFields);
790
+ const targetField = valueMapping.target;
791
+ const targetFields = pageInitUtil.getModelFields(null, targetField);
792
+ pageHelperUtil.setVariableValue(parentPageContext.entity, targetFields, targetValue);
793
+ });
794
+ }
795
+ }
796
+ const noDefaultSuccessOperationComponents = ["dropdown"];
797
+ function dealAfterWithList(pageContext, configureObj, row, successTip) {
798
+ let successOperation = configureObj.props.base.successOperation;
799
+ const isNeedValueMapping = configureObj.props.base.isNeedValueMapping;
800
+ const tableUuid = eventUtil.getTableUuid(pageContext, configureObj);
801
+ if (!successOperation && !noDefaultSuccessOperationComponents.includes(configureObj.name)) {
802
+ successOperation = "refresh";
803
+ }
804
+ if (successOperation === "refresh") {
805
+ if (tableUuid) {
806
+ const gridRef = globalRefs.getComponentRef(pageContext, tableUuid);
807
+ gridRef.refresh();
808
+ } else {
809
+ console.error("tableUuid is empty");
810
+ }
811
+ } else if (successOperation === "closeWindow" || successOperation === "closeWindowAndRefresh") {
812
+ const pageData = commonUtil.deepCopy(pageContext.entity.page);
813
+ let dataModel = row;
814
+ if (!dataModel) {
815
+ dataModel = {};
816
+ }
817
+ Object.assign(pageData, dataModel);
818
+ closeDialog(pageContext, configureObj, pageData, isNeedValueMapping);
819
+ }
820
+ if (successTip) {
821
+ index.ElMessage({
822
+ message: util.getI18n().t(successTip),
823
+ type: "success",
824
+ showClose: true
825
+ });
826
+ }
827
+ }
828
+ function refreshFormOrListPage(pageContext, configureObj, isRefreshWhenClosePopup, mySuccessOperation) {
829
+ var _a;
830
+ if (configureObj && !configureObj.props.base) {
831
+ configureObj.props.base = {};
832
+ }
833
+ let successOperation = mySuccessOperation;
834
+ if (!successOperation) {
835
+ successOperation = isRefreshWhenClosePopup ? "refresh" : (_a = configureObj.props.base) == null ? void 0 : _a.successOperation;
836
+ }
837
+ console.log(
838
+ "refreshFormOrListPage22=====successOperation=",
839
+ successOperation,
840
+ "isRefreshWhenClosePopup=",
841
+ isRefreshWhenClosePopup
842
+ );
843
+ const buttonForPageType = getPageType(pageContext, configureObj);
844
+ console.log("refreshFormOrListPage22=====buttonForPageType=", buttonForPageType);
845
+ if (buttonForPageType && buttonForPageType === "list" && !successOperation) {
846
+ successOperation = "refresh";
847
+ }
848
+ console.log("refreshFormOrListPage33=====successOperation=", successOperation);
849
+ if (successOperation === "refresh") {
850
+ if (buttonForPageType && buttonForPageType === "list") {
851
+ const tableUuid = eventUtil.getTableUuid(pageContext, configureObj);
852
+ if (tableUuid) {
853
+ const gridRef = globalRefs.getComponentRef(pageContext, tableUuid);
854
+ gridRef.refresh();
855
+ } else {
856
+ console.error("tableUuid is empty");
857
+ }
858
+ } else if (buttonForPageType && buttonForPageType === "form") {
859
+ const dataModel = pageContext.entity.data;
860
+ refreshPage(pageContext, dataModel.ID ? dataModel.ID : dataModel.id);
861
+ }
862
+ }
863
+ }
864
+ function submitForm(params, isListButton, eventName, url) {
865
+ return new Promise((resolve, reject) => {
866
+ const pageContext = params.pageContext;
867
+ const configureObj = params.configureObj;
868
+ const mainDefaultValueColumns = params.mainDefaultValueColumns;
869
+ const dynamicColumnInfo = params.dynamicColumnInfo;
870
+ const ids2 = params.ids;
871
+ const successOperation = configureObj.props.base.successOperation;
872
+ let isUnControlVersion = false;
873
+ if (successOperation && successOperation === "noOperation") {
874
+ isUnControlVersion = true;
875
+ }
876
+ let tableName = pageContext.tableName;
877
+ if (isListButton) {
878
+ const tableUuid = configureObj.props.base.tableUuid ? configureObj.props.base.tableUuid : params.tableUuid;
879
+ tableName = tableUtils.getTableNameByTableUuid(pageContext, tableUuid);
880
+ }
881
+ const request2 = getSubmitFormRequest(
882
+ pageContext,
883
+ configureObj,
884
+ url,
885
+ isUnControlVersion,
886
+ mainDefaultValueColumns,
887
+ dynamicColumnInfo,
888
+ eventName,
889
+ ids2,
890
+ tableName
891
+ );
892
+ if (request2) {
893
+ request2.then((data) => {
894
+ dealAfterOperate(pageContext, configureObj, data, "superPageRuntimeMessage.successfulSave", isListButton);
895
+ resolve(data);
896
+ }).catch((error) => {
897
+ reject(error);
898
+ });
899
+ } else {
900
+ reject("request不存在");
901
+ }
902
+ });
903
+ }
904
+ function getSubmitFormRequest(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, eventName, ids2, tableName) {
905
+ return new Promise((resolve, reject) => {
906
+ const buttonName = configureObj.props.base.title;
907
+ const operationI18nTip = "superPageRuntimeMessage.whetherToConfirm" + commonUtil.upperFirstCase(eventName);
908
+ index$1.ElMessageBox.confirm(
909
+ util.getI18n().t(operationI18nTip, { name: buttonName }),
910
+ util.getI18n().t("superPageRuntimeMessage.tips"),
911
+ {
912
+ confirmButtonText: util.getI18n().t("superPageRuntimeMessage.sure"),
913
+ cancelButtonText: util.getI18n().t("superPageRuntimeMessage.cancel"),
914
+ type: "warning"
915
+ }
916
+ ).then(() => {
917
+ const systemCode = pageContext.systemCode;
918
+ const backendUrl = pageContext.backendUrl;
919
+ const param = getCommonFormRequestParam(
920
+ pageContext,
921
+ configureObj,
922
+ isUnControlVersion,
923
+ mainDefaultValueColumns,
924
+ dynamicColumnInfo,
925
+ ids2,
926
+ null
927
+ );
928
+ param.tableName = tableName;
929
+ const baseUrl = commonUtil.getBaseUrl(backendUrl, pageContext.isTest);
930
+ let path = baseUrl + url;
931
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
932
+ request.post(path, param).then((result) => {
933
+ resolve(result);
934
+ }).catch((error) => {
935
+ reject(error);
936
+ });
937
+ }).catch(() => {
938
+ reject("点击了取消按钮");
939
+ });
940
+ });
941
+ }
942
+ function deleteFunc(params) {
943
+ return new Promise((resolve, reject) => {
944
+ const ids2 = params.ids;
945
+ if (!ids2 || ids2.length === 0) {
946
+ index.ElMessage({
947
+ showClose: true,
948
+ type: "warning",
949
+ message: util.getI18n().t("superPageRuntimeMessage.pleaseSelectRecord")
950
+ });
951
+ resolve(true);
952
+ return;
953
+ }
954
+ index$1.ElMessageBox.confirm(
955
+ util.getI18n().t("superPageRuntimeMessage.whetherToConfirmDeletion"),
956
+ util.getI18n().t("superPageRuntimeMessage.tips"),
957
+ {
958
+ confirmButtonText: util.getI18n().t("superPageRuntimeMessage.sure"),
959
+ cancelButtonText: util.getI18n().t("superPageRuntimeMessage.cancel"),
960
+ type: "warning"
961
+ }
962
+ ).then(() => {
963
+ var _a;
964
+ const pageContext = params.pageContext;
965
+ const configureObj = params.configureObj;
966
+ const configureBase = configureObj.props.base;
967
+ const systemCode = pageContext.systemCode;
968
+ const backendUrl = pageContext.backendUrl;
969
+ const tableUuid = configureObj.props.base.tableUuid ? configureObj.props.base.tableUuid : params.tableUuid;
970
+ const tableName = tableUtils.getTableNameByTableUuid(pageContext, tableUuid);
971
+ const baseUrl = commonUtil.getBaseUrl(backendUrl, pageContext.isTest);
972
+ let path = baseUrl + "/dsc/commons/" + tableName;
973
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
974
+ const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
975
+ const isWorkflow = commonUtil.isWorkflowPage(pageContext);
976
+ const functionCodes = pageInitUtil.getPermissionCodes(configureObj, pageContext);
977
+ const param = {
978
+ ids: ids2,
979
+ functionCode: functionCodes,
980
+ isPermission: isPermission + "",
981
+ systemCode,
982
+ isWorkflowEntity: isWorkflow,
983
+ listCodesMap: pageContext.listCodesMap,
984
+ pageCode: pageContext.code,
985
+ pageVersion: pageContext.version
986
+ };
987
+ if (pageContext.beanName) {
988
+ param["beanName"] = pageContext.beanName;
989
+ }
990
+ const deleteLogicSetting = configureObj.props.deleteLogicSetting;
991
+ if (deleteLogicSetting) {
992
+ if (typeof deleteLogicSetting === "object") {
993
+ param["deleteLogicSetting"] = JSON.stringify(deleteLogicSetting);
994
+ } else if (typeof deleteLogicSetting === "string") {
995
+ param["deleteLogicSetting"] = deleteLogicSetting;
996
+ }
997
+ }
998
+ const logSetting = (_a = configureObj.props.base) == null ? void 0 : _a.logSetting;
999
+ if (logSetting) {
1000
+ param["logSettingText"] = logSetting.join("");
1001
+ }
1002
+ const isSafeDelete = configureObj.props.base.isSafeDelete;
1003
+ if (isSafeDelete) {
1004
+ param["isSafeDelete"] = isSafeDelete;
1005
+ }
1006
+ request.delete(path, {
1007
+ data: param
1008
+ }).then((data) => {
1009
+ const gridRef = globalRefs.getComponentRef(pageContext, tableUuid);
1010
+ if (gridRef) {
1011
+ gridRef.isDeleteChange(true);
1012
+ gridRef.clearSelections();
1013
+ }
1014
+ dealAfterOperate(pageContext, configureObj, data, "superPageRuntimeMessage.successfulDelete", true);
1015
+ resolve(true);
1016
+ }).catch((e) => {
1017
+ reject(e);
1018
+ });
1019
+ }).catch(() => {
1020
+ reject();
1021
+ });
1022
+ });
1023
+ }
1024
+ function downloadTemplateFunc(params) {
1025
+ var _a;
1026
+ const pageContext = params.pageContext;
1027
+ const configureObj = params.configureObj;
1028
+ const configureBase = configureObj.props.base;
1029
+ const templateFilesResult = commonUtil.packageTemplateFiles(configureBase.templateFiles, pageContext, configureObj);
1030
+ let templateUUID;
1031
+ let templateShowPath;
1032
+ if (templateFilesResult && templateFilesResult.length > 0) {
1033
+ templateUUID = templateFilesResult[0].templateUuid;
1034
+ templateShowPath = templateFilesResult[0].templateName;
1035
+ }
1036
+ const systemCode = pageContext.systemCode;
1037
+ const backendUrl = pageContext.backendUrl;
1038
+ const showName = templateShowPath;
1039
+ let param = "?1=1";
1040
+ if (templateUUID && showName && templateUUID !== "undefined" && showName !== "undefined" && templateUUID !== "null" && showName !== "null") {
1041
+ param += "&fileName=" + encodeURI(templateUUID) + "&showName=" + encodeURI(showName);
1042
+ } else if (showName) {
1043
+ param += "&showName=" + encodeURI(showName);
1044
+ } else if (pageContext.label) {
1045
+ param += "&showName=" + encodeURI(pageContext.label) + ".xlsx";
1046
+ }
1047
+ const logSetting = (_a = configureObj.props.base) == null ? void 0 : _a.logSetting;
1048
+ if (logSetting) {
1049
+ param += "&logSettingText=" + logSetting.join("");
1050
+ }
1051
+ if (systemCode) {
1052
+ param += "&systemCode=" + systemCode;
1053
+ }
1054
+ const listCode = params.listCode;
1055
+ if (listCode) {
1056
+ param += "&listCode=" + listCode;
1057
+ }
1058
+ if (pageContext.beanName) {
1059
+ param += "&beanName=" + pageContext.beanName;
1060
+ }
1061
+ const functionCodes = pageInitUtil.getPermissionCodes(configureObj, pageContext);
1062
+ if (functionCodes) {
1063
+ param += "&functionCode=" + functionCodes;
1064
+ }
1065
+ if (pageContext.tableName) {
1066
+ param += "&tableName=" + pageContext.tableName;
1067
+ }
1068
+ if (pageContext.code) {
1069
+ param += "&pageCode=" + pageContext.code;
1070
+ }
1071
+ if (pageContext.version) {
1072
+ param += "&pageVersion=" + pageContext.version;
1073
+ }
1074
+ const token = auth.getToken();
1075
+ if (token) {
1076
+ param += "&JWT=" + token;
1077
+ }
1078
+ const runCurrentRoleKey = "_RUN_CURRENT_ROLE";
1079
+ const currentRole = auth.getSessionCache(runCurrentRoleKey);
1080
+ if (currentRole) {
1081
+ param += "&" + runCurrentRoleKey + "=" + currentRole;
1082
+ }
1083
+ if (configureBase) {
1084
+ const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
1085
+ param += "&isPermission=" + isPermission;
1086
+ }
1087
+ const baseUrl = commonUtil.getBaseUrl(backendUrl, pageContext.isTest);
1088
+ window.open(baseUrl + "/dsc/commons/download-files" + param);
1089
+ }
1090
+ function doImportFinally(params, fileObj) {
1091
+ var _a;
1092
+ const pageContext = params.pageContext;
1093
+ const buttonConfigureObj = params.configureObj;
1094
+ const tableConfigure = params.tableConfigure;
1095
+ const buttonConfigureBase = buttonConfigureObj.props.base;
1096
+ const tableUuid = buttonConfigureObj.props.base.tableUuid ? buttonConfigureObj.props.base.tableUuid : params.tableUuid;
1097
+ const tableName = tableUtils.getTableNameByTableUuid(pageContext, tableUuid);
1098
+ const param = new FormData();
1099
+ param.append("multipartFile", fileObj);
1100
+ if (tableName) {
1101
+ param.append("tableName", tableName);
1102
+ }
1103
+ if (pageContext.importBeanName) {
1104
+ param.append("importBeanName", pageContext.importBeanName);
1105
+ }
1106
+ if (pageContext.beanName) {
1107
+ param.append("beanName", pageContext.beanName);
1108
+ }
1109
+ const listViewImportDuplicate = (_a = tableConfigure.props.importSetting) == null ? void 0 : _a.listViewImportDuplicate;
1110
+ if (listViewImportDuplicate) {
1111
+ param.append("importDuplicateRule", listViewImportDuplicate);
1112
+ }
1113
+ const judgeHeavyList = pageContext.judgeHeavyList;
1114
+ if (judgeHeavyList) {
1115
+ param.append("judgeHeavyList", JSON.stringify(judgeHeavyList));
1116
+ }
1117
+ const autoSetValueData = getButtonAutoSetValueData(buttonConfigureObj);
1118
+ if (autoSetValueData) {
1119
+ param.append("autoSetValueData", autoSetValueData);
1120
+ }
1121
+ const formNoRuleCode = pageContext.formNoRuleCode;
1122
+ if (formNoRuleCode) {
1123
+ param.append("formNoRuleCode", formNoRuleCode);
1124
+ }
1125
+ const listCode = params.listCode;
1126
+ if (listCode) {
1127
+ param.append("listCode", listCode);
1128
+ }
1129
+ let isAsync = false;
1130
+ if (buttonConfigureBase["isAsync"] !== void 0 && buttonConfigureBase["isAsync"] !== null) {
1131
+ isAsync = buttonConfigureBase.isAsync;
1132
+ } else {
1133
+ isAsync = false;
1134
+ }
1135
+ param.append("isAsync", isAsync + "");
1136
+ param.append("pageCode", pageContext.code);
1137
+ const isWorkflowEntity = commonUtil.isWorkflowPage(pageContext);
1138
+ if (isWorkflowEntity !== null && isWorkflowEntity !== void 0) {
1139
+ param.append("isWorkflowEntity", isWorkflowEntity + "");
1140
+ }
1141
+ const functionCodes = pageInitUtil.getPermissionCodes(buttonConfigureObj, pageContext);
1142
+ if (functionCodes) {
1143
+ param.append("functionCode", functionCodes);
1144
+ }
1145
+ const additionalParamMap = getAdditionalParamMap(pageContext);
1146
+ param.append("additionalParamMapStr", JSON.stringify(additionalParamMap));
1147
+ const isPermission = buttonConfigureBase.isPermission === void 0 || buttonConfigureBase.isPermission === "true" || buttonConfigureBase.isPermission;
1148
+ param.append("isPermission", isPermission + "");
1149
+ const systemCode = pageContext.systemCode;
1150
+ if (systemCode) {
1151
+ param.append("systemCode", systemCode);
1152
+ }
1153
+ const backendUrl = pageContext.backendUrl;
1154
+ const baseUrl = commonUtil.getBaseUrl(backendUrl, pageContext.isTest);
1155
+ let path = baseUrl + "/dsc/commons/import-data";
1156
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1157
+ request.post(path, param).then((data) => {
1158
+ if (isAsync) {
1159
+ index.ElMessage({
1160
+ showClose: true,
1161
+ type: "success",
1162
+ message: util.getI18n().t("superPageRuntimeMessage.asyncImport")
1163
+ });
1164
+ } else {
1165
+ let isSuccess = false;
1166
+ if (data) {
1167
+ isSuccess = false;
1168
+ index.ElMessage({
1169
+ dangerouslyUseHTMLString: true,
1170
+ showClose: true,
1171
+ type: "warning",
1172
+ message: data
1173
+ });
1174
+ } else {
1175
+ index.ElMessage({
1176
+ showClose: true,
1177
+ type: "success",
1178
+ message: util.getI18n().t("superPageRuntimeMessage.successfulImport")
1179
+ });
1180
+ isSuccess = true;
1181
+ }
1182
+ dealAfterOperate(pageContext, buttonConfigureObj, data, null, true);
1183
+ pageContext.result = isSuccess;
1184
+ eventUtil.doAfterClickEvent(pageContext, buttonConfigureObj);
1185
+ }
1186
+ }).catch((error) => {
1187
+ console.log("error==", error);
1188
+ });
1189
+ }
1190
+ function judgeDataNumber(buttonConfigureObj, ids2) {
1191
+ const buttonConfigureBase = buttonConfigureObj.props.base;
1192
+ if (buttonConfigureBase.conditionsForExecution && buttonConfigureBase.conditionsForExecution !== "") {
1193
+ if (buttonConfigureBase.conditionsForExecution === "one") {
1194
+ if (!ids2 || ids2.length !== 1) {
1195
+ index.ElMessage({
1196
+ showClose: true,
1197
+ type: "warning",
1198
+ message: util.getI18n().t("superPageRuntimeMessage.thePreconditionOfTheButtonTo", {
1199
+ message: util.getI18n().t("superPageRuntimeMessage.onlyOneRecordCanBeselected")
1200
+ })
1201
+ });
1202
+ return false;
1203
+ }
1204
+ } else if (buttonConfigureBase.conditionsForExecution === "more") {
1205
+ if (!ids2 || ids2.length <= 0) {
1206
+ index.ElMessage({
1207
+ showClose: true,
1208
+ type: "warning",
1209
+ message: util.getI18n().t("superPageRuntimeMessage.thePreconditionOfTheButtonTo", {
1210
+ message: util.getI18n().t("superPageRuntimeMessage.selectAtLeastOneRecord")
1211
+ })
1212
+ });
1213
+ return false;
1214
+ }
1215
+ }
1216
+ }
1217
+ return true;
1218
+ }
1219
+ function exportFunc(params) {
1220
+ return new Promise((resolve, reject) => {
1221
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
1222
+ const pageContext = params.pageContext;
1223
+ const buttonConfigure = params.configureObj;
1224
+ const configureBase = buttonConfigure.props.base;
1225
+ const listCode = params.listCode;
1226
+ const selections = params.selections;
1227
+ const dataParam = {};
1228
+ if (selections && selections.length > 0) {
1229
+ dataParam["data"] = selections;
1230
+ }
1231
+ let pageName = pageContext.label;
1232
+ if (!pageName) {
1233
+ pageName = pageContext.code;
1234
+ }
1235
+ let isAsync = false;
1236
+ if (configureBase["isAsync"] !== void 0 && configureBase["isAsync"] !== null) {
1237
+ isAsync = configureBase.isAsync;
1238
+ } else {
1239
+ isAsync = false;
1240
+ }
1241
+ const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
1242
+ const functionCodes = pageInitUtil.getPermissionCodes(buttonConfigure, pageContext);
1243
+ const exportFileName = pageName;
1244
+ const exportOptions = {
1245
+ backendUrl: pageContext.backendUrl,
1246
+ pageContext
1247
+ };
1248
+ console.log("exportFunc======buttonConfigure=", buttonConfigure);
1249
+ exportOptions.isShowWatermark = ((_b = (_a = buttonConfigure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) === void 0 ? "true" : ((_d = (_c = buttonConfigure.props) == null ? void 0 : _c.watermark) == null ? void 0 : _d.isShowWatermark) + "";
1250
+ exportOptions.watermarkContent = ((_f = (_e = buttonConfigure.props) == null ? void 0 : _e.watermark) == null ? void 0 : _f.content) && ((_h = (_g = buttonConfigure.props) == null ? void 0 : _g.watermark) == null ? void 0 : _h.content.length) > 0 ? (_j = (_i = buttonConfigure.props) == null ? void 0 : _i.watermark) == null ? void 0 : _j.content.join("-~") : "";
1251
+ console.log("exportFunc======exportOptions=", exportOptions);
1252
+ window["$vueApp"].config.globalProperties.$exportDataNew(
1253
+ dataParam,
1254
+ exportFileName,
1255
+ listCode,
1256
+ functionCodes,
1257
+ null,
1258
+ exportOptions,
1259
+ isAsync,
1260
+ pageContext.code,
1261
+ isPermission
1262
+ );
1263
+ });
1264
+ }
1265
+ function getWorkflowSaveParams(params) {
1266
+ var _a;
1267
+ const pageContext = params.pageContext;
1268
+ const configureObj = params.configureObj;
1269
+ const dataModel = pageContext.entity.data;
1270
+ const systemCode = pageContext.systemCode;
1271
+ const permissionPrefix = pageContext.code;
1272
+ let functionCodes = pageInitUtil.getPermissionCodes(configureObj, pageContext);
1273
+ if (!functionCodes) {
1274
+ functionCodes = permissionPrefix + ".xxx";
1275
+ }
1276
+ if (!dataModel.id && !dataModel.ID) {
1277
+ dataModel["PAGE_CODE"] = pageContext.code;
1278
+ dataModel["PAGE_VERSION"] = pageContext.version;
1279
+ }
1280
+ const param = {
1281
+ entity: dataModel,
1282
+ pageMoel: pageContext.entity.page,
1283
+ formNoRuleCode: pageContext.formNoRuleCode,
1284
+ tableName: pageContext.tableName,
1285
+ emailTemplateCode: pageContext.emailTemplateCode,
1286
+ definitionId: pageContext.definitionId,
1287
+ functionCode: functionCodes,
1288
+ systemCode,
1289
+ listCodesMap: pageContext.listCodesMap,
1290
+ pageCode: pageContext.code,
1291
+ pageVersion: pageContext.version,
1292
+ listCodesInitSearchForm: pageContext.listCodesInitSearchForm
1293
+ };
1294
+ if (pageContext.completeTaskParam) {
1295
+ param["completeTaskParam"] = {
1296
+ taskId: pageContext.completeTaskParam.taskId,
1297
+ opinion: pageContext.completeTaskParam.opinion
1298
+ };
1299
+ }
1300
+ if (pageContext.judgeHeavyList) {
1301
+ if (commonUtil.isArrayFn(pageContext.judgeHeavyList)) {
1302
+ param["judgeHeavyList"] = JSON.stringify(pageContext.judgeHeavyList);
1303
+ } else {
1304
+ param["judgeHeavyList"] = pageContext.judgeHeavyList;
1305
+ }
1306
+ }
1307
+ const conversionCodes = configureObj.props.base.conversionCodes;
1308
+ if (conversionCodes) {
1309
+ if (commonUtil.isArrayFn(conversionCodes)) {
1310
+ param["dataConversionRule"] = conversionCodes.join(",");
1311
+ } else if (typeof conversionCodes === "string") {
1312
+ param["dataConversionRule"] = conversionCodes;
1313
+ }
1314
+ }
1315
+ console.log("getWorkflowSaveParams----configureObj=", configureObj);
1316
+ const autoSetValueData = getButtonAutoSetValueData(configureObj);
1317
+ if (autoSetValueData) {
1318
+ param["autoSetValueData"] = autoSetValueData;
1319
+ }
1320
+ if (pageContext.beanName) {
1321
+ param["beanName"] = pageContext.beanName;
1322
+ }
1323
+ const logSetting = (_a = configureObj.props.base) == null ? void 0 : _a.logSetting;
1324
+ if (logSetting) {
1325
+ param["logSettingText"] = logSetting.join("");
1326
+ }
1327
+ if (!param.systemCode) {
1328
+ param.systemCode = systemCode;
1329
+ }
1330
+ const additionalParamMap = getAdditionalParamMap(pageContext);
1331
+ param["additionalParamMap"] = additionalParamMap;
1332
+ if (additionalParamMap.ids && additionalParamMap.ids.length > 0) {
1333
+ if (typeof additionalParamMap.ids === "string") {
1334
+ param["ids"] = additionalParamMap.ids.split(",");
1335
+ } else if (Array.isArray(additionalParamMap.ids)) {
1336
+ param["ids"] = additionalParamMap.ids;
1337
+ } else if (typeof ids === "number") {
1338
+ param["ids"] = [additionalParamMap.ids];
1339
+ } else {
1340
+ console.error("ids参数类型错误");
1341
+ }
1342
+ }
1343
+ const successOperation = configureObj.props.base.successOperation;
1344
+ if (successOperation && successOperation === "noOperation") {
1345
+ param["unControlVersion"] = true;
1346
+ }
1347
+ param["isWorkflowEntity"] = true;
1348
+ return param;
1349
+ }
1350
+ async function workflowSaveFunc(params) {
1351
+ return new Promise((resolve, reject) => {
1352
+ const pageContext = params.pageContext;
1353
+ const dataModel = pageContext.entity.data;
1354
+ const systemCode = pageContext.systemCode;
1355
+ const backendUrl = pageContext.backendUrl;
1356
+ let path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons";
1357
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1358
+ if (!path) {
1359
+ index.ElMessage({
1360
+ showClose: true,
1361
+ type: "warning",
1362
+ message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1363
+ });
1364
+ return;
1365
+ }
1366
+ const param = getWorkflowSaveParams(params);
1367
+ let request$1;
1368
+ if (dataModel.id || dataModel.ID) {
1369
+ request$1 = request.put(path, param);
1370
+ } else {
1371
+ request$1 = request.post(path, param);
1372
+ }
1373
+ request$1.then((commonEntity) => {
1374
+ let result = true;
1375
+ if (commonEntity) {
1376
+ result = dealCompleteTaskParam(commonEntity, false, pageContext, params, null);
1377
+ }
1378
+ if (result === true) {
1379
+ index.ElMessage({
1380
+ showClose: true,
1381
+ type: "success",
1382
+ message: util.getI18n().t("superPageRuntimeMessage.successfulSave")
1383
+ });
1384
+ }
1385
+ eventBus.$emit("clearTableAllEndEditing");
1386
+ resolve(true);
1387
+ }).catch((error) => {
1388
+ reject(error);
1389
+ });
1390
+ });
1391
+ }
1392
+ async function workflowStartFunc(params) {
1393
+ return new Promise((resolve, reject) => {
1394
+ const pageContext = params.pageContext;
1395
+ const dataModel = pageContext.entity.data;
1396
+ const systemCode = pageContext.systemCode;
1397
+ const backendUrl = pageContext.backendUrl;
1398
+ let path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/start";
1399
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1400
+ if (!path) {
1401
+ index.ElMessage({
1402
+ showClose: true,
1403
+ type: "warning",
1404
+ message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1405
+ });
1406
+ return;
1407
+ }
1408
+ const param = getWorkflowSaveParams(params);
1409
+ let request$1;
1410
+ if (dataModel.workflow_id || dataModel.WORKFLOW_ID) {
1411
+ path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons";
1412
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1413
+ request$1 = request.put(path, param);
1414
+ } else {
1415
+ request$1 = request.post(path, param);
1416
+ }
1417
+ request$1.then((commonEntity) => {
1418
+ let result = true;
1419
+ if (commonEntity) {
1420
+ result = dealCompleteTaskParam(commonEntity, false, pageContext, params, null);
1421
+ }
1422
+ if (result === true) {
1423
+ index.ElMessage({
1424
+ showClose: true,
1425
+ type: "success",
1426
+ message: util.getI18n().t("superPageRuntimeMessage.successfulStart")
1427
+ });
1428
+ }
1429
+ eventBus.$emit("clearTableAllEndEditing");
1430
+ resolve(true);
1431
+ }).catch((error) => {
1432
+ reject(error);
1433
+ });
1434
+ });
1435
+ }
1436
+ function dealCompleteTaskParam(commonEntity, isInit, pageContext, params, operationResult) {
1437
+ const pageCode = pageContext.code;
1438
+ const pageVersion = pageContext.version;
1439
+ let taskId;
1440
+ if (commonEntity) {
1441
+ if (isInit) {
1442
+ pageContext.initFormNo = commonEntity.formNo;
1443
+ pageContext.emailTemplateCode = commonEntity.emailTemplateCode;
1444
+ }
1445
+ if (commonEntity.entity) {
1446
+ pageContext.entity.data = commonEntity.entity;
1447
+ cacheFormDataId(commonEntity.entity.id || commonEntity.entity.ID, pageContext);
1448
+ }
1449
+ const completeTaskResult = commonEntity.completeTaskResult;
1450
+ if (completeTaskResult) {
1451
+ const completeTaskTipType = completeTaskResult.completeTaskTipType;
1452
+ if (completeTaskTipType && completeTaskTipType === "MESSAGE") {
1453
+ const message = completeTaskResult.content;
1454
+ index.ElMessage({
1455
+ showClose: true,
1456
+ type: "warning",
1457
+ message
1458
+ });
1459
+ return false;
1460
+ }
1461
+ }
1462
+ if (commonEntity.completeTaskParam) {
1463
+ const completeTaskParam = commonEntity.completeTaskParam;
1464
+ taskId = completeTaskParam.taskId;
1465
+ if (params) {
1466
+ params.taskId = taskId;
1467
+ }
1468
+ storeUtil.setStoreInfo(pageCode, pageVersion, "_completeTaskParam", completeTaskParam);
1469
+ pageContext.fieldPermissions = completeTaskParam.fieldPermissions;
1470
+ pageContext.actionPermissions = completeTaskParam.actionPermissions;
1471
+ pageContext.workflowButtonComponent = completeTaskParam.buttonComponent;
1472
+ pageContext.completeTaskParam = completeTaskParam;
1473
+ pageContext.completeTaskParam.opinion = null;
1474
+ }
1475
+ if (!pageContext.entity) {
1476
+ pageContext.entity = {};
1477
+ }
1478
+ pageContext.entity.task = commonEntity.taskParamMap;
1479
+ storeUtil.setStoreInfo(pageCode, pageVersion, "_currentActivityName", commonEntity.taskName);
1480
+ }
1481
+ if (params) {
1482
+ params.operationResult = operationResult;
1483
+ }
1484
+ if (!isInit) {
1485
+ dealAfterOperate(pageContext, params.configureObj, commonEntity, null, false);
1486
+ }
1487
+ return true;
1488
+ }
1489
+ function submitProcessFunc(params) {
1490
+ return new Promise((resolve, reject) => {
1491
+ const pageContext = params.pageContext;
1492
+ const systemCode = pageContext.systemCode;
1493
+ const backendUrl = pageContext.backendUrl;
1494
+ let path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/submit";
1495
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1496
+ if (!path) {
1497
+ index.ElMessage({
1498
+ showClose: true,
1499
+ type: "warning",
1500
+ message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1501
+ });
1502
+ return;
1503
+ }
1504
+ const param = getWorkflowSaveParams(params);
1505
+ const request$1 = request.post(path, param);
1506
+ if (request$1) {
1507
+ request$1.then((commonEntity) => {
1508
+ let result = true;
1509
+ if (commonEntity) {
1510
+ result = dealCompleteTaskParam(commonEntity, false, pageContext, params, null);
1511
+ }
1512
+ if (result === true) {
1513
+ index.ElMessage({
1514
+ showClose: true,
1515
+ type: "success",
1516
+ message: util.getI18n().t("superPageRuntimeMessage.successfulSubmit")
1517
+ });
1518
+ }
1519
+ eventBus.$emit("clearTableAllEndEditing");
1520
+ resolve(true);
1521
+ }).catch((error) => {
1522
+ reject(error);
1523
+ });
1524
+ }
1525
+ });
1526
+ }
1527
+ async function completeTaskFunc(params, operationResult) {
1528
+ const validateOpinionResult = await validateOpinion(params);
1529
+ return new Promise((resolve, reject) => {
1530
+ var _a;
1531
+ if (validateOpinionResult) {
1532
+ const pageContext = params.pageContext;
1533
+ const systemCode = pageContext.systemCode;
1534
+ const backendUrl = pageContext.backendUrl;
1535
+ const opinion = validateOpinionResult === true ? (_a = pageContext.completeTaskParam) == null ? void 0 : _a.opinion : validateOpinionResult;
1536
+ let path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/complete-tasks";
1537
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1538
+ if (!path) {
1539
+ index.ElMessage({
1540
+ showClose: true,
1541
+ type: "warning",
1542
+ message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1543
+ });
1544
+ return;
1545
+ }
1546
+ const param = getWorkflowSaveParams(params);
1547
+ param["completeTaskParam"] = {
1548
+ operationResult,
1549
+ taskId: pageContext.completeTaskParam ? pageContext.completeTaskParam.taskId : null,
1550
+ opinion: opinion ? opinion : null
1551
+ };
1552
+ const request$1 = request.post(path, param);
1553
+ request$1.then((commonEntity) => {
1554
+ let result = true;
1555
+ if (commonEntity) {
1556
+ result = dealCompleteTaskParam(commonEntity, false, pageContext, params, operationResult);
1557
+ }
1558
+ if (result === true) {
1559
+ index.ElMessage({
1560
+ showClose: true,
1561
+ type: "success",
1562
+ message: util.getI18n().t("superPageRuntimeMessage.successfulCompleteTask")
1563
+ });
1564
+ }
1565
+ resolve(true);
1566
+ }).catch((error) => {
1567
+ reject(error);
1568
+ });
1569
+ } else {
1570
+ resolve(true);
1571
+ }
1572
+ });
1573
+ }
1574
+ function validateOpinion(params) {
1575
+ return new Promise((resolve, reject) => {
1576
+ var _a, _b, _c, _d;
1577
+ const configureObj = params.configureObj;
1578
+ if (configureObj) {
1579
+ let isOpinionRequired = false;
1580
+ if ((_b = (_a = configureObj.props) == null ? void 0 : _a.base) == null ? void 0 : _b.isMustOpinion) {
1581
+ isOpinionRequired = true;
1582
+ }
1583
+ if (isOpinionRequired === true) {
1584
+ const pageContext = params.pageContext;
1585
+ const mustOpinionConditions = (_d = (_c = configureObj.props) == null ? void 0 : _c.base) == null ? void 0 : _d.mustOpinionConditions;
1586
+ isOpinionRequired = pageHelperUtil.caculateShowCondition(pageContext, mustOpinionConditions);
1587
+ }
1588
+ if (isOpinionRequired === true) {
1589
+ index$1.ElMessageBox.prompt(
1590
+ util.getI18n().t("superPageRuntimeMessage.pleaseInputOpinion"),
1591
+ util.getI18n().t("superPageRuntimeMessage.opinion"),
1592
+ {
1593
+ confirmButtonText: util.getI18n().t("superPageRuntimeMessage.sure"),
1594
+ cancelButtonText: util.getI18n().t("superPageRuntimeMessage.cancel"),
1595
+ // 输入框类型
1596
+ inputType: "textarea",
1597
+ inputValue: null,
1598
+ closeOnClickModal: false,
1599
+ inputValidator: (value) => {
1600
+ if (value && value.trim()) {
1601
+ return true;
1602
+ } else {
1603
+ return util.getI18n().t("superPageRuntimeMessage.pleaseInputOpinion");
1604
+ }
1605
+ }
1606
+ }
1607
+ ).then(({ value }) => {
1608
+ resolve(value);
1609
+ }).catch(() => {
1610
+ resolve(false);
1611
+ });
1612
+ } else {
1613
+ resolve(true);
1614
+ }
1615
+ } else {
1616
+ resolve(true);
1617
+ }
1618
+ });
1619
+ }
1620
+ function validateRemark(params) {
1621
+ return new Promise((resolve, reject) => {
1622
+ var _a, _b, _c, _d;
1623
+ const configureObj = params.configureObj;
1624
+ if (configureObj) {
1625
+ let isRemarkRequired = (_b = (_a = configureObj.props) == null ? void 0 : _a.base) == null ? void 0 : _b.isMustRemark;
1626
+ if (isRemarkRequired === void 0 || isRemarkRequired === true) {
1627
+ isRemarkRequired = true;
1628
+ const pageContext = params.pageContext;
1629
+ const mustRemarkConditions = (_d = (_c = configureObj.props) == null ? void 0 : _c.base) == null ? void 0 : _d.mustRemarkConditions;
1630
+ isRemarkRequired = pageHelperUtil.caculateShowCondition(pageContext, mustRemarkConditions);
1631
+ }
1632
+ if (isRemarkRequired === true) {
1633
+ index$1.ElMessageBox.prompt(
1634
+ util.getI18n().t("superPageRuntimeMessage.pleaseInputRemark"),
1635
+ util.getI18n().t("superPageRuntimeMessage.remark"),
1636
+ {
1637
+ confirmButtonText: util.getI18n().t("superPageRuntimeMessage.sure"),
1638
+ cancelButtonText: util.getI18n().t("superPageRuntimeMessage.cancel"),
1639
+ // 输入框类型
1640
+ inputType: "textarea",
1641
+ inputValue: null,
1642
+ closeOnClickModal: false,
1643
+ inputValidator: (value) => {
1644
+ if (value && value.trim()) {
1645
+ return true;
1646
+ } else {
1647
+ return util.getI18n().t("superPageRuntimeMessage.pleaseInputRemark");
1648
+ }
1649
+ }
1650
+ }
1651
+ ).then(({ value }) => {
1652
+ resolve(value);
1653
+ }).catch(() => {
1654
+ resolve(false);
1655
+ });
1656
+ } else {
1657
+ resolve(true);
1658
+ }
1659
+ } else {
1660
+ resolve(true);
1661
+ }
1662
+ });
1663
+ }
1664
+ function assignTask(params) {
1665
+ const pageContext = params.pageContext;
1666
+ const pagCode = pageContext.code;
1667
+ const eventPageInfo = pagCode + "_";
1668
+ eventBus.$emit(eventPageInfo + "assign-task", params);
1669
+ }
1670
+ function doAssign(params, selectNodeInfo) {
1671
+ if (selectNodeInfo) {
1672
+ const pageContext = params.pageContext;
1673
+ const configureObj = params.configureObj;
1674
+ const backendUrl = pageContext.backendUrl;
1675
+ const path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/assigns";
1676
+ const assigneeId = selectNodeInfo.id ? selectNodeInfo.id : selectNodeInfo.ID ? selectNodeInfo.ID : null;
1677
+ const requestParam = getWorkflowSaveParams(params);
1678
+ requestParam["assigneeId"] = assigneeId;
1679
+ transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulAssign").then((result) => {
1680
+ eventUtil.doAfterClickEvent(pageContext, configureObj);
1681
+ });
1682
+ }
1683
+ }
1684
+ function getTransactTaskParam(params) {
1685
+ const pageContext = params.pageContext;
1686
+ const dataModel = pageContext.entity.data;
1687
+ const systemCode = pageContext.systemCode;
1688
+ const permissionPrefix = pageContext.code;
1689
+ const additionalParamMap = getAdditionalParamMap(pageContext);
1690
+ const dataId = dataModel.ID !== void 0 && dataModel.ID !== null ? dataModel.ID : dataModel.id;
1691
+ const requestParams = {
1692
+ beanName: pageContext.beanName,
1693
+ id: dataId,
1694
+ entity: dataModel,
1695
+ additionalParamMap,
1696
+ tableName: pageContext.tableName,
1697
+ functionCode: permissionPrefix + ".xxx",
1698
+ isWorkflowEntity: true,
1699
+ listCodesMap: pageContext.listCodesMap,
1700
+ pageCode: pageContext.code,
1701
+ pageVersion: pageContext.version,
1702
+ listCodesInitSearchForm: pageContext.listCodesInitSearchForm
1703
+ };
1704
+ requestParams["completeTaskParam"] = {
1705
+ taskId: pageContext.completeTaskParam.taskId,
1706
+ systemCode
1707
+ };
1708
+ requestParams.completeTaskParam.customTaskTitle = getWorkflowCustomTaskTitle(params);
1709
+ return requestParams;
1710
+ }
1711
+ function getWorkflowCustomTaskTitle(params) {
1712
+ var _a, _b, _c;
1713
+ let customTitle = null;
1714
+ if (((_b = (_a = params.configureObj.props.task) == null ? void 0 : _a.title) == null ? void 0 : _b.length) > 0) {
1715
+ for (let i = 0; i < params.configureObj.props.task.title.length; i++) {
1716
+ const titlePart = params.configureObj.props.task.title[i];
1717
+ if (titlePart.config) {
1718
+ if (((_c = titlePart.conditions) == null ? void 0 : _c.length) > 0) {
1719
+ const isShow = pageHelperUtil.caculateShowCondition(params.pageContext, titlePart.conditions);
1720
+ if (isShow) {
1721
+ customTitle = titlePart.config;
1722
+ break;
1723
+ }
1724
+ } else {
1725
+ customTitle = titlePart.config;
1726
+ break;
1727
+ }
1728
+ }
1729
+ }
1730
+ }
1731
+ return customTitle;
1732
+ }
1733
+ function getAdditionalParamMap(pageContext) {
1734
+ if (pageContext.entity) {
1735
+ let additionalParamMap = commonUtil.deepCopy(pageContext.entity.page);
1736
+ if (!additionalParamMap) {
1737
+ additionalParamMap = {};
1738
+ }
1739
+ const requestMap = pageContext.entity.request;
1740
+ if (requestMap) {
1741
+ Object.assign(additionalParamMap, requestMap);
1742
+ }
1743
+ return additionalParamMap;
1744
+ }
1745
+ }
1746
+ function addSignerFunc(params) {
1747
+ const pageContext = params.pageContext;
1748
+ const pagCode = pageContext.code;
1749
+ const eventPageInfo = pagCode + "_";
1750
+ eventBus.$emit(eventPageInfo + "add-signer", params);
1751
+ }
1752
+ function doAddSigner(params, selectNodeInfo) {
1753
+ if (selectNodeInfo) {
1754
+ const pageContext = params.pageContext;
1755
+ const buttonConfigureObj = params.configureObj;
1756
+ const systemCode = pageContext.systemCode;
1757
+ const backendUrl = pageContext.backendUrl;
1758
+ let path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/add-signers";
1759
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1760
+ if (!path) {
1761
+ index.ElMessage({
1762
+ showClose: true,
1763
+ type: "warning",
1764
+ message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1765
+ });
1766
+ return;
1767
+ }
1768
+ const requestParams = getTransactTaskParam(params);
1769
+ requestParams["completeTaskParam"].transactors = selectNodeInfo.loginNames.join(",").split(",");
1770
+ const request$1 = request.post(path, requestParams);
1771
+ if (request$1) {
1772
+ request$1.then((commonEntity) => {
1773
+ index.ElMessage({
1774
+ showClose: true,
1775
+ type: "success",
1776
+ message: util.getI18n().t("superPageRuntimeMessage.successfulOperation")
1777
+ });
1778
+ if (commonEntity.entity) {
1779
+ dealAfterOperate(pageContext, buttonConfigureObj, commonEntity, null, false);
1780
+ }
1781
+ eventUtil.doAfterClickEvent(pageContext, buttonConfigureObj);
1782
+ });
1783
+ }
1784
+ }
1785
+ }
1786
+ function addTransactorFunc(params) {
1787
+ const pageContext = params.pageContext;
1788
+ const pagCode = pageContext.code;
1789
+ const eventPageInfo = pagCode + "_";
1790
+ eventBus.$emit(eventPageInfo + "add-transactor", params);
1791
+ }
1792
+ function doAddTransactor(params, selectNodeInfo) {
1793
+ if (selectNodeInfo) {
1794
+ const pageContext = params.pageContext;
1795
+ const buttonConfigureObj = params.configureObj;
1796
+ const systemCode = pageContext.systemCode;
1797
+ const backendUrl = pageContext.backendUrl;
1798
+ let path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/add-transactors";
1799
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1800
+ if (!path) {
1801
+ index.ElMessage({
1802
+ showClose: true,
1803
+ type: "warning",
1804
+ message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1805
+ });
1806
+ return;
1807
+ }
1808
+ const requestParams = getTransactTaskParam(params);
1809
+ requestParams["completeTaskParam"].transactors = selectNodeInfo.loginNames.join(",").split(",");
1810
+ const request$1 = request.post(path, requestParams);
1811
+ if (request$1) {
1812
+ request$1.then((commonEntity) => {
1813
+ index.ElMessage({
1814
+ showClose: true,
1815
+ type: "success",
1816
+ message: util.getI18n().t("superPageRuntimeMessage.successfulOperation")
1817
+ });
1818
+ if (commonEntity.entity) {
1819
+ dealAfterOperate(pageContext, buttonConfigureObj, commonEntity, null, false);
1820
+ }
1821
+ eventUtil.doAfterClickEvent(pageContext, buttonConfigureObj);
1822
+ });
1823
+ }
1824
+ }
1825
+ }
1826
+ function createCopyTask(params) {
1827
+ const pageContext = params.pageContext;
1828
+ const pagCode = pageContext.code;
1829
+ const eventPageInfo = pagCode + "_";
1830
+ eventBus.$emit(eventPageInfo + "copy-task", params);
1831
+ }
1832
+ async function doCreateCopyTask(params, selectNodeInfo) {
1833
+ if (selectNodeInfo) {
1834
+ const validateRemarkResult = await validateRemark(params);
1835
+ if (validateRemarkResult) {
1836
+ const pageContext = params.pageContext;
1837
+ const buttonConfigureObj = params.configureObj;
1838
+ const systemCode = pageContext.systemCode;
1839
+ const backendUrl = pageContext.backendUrl;
1840
+ let path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/copies";
1841
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1842
+ if (!path) {
1843
+ index.ElMessage({
1844
+ showClose: true,
1845
+ type: "warning",
1846
+ message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1847
+ });
1848
+ return;
1849
+ }
1850
+ const requestParams = getTransactTaskParam(params);
1851
+ requestParams["completeTaskParam"].transactors = selectNodeInfo.loginNames.join(",").split(",");
1852
+ if (validateRemarkResult !== true) {
1853
+ requestParams["completeTaskParam"].remark = validateRemarkResult;
1854
+ }
1855
+ const request$1 = request.post(path, requestParams);
1856
+ if (request$1) {
1857
+ request$1.then((commonEntity) => {
1858
+ index.ElMessage({
1859
+ showClose: true,
1860
+ type: "success",
1861
+ message: util.getI18n().t("superPageRuntimeMessage.successfulOperation")
1862
+ });
1863
+ eventUtil.doAfterClickEvent(pageContext, buttonConfigureObj);
1864
+ });
1865
+ }
1866
+ }
1867
+ }
1868
+ }
1869
+ async function transactTask(params, requestParam, path, successMessageTip) {
1870
+ const validateOpinionResult = await validateOpinion(params);
1871
+ return new Promise((resolve, reject) => {
1872
+ var _a;
1873
+ if (validateOpinionResult) {
1874
+ const pageContext = params.pageContext;
1875
+ const systemCode = pageContext.systemCode;
1876
+ const backendUrl = pageContext.backendUrl;
1877
+ if (pageContext.completeTaskParam) {
1878
+ const opinion = validateOpinionResult === true ? (_a = pageContext.completeTaskParam) == null ? void 0 : _a.opinion : validateOpinionResult;
1879
+ requestParam["completeTaskParam"] = {
1880
+ taskId: pageContext.completeTaskParam.taskId,
1881
+ opinion
1882
+ };
1883
+ }
1884
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1885
+ if (!path) {
1886
+ index.ElMessage({
1887
+ showClose: true,
1888
+ type: "warning",
1889
+ message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1890
+ });
1891
+ return;
1892
+ }
1893
+ const request$1 = request.post(path, requestParam);
1894
+ if (request$1) {
1895
+ request$1.then((commonEntity) => {
1896
+ let result = true;
1897
+ if (commonEntity) {
1898
+ result = dealCompleteTaskParam(commonEntity, false, pageContext, params, null);
1899
+ }
1900
+ if (result === true) {
1901
+ index.ElMessage({
1902
+ showClose: true,
1903
+ type: "success",
1904
+ message: util.getI18n().t(successMessageTip)
1905
+ });
1906
+ }
1907
+ resolve(true);
1908
+ }).catch((error) => {
1909
+ reject(error);
1910
+ });
1911
+ }
1912
+ } else {
1913
+ resolve(true);
1914
+ }
1915
+ });
1916
+ }
1917
+ function drawTaskFunc(params) {
1918
+ const pageContext = params.pageContext;
1919
+ const backendUrl = pageContext.backendUrl;
1920
+ const path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/draw-tasks";
1921
+ const requestParam = getWorkflowSaveParams(params);
1922
+ return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulDrawTask");
1923
+ }
1924
+ function abandonReceiveFunc(params) {
1925
+ const pageContext = params.pageContext;
1926
+ const backendUrl = pageContext.backendUrl;
1927
+ const path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/abandon-receives";
1928
+ const requestParam = getWorkflowSaveParams(params);
1929
+ return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulAbandonReceive");
1930
+ }
1931
+ function returnToPreviousTaskFunc(params) {
1932
+ const pageContext = params.pageContext;
1933
+ const backendUrl = pageContext.backendUrl;
1934
+ const path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/return-to-previous-tasks";
1935
+ const requestParam = getWorkflowSaveParams(params);
1936
+ return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulReturnToPreviousTask");
1937
+ }
1938
+ function endInstanceFunc(params) {
1939
+ const pageContext = params.pageContext;
1940
+ const backendUrl = pageContext.backendUrl;
1941
+ const path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/end-instance";
1942
+ const requestParam = getWorkflowSaveParams(params);
1943
+ return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulEndInstance");
1944
+ }
1945
+ function returnTaskToFunc(params) {
1946
+ const pageContext = params.pageContext;
1947
+ const pagCode = pageContext.code;
1948
+ const eventPageInfo = pagCode + "_";
1949
+ eventBus.$emit(eventPageInfo + "choose-return-node", params);
1950
+ }
1951
+ function getTaskInformitions(params) {
1952
+ const pageContext = params.pageContext;
1953
+ const systemCode = pageContext.systemCode;
1954
+ const backendUrl = pageContext.backendUrl;
1955
+ const completeTaskParam = pageContext.completeTaskParam;
1956
+ let path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/returnable-task/" + completeTaskParam.taskId;
1957
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
1958
+ if (!path) {
1959
+ index.ElMessage({
1960
+ showClose: true,
1961
+ type: "warning",
1962
+ message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
1963
+ });
1964
+ return;
1965
+ }
1966
+ const permissionPrefix = pageContext.code;
1967
+ const additionalParamMap = getAdditionalParamMap(pageContext);
1968
+ const requestParams = {
1969
+ beanName: pageContext.beanName,
1970
+ additionalParamMap,
1971
+ tableName: pageContext.tableName,
1972
+ functionCode: permissionPrefix + ".xxx",
1973
+ pageCode: pageContext.code
1974
+ };
1975
+ return request.post(path, requestParams);
1976
+ }
1977
+ function doReturnTaskTo(params, selectTaskNode) {
1978
+ const pageContext = params.pageContext;
1979
+ const configureObj = params.configureObj;
1980
+ const backendUrl = pageContext.backendUrl;
1981
+ const path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/returnTaskTo";
1982
+ const requestParam = getWorkflowSaveParams(params);
1983
+ if (selectTaskNode.nodeName) {
1984
+ requestParam["returnToNodeName"] = selectTaskNode.nodeName;
1985
+ }
1986
+ if (selectTaskNode.nodeId) {
1987
+ requestParam["returnToNodeId"] = selectTaskNode.nodeId;
1988
+ }
1989
+ transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulReturnTaskTo").then((result) => {
1990
+ eventUtil.doAfterClickEvent(pageContext, configureObj);
1991
+ });
1992
+ }
1993
+ function removeSignerfunc(params) {
1994
+ const pageContext = params.pageContext;
1995
+ const pagCode = pageContext.code;
1996
+ const eventPageInfo = pagCode + "_";
1997
+ eventBus.$emit(eventPageInfo + "remove-signer", params);
1998
+ }
1999
+ function getRemoveSigner(params) {
2000
+ const pageContext = params.pageContext;
2001
+ const systemCode = pageContext.systemCode;
2002
+ const backendUrl = pageContext.backendUrl;
2003
+ let path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/get-remove-signers";
2004
+ const requestParam = getWorkflowSaveParams(params);
2005
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
2006
+ if (!path) {
2007
+ index.ElMessage({
2008
+ showClose: true,
2009
+ type: "warning",
2010
+ message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
2011
+ });
2012
+ return;
2013
+ }
2014
+ return request.post(path, requestParam);
2015
+ }
2016
+ function doRemoveSigners(params, selectRemoveTasks) {
2017
+ if (selectRemoveTasks) {
2018
+ const pageContext = params.pageContext;
2019
+ const configureObj = params.configureObj;
2020
+ const systemCode = pageContext.systemCode;
2021
+ const backendUrl = pageContext.backendUrl;
2022
+ let path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/remove-signers";
2023
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
2024
+ if (!path) {
2025
+ index.ElMessage({
2026
+ showClose: true,
2027
+ type: "warning",
2028
+ message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
2029
+ });
2030
+ return;
2031
+ }
2032
+ const taskIds = selectRemoveTasks.map((task) => task.id ? task.id : task.ID ? task.ID : null);
2033
+ const requestParam = getWorkflowSaveParams(params);
2034
+ requestParam["ids"] = taskIds;
2035
+ const request$1 = request.post(path, requestParam);
2036
+ if (request$1) {
2037
+ request$1.then((commonEntity) => {
2038
+ dealAfterOperate(pageContext, configureObj, commonEntity, "superPageRuntimeMessage.successfulOperation", false);
2039
+ eventUtil.doAfterClickEvent(pageContext, configureObj);
2040
+ });
2041
+ }
2042
+ }
2043
+ }
2044
+ function removeTransactorFunc(params) {
2045
+ const pageContext = params.pageContext;
2046
+ const pagCode = pageContext.code;
2047
+ const eventPageInfo = pagCode + "_";
2048
+ eventBus.$emit(eventPageInfo + "remove-transactor", params);
2049
+ }
2050
+ function getRemoveTransactor(params) {
2051
+ const pageContext = params.pageContext;
2052
+ const systemCode = pageContext.systemCode;
2053
+ const backendUrl = pageContext.backendUrl;
2054
+ let path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/get-remove-transactors";
2055
+ const requestParam = getWorkflowSaveParams(params);
2056
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
2057
+ if (!path) {
2058
+ index.ElMessage({
2059
+ showClose: true,
2060
+ type: "warning",
2061
+ message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
2062
+ });
2063
+ return;
2064
+ }
2065
+ return request.post(path, requestParam);
2066
+ }
2067
+ function doRemoveTransactors(params, selectRemoveTasks) {
2068
+ if (selectRemoveTasks) {
2069
+ const pageContext = params.pageContext;
2070
+ const configureObj = params.configureObj;
2071
+ const systemCode = pageContext.systemCode;
2072
+ const backendUrl = pageContext.backendUrl;
2073
+ let path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/remove-transactors";
2074
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
2075
+ if (!path) {
2076
+ index.ElMessage({
2077
+ showClose: true,
2078
+ type: "warning",
2079
+ message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
2080
+ });
2081
+ return;
2082
+ }
2083
+ const taskIds = selectRemoveTasks.map((task) => task.taskId);
2084
+ const requestParam = getWorkflowSaveParams(params);
2085
+ requestParam["ids"] = taskIds;
2086
+ const request$1 = request.post(path, requestParam);
2087
+ if (request$1) {
2088
+ request$1.then((commonEntity) => {
2089
+ dealAfterOperate(pageContext, configureObj, commonEntity, "superPageRuntimeMessage.successfulOperation", false);
2090
+ eventUtil.doAfterClickEvent(pageContext, configureObj);
2091
+ });
2092
+ }
2093
+ }
2094
+ }
2095
+ function retrieveTaskFunc(params) {
2096
+ const pageContext = params.pageContext;
2097
+ const backendUrl = pageContext.backendUrl;
2098
+ const path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/retrieves";
2099
+ const requestParam = getWorkflowSaveParams(params);
2100
+ return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulRetrieve");
2101
+ }
2102
+ function extractWorkflowFunc(params) {
2103
+ const pageContext = params.pageContext;
2104
+ const backendUrl = pageContext.backendUrl;
2105
+ let path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/initiate-extract";
2106
+ const requestParam = getWorkflowSaveParams(params);
2107
+ if (pageContext.completeTaskParam) {
2108
+ const transactors = [];
2109
+ if (params._value.loginName) {
2110
+ transactors.push(params._value.loginName);
2111
+ }
2112
+ requestParam["completeTaskParam"] = {
2113
+ taskId: pageContext.completeTaskParam.taskId,
2114
+ opinion: params._value.opinion,
2115
+ transactors,
2116
+ customTaskTitle: getWorkflowCustomTaskTitle(params)
2117
+ };
2118
+ }
2119
+ return new Promise((resolve, reject) => {
2120
+ const pageContext2 = params.pageContext;
2121
+ const systemCode = pageContext2.systemCode;
2122
+ const backendUrl2 = pageContext2.backendUrl;
2123
+ path = commonUtil.getRealRestApiPath(path, systemCode, backendUrl2, pageContext2.isTest);
2124
+ if (!path) {
2125
+ index.ElMessage({
2126
+ showClose: true,
2127
+ type: "warning",
2128
+ message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
2129
+ });
2130
+ return;
2131
+ }
2132
+ const request$1 = request.post(path, requestParam);
2133
+ if (request$1) {
2134
+ request$1.then((commonEntity) => {
2135
+ let result = true;
2136
+ if (commonEntity) {
2137
+ result = dealCompleteTaskParam(commonEntity, false, pageContext2, params, null);
2138
+ }
2139
+ if (result === true) {
2140
+ index.ElMessage({
2141
+ showClose: true,
2142
+ type: "success",
2143
+ message: util.getI18n().t("superPageRuntimeMessage.successfulInitiateExtract")
2144
+ });
2145
+ }
2146
+ resolve(true);
2147
+ }).catch((error) => {
2148
+ reject(error);
2149
+ });
2150
+ }
2151
+ });
2152
+ }
2153
+ function cancelExtractWorkflowFunc(params) {
2154
+ const pageContext = params.pageContext;
2155
+ const backendUrl = pageContext.backendUrl;
2156
+ const path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/cancel-extract";
2157
+ const requestParam = getWorkflowSaveParams(params);
2158
+ return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulCancelExtract");
2159
+ }
2160
+ function approveExtractWorkflowFunc(params) {
2161
+ const pageContext = params.pageContext;
2162
+ const backendUrl = pageContext.backendUrl;
2163
+ const path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/approve-extract";
2164
+ const requestParam = getWorkflowSaveParams(params);
2165
+ return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulOperation");
2166
+ }
2167
+ function refuseExtractWorkflowFunc(params) {
2168
+ const pageContext = params.pageContext;
2169
+ const backendUrl = pageContext.backendUrl;
2170
+ const path = commonUtil.getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/refuse-extract";
2171
+ const requestParam = getWorkflowSaveParams(params);
2172
+ return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulOperation");
2173
+ }
2174
+ function lineEditCreateFunc(params) {
2175
+ const pageContext = params.pageContext;
2176
+ const tableUuid = params["tableUuid"];
2177
+ const gridRef = globalRefs.getComponentRef(pageContext, tableUuid);
2178
+ if (gridRef) {
2179
+ params.getDefaultValueFunc = pageInitUtil.getDefaultValue;
2180
+ gridRef.createRow(params.listCode, {}, params);
2181
+ }
2182
+ }
2183
+ function printLabel(params) {
2184
+ let templateUuid = null;
2185
+ try {
2186
+ if (params.menuItem) {
2187
+ templateUuid = params.menuItem.templateUuid;
2188
+ } else {
2189
+ templateUuid = params.configureObj.props.base.template[0].templateUuid;
2190
+ }
2191
+ if (!templateUuid) {
2192
+ throw new Error("未找到模板");
2193
+ }
2194
+ } catch (e) {
2195
+ console.error("打印标签失败,未在配置中找到找到模板", e, params);
2196
+ }
2197
+ printLabel$1.default.printLabel(params, templateUuid);
2198
+ }
2199
+ function isVisibleWorkflowButton(standardEventName, buttonInfo, completeTaskParam, btnConfigure, data) {
2200
+ let isVisible = false;
2201
+ if (standardEventName && buttonInfo) {
2202
+ if (standardEventName === "workflowSave") {
2203
+ isVisible = isVisibleWorkflowSave(buttonInfo);
2204
+ } else if (standardEventName === "workflowStart") {
2205
+ isVisible = isVisibleWorkflowStart(buttonInfo, data);
2206
+ } else if (standardEventName === "submitProcess") {
2207
+ isVisible = isVisibleSubmitProcess(buttonInfo);
2208
+ } else if (standardEventName === "submitTask") {
2209
+ isVisible = isVisibleSubmitTask(buttonInfo);
2210
+ } else if (standardEventName === "drawTask") {
2211
+ isVisible = isVisibleDrawTask(buttonInfo);
2212
+ } else if (standardEventName === "abandonReceive") {
2213
+ isVisible = isVisibleAbandonReceive(buttonInfo);
2214
+ } else if (standardEventName === "approve" || standardEventName === "refuse") {
2215
+ isVisible = isVisibleApproveOrRefuse(buttonInfo);
2216
+ } else if (standardEventName === "readed") {
2217
+ isVisible = isVisibleReaded(buttonInfo);
2218
+ } else if (standardEventName === "assign") {
2219
+ isVisible = isVisibleAssignTask(buttonInfo);
2220
+ } else if (standardEventName === "copyTask") {
2221
+ isVisible = isVisibleCopyTask(buttonInfo, btnConfigure);
2222
+ } else if (standardEventName === "addSigner") {
2223
+ isVisible = isVisibleAddSigner(buttonInfo);
2224
+ } else if (standardEventName === "removeSigner") {
2225
+ isVisible = isVisibleRemoveSigner(buttonInfo);
2226
+ } else if (standardEventName === "retrieveTask") {
2227
+ isVisible = isVisibleRetrieveTask(buttonInfo);
2228
+ } else if (standardEventName === "agreement" || standardEventName === "oppose") {
2229
+ isVisible = isVisibleAgreementOrOppose(buttonInfo);
2230
+ } else if (standardEventName === "kiken") {
2231
+ isVisible = isVisibleKiken(buttonInfo);
2232
+ } else if (standardEventName === "extractWorkflow") {
2233
+ isVisible = isVisibleExtractWorkflow(buttonInfo, completeTaskParam, data);
2234
+ } else if (standardEventName === "cancelExtractWorkflow") {
2235
+ isVisible = isVisibleCancelExtractWorkflow(buttonInfo, completeTaskParam, data);
2236
+ } else if (standardEventName === "approveExtractWorkflow") {
2237
+ isVisible = isVisibleApproveExtractWorkflow(buttonInfo);
2238
+ } else if (standardEventName === "refuseExtractWorkflow") {
2239
+ isVisible = isVisibleApproveExtractWorkflow(buttonInfo);
2240
+ } else if (standardEventName === "addTransactor") {
2241
+ isVisible = isVisibleAddTransactor(buttonInfo);
2242
+ } else if (standardEventName === "removeTransactor") {
2243
+ isVisible = isVisibleRemoveTransactor(buttonInfo);
2244
+ } else if (isShowOtherWorkflowBtn(buttonInfo, completeTaskParam)) {
2245
+ if (standardEventName === "returnToPreviousTask") {
2246
+ isVisible = isVisibleReturnToPreviousTask(buttonInfo);
2247
+ } else {
2248
+ isVisible = true;
2249
+ }
2250
+ }
2251
+ }
2252
+ return isVisible;
2253
+ }
2254
+ function isVisibleWorkflowSave(buttonInfo) {
2255
+ if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["processState"] === null || buttonInfo["processState"] === "UNSUBMIT" && buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["theTransactor"] === true) {
2256
+ if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["showButtonSave"] === true) {
2257
+ return true;
2258
+ }
2259
+ }
2260
+ if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT" && buttonInfo["theTransactor"] === true) {
2261
+ 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")) {
2262
+ return true;
2263
+ }
2264
+ }
2265
+ return false;
2266
+ }
2267
+ function isVisibleWorkflowStart(buttonInfo, data) {
2268
+ if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["processState"] === null || data && !data.workflow_id && !data.WORKFLOW_ID) {
2269
+ return true;
2270
+ }
2271
+ return false;
2272
+ }
2273
+ function isVisibleSubmitProcess(buttonInfo) {
2274
+ if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["processState"] === null || buttonInfo["processState"] === "UNSUBMIT" && buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["theTransactor"] === true) {
2275
+ if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["showButtonSave"] === true) {
2276
+ return true;
2277
+ }
2278
+ }
2279
+ return false;
2280
+ }
2281
+ function isVisibleSubmitTask(buttonInfo) {
2282
+ if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT" && buttonInfo["theTransactor"] === true) {
2283
+ if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] === "EDIT") {
2284
+ return true;
2285
+ }
2286
+ }
2287
+ return false;
2288
+ }
2289
+ function isVisibleDrawTask(buttonInfo) {
2290
+ if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
2291
+ if (buttonInfo["active"] && (buttonInfo["active"] === "DRAW_WAIT" || buttonInfo["active"] === "DEPT_DRAW_WAIT") && buttonInfo["showButtonDraw"]) {
2292
+ return true;
2293
+ }
2294
+ }
2295
+ return false;
2296
+ }
2297
+ function isVisibleAbandonReceive(buttonInfo) {
2298
+ if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
2299
+ if ((buttonInfo["drawTask"] && buttonInfo["active"] === "WAIT_TRANSACT" || buttonInfo["canAbandonDeptTask"] && buttonInfo["active"] === "WAIT_TRANSACT") && buttonInfo["showButtonAbandon"]) {
2300
+ return true;
2301
+ }
2302
+ }
2303
+ return false;
2304
+ }
2305
+ function isVisibleApproveOrRefuse(buttonInfo) {
2306
+ if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
2307
+ if (buttonInfo["active"] === "WAIT_TRANSACT" && (buttonInfo["processingMode"] === "APPROVE" || buttonInfo["processingMode"] === "COUNTERSIGN")) {
2308
+ return true;
2309
+ }
2310
+ }
2311
+ return false;
2312
+ }
2313
+ function isVisibleAddSigner(buttonInfo) {
2314
+ if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
2315
+ if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] === "COUNTERSIGN" && buttonInfo["showButtonAddCounter"]) {
2316
+ return true;
2317
+ }
2318
+ }
2319
+ return false;
2320
+ }
2321
+ function isVisibleRemoveSigner(buttonInfo) {
2322
+ if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
2323
+ if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] === "COUNTERSIGN" && buttonInfo["showButtonDelCounter"]) {
2324
+ return true;
2325
+ }
2326
+ }
2327
+ return false;
2328
+ }
2329
+ function isVisibleAddTransactor(buttonInfo) {
2330
+ if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
2331
+ if ((buttonInfo["active"] === "WAIT_TRANSACT" || buttonInfo["active"] === "DRAW_WAIT") && buttonInfo["processingMode"] !== "COUNTERSIGN") {
2332
+ return true;
2333
+ }
2334
+ }
2335
+ return false;
2336
+ }
2337
+ function isVisibleRemoveTransactor(buttonInfo) {
2338
+ if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
2339
+ if ((buttonInfo["active"] === "WAIT_TRANSACT" || buttonInfo["active"] === "DRAW_WAIT") && buttonInfo["processingMode"] !== "COUNTERSIGN") {
2340
+ return true;
2341
+ }
2342
+ }
2343
+ return false;
2344
+ }
2345
+ function isVisibleAgreementOrOppose(buttonInfo) {
2346
+ if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
2347
+ if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] === "VOTE") {
2348
+ return true;
2349
+ }
2350
+ }
2351
+ return false;
2352
+ }
2353
+ function isVisibleKiken(buttonInfo) {
2354
+ if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
2355
+ if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] === "VOTE" && buttonInfo["showButtonKiken"]) {
2356
+ return true;
2357
+ }
2358
+ }
2359
+ return false;
2360
+ }
2361
+ function isVisibleCopyTask(buttonInfo, btnConfigure) {
2362
+ let isVisible = false;
2363
+ if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
2364
+ if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] !== "TYPE_READ" && buttonInfo["showButtonCopy"]) {
2365
+ isVisible = true;
2366
+ }
2367
+ }
2368
+ if (btnConfigure) {
2369
+ if (!isVisible) {
2370
+ btnConfigure.props.base.state = "hidden";
2371
+ } else {
2372
+ btnConfigure.props.base.state = "";
2373
+ }
2374
+ }
2375
+ return true;
2376
+ }
2377
+ function isVisibleAssignTask(buttonInfo) {
2378
+ if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
2379
+ if (buttonInfo["processingMode"] !== "TYPE_READ" && (buttonInfo["active"] === "WAIT_TRANSACT" || buttonInfo["active"] === "DRAW_WAIT")) {
2380
+ return true;
2381
+ }
2382
+ }
2383
+ return false;
2384
+ }
2385
+ function isVisibleRetrieveTask(buttonInfo) {
2386
+ if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
2387
+ if (showRetrieve(buttonInfo)) {
2388
+ return true;
2389
+ }
2390
+ }
2391
+ return false;
2392
+ }
2393
+ function showRetrieve(buttonInfo) {
2394
+ if (buttonInfo["active"] !== "COMPLETED") {
2395
+ return false;
2396
+ }
2397
+ if (buttonInfo["processingMode"] === "TYPE_READ") {
2398
+ return false;
2399
+ }
2400
+ if (!buttonInfo["showButtonGetBack"]) {
2401
+ return false;
2402
+ }
2403
+ return true;
2404
+ }
2405
+ function isVisibleReaded(buttonInfo) {
2406
+ if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] === "TYPE_READ") {
2407
+ return true;
2408
+ }
2409
+ return false;
2410
+ }
2411
+ function isVisibleReturnToPreviousTask(buttonInfo) {
2412
+ if (buttonInfo["rebuttable"]) {
2413
+ return true;
2414
+ }
2415
+ return false;
2416
+ }
2417
+ function isVisibleExtractWorkflow(buttonInfo, completeTaskParam, data) {
2418
+ var _a;
2419
+ const currentUser = auth.getCurrentUser();
2420
+ const loginName = currentUser ? currentUser.loginName : null;
2421
+ if (buttonInfo == null ? void 0 : buttonInfo.processState) {
2422
+ if (((_a = completeTaskParam == null ? void 0 : completeTaskParam.firstNodeInfo) == null ? void 0 : _a.nodeId) === (data == null ? void 0 : data.CURRENT_ACTIVITY_ID)) {
2423
+ return false;
2424
+ }
2425
+ if ((buttonInfo == null ? void 0 : buttonInfo.processState) !== "END" && (buttonInfo == null ? void 0 : buttonInfo.processState) !== "EXTRACT" && (buttonInfo == null ? void 0 : buttonInfo.processState) !== "MANUAL_END" && data && (data.creator === loginName || data.CREATOR === loginName)) {
2426
+ return true;
2427
+ }
2428
+ }
2429
+ return false;
2430
+ }
2431
+ function isVisibleCancelExtractWorkflow(buttonInfo, completeTaskParam, data) {
2432
+ const currentUser = auth.getCurrentUser();
2433
+ const loginName = currentUser ? currentUser.loginName : null;
2434
+ if ((buttonInfo == null ? void 0 : buttonInfo.processState) === "EXTRACT" && data && (data.creator === loginName || data.CREATOR === loginName)) {
2435
+ return true;
2436
+ }
2437
+ return false;
2438
+ }
2439
+ function isVisibleApproveExtractWorkflow(buttonInfo, completeTaskParam, data) {
2440
+ if (buttonInfo["processState"] && buttonInfo["processState"] === "EXTRACT" && buttonInfo["active"] === "WAIT_TRANSACT") {
2441
+ return true;
2442
+ }
2443
+ return false;
2444
+ }
2445
+ function isShowOtherWorkflowBtn(buttonInfo, completeTaskParam) {
2446
+ return buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT" && buttonInfo["processingMode"] !== "TYPE_READ" && !isTaskComplete(completeTaskParam);
2447
+ }
2448
+ function isTaskComplete(completeTaskParam) {
2449
+ const taskParam = completeTaskParam;
2450
+ let taskComplete = true;
2451
+ if (taskParam) {
2452
+ taskComplete = taskParam.taskComplete;
2453
+ }
2454
+ return taskComplete;
2455
+ }
2456
+ function cacheFormDataId(dataId, pageContext) {
2457
+ const additionalParamMap = getAdditionalParamMap(pageContext);
2458
+ if (dataId && additionalParamMap) {
2459
+ auth.setSessionCache(additionalParamMap._t_ + "_id", dataId);
2460
+ }
2461
+ }
2462
+ function refreshPage(pageContext, id) {
2463
+ if (!pageContext.entity.page) {
2464
+ pageContext.entity.page = {};
2465
+ }
2466
+ pageContext.entity.page["_isRefresh"] = true;
2467
+ getFormData(pageContext, id).then((commonEntity) => {
2468
+ pageContext.isRefresh = true;
2469
+ });
2470
+ }
2471
+ function getFormData(pageContext, id, isNeedId) {
2472
+ const pageType = pageContext.pageType;
2473
+ if (pageType && pageType === "form") {
2474
+ console.log("获取表单数据getData--pageContext=", pageContext);
2475
+ pageContext.canClick = false;
2476
+ const isWorkflow = commonUtil.isWorkflowPage(pageContext);
2477
+ if (isWorkflow) {
2478
+ return getWorkflowFormData(pageContext, id, isNeedId);
2479
+ } else {
2480
+ return getCommonFormData(pageContext, id, isNeedId);
2481
+ }
2482
+ } else {
2483
+ return new Promise((resolve, reject) => {
2484
+ resolve(true);
2485
+ });
2486
+ }
2487
+ }
2488
+ function getCommonFormData(pageContext, id, isNeedId) {
2489
+ return new Promise((resolve, reject) => {
2490
+ const systemCode = pageContext.systemCode;
2491
+ const pageCode = pageContext.code;
2492
+ const pageVersion = pageContext.version;
2493
+ const additionalParamMap = getAdditionalParamMap(pageContext);
2494
+ let dataId = id ? id : null;
2495
+ let ids2 = id ? [id] : null;
2496
+ if (isNeedId === void 0 || isNeedId) {
2497
+ if (!dataId) {
2498
+ dataId = additionalParamMap && additionalParamMap.id ? additionalParamMap.id : null;
2499
+ }
2500
+ if (!ids2) {
2501
+ ids2 = additionalParamMap ? additionalParamMap.ids : null;
2502
+ }
2503
+ } else {
2504
+ dataId = null;
2505
+ ids2 = null;
2506
+ additionalParamMap._id = additionalParamMap.id;
2507
+ additionalParamMap.id = null;
2508
+ }
2509
+ const taskId = additionalParamMap ? additionalParamMap.taskId : null;
2510
+ const permissionPrefix = pageCode;
2511
+ console.log("getCommonFormData-----pageContext=", pageContext);
2512
+ const backendUrl = commonUtil.getBaseUrl(pageContext.backendUrl, pageContext.isTest);
2513
+ const param = {
2514
+ pageCode,
2515
+ pageVersion,
2516
+ tableName: pageContext.tableName,
2517
+ formNoRuleCode: pageContext.formNoRuleCode,
2518
+ id: dataId,
2519
+ systemCode,
2520
+ functionCode: permissionPrefix + ".gets",
2521
+ listCodesMap: pageContext.listCodesMap,
2522
+ listCodesInitSearchForm: pageContext.listCodesInitSearchForm
2523
+ };
2524
+ if (!param.id && additionalParamMap && additionalParamMap._t_ && auth.getSessionCache(additionalParamMap._t_ + "_id")) {
2525
+ param.id = auth.getSessionCache(additionalParamMap._t_ + "_id");
2526
+ }
2527
+ if (ids2) {
2528
+ param["ids"] = formatAdditionalParamMapIds(ids2);
2529
+ }
2530
+ if (pageContext.notIdInitializationList) {
2531
+ param["noIdAndTaskIdInitSetting"] = JSON.stringify(pageContext.notIdInitializationList);
2532
+ }
2533
+ if (additionalParamMap) {
2534
+ param["additionalParamMap"] = additionalParamMap;
2535
+ }
2536
+ if (pageContext.beanName) {
2537
+ param["beanName"] = pageContext.beanName;
2538
+ }
2539
+ if (taskId) {
2540
+ param["taskId"] = taskId;
2541
+ }
2542
+ console.log("getCommonFormData---listCodesMap=", pageContext.listCodesMap);
2543
+ if ((!pageContext.listCodesMap || Object.keys(pageContext.listCodesMap).length === 0) && pageContext.tableUuids) {
2544
+ const listCodesMap = {};
2545
+ pageContext.tableUuids.forEach((tableUuid) => {
2546
+ const listCode = commonUtil.getListCode(pageCode, pageVersion, tableUuid);
2547
+ listCodesMap[listCode] = listCode;
2548
+ });
2549
+ param["listCodesMap"] = listCodesMap;
2550
+ }
2551
+ if (pageContext.refercePropMap) {
2552
+ param["refercePropMap"] = pageContext.refercePropMap;
2553
+ }
2554
+ const urlForView = backendUrl + "/dsc/commons/gets";
2555
+ const pageContextUtil = pageStore.usePageContextStore();
2556
+ pageContextUtil.restorePageLoadState();
2557
+ eventUtil.handleEvent(null, pageContext, pageContext, "beforeFormLoadData");
2558
+ request.post(urlForView, param).then((commonEntity) => {
2559
+ if (commonEntity) {
2560
+ pageContext.entity.data = commonEntity.entity;
2561
+ pageContext.initFormNo = commonEntity.formNo;
2562
+ }
2563
+ const customRules = pageContext.customRules;
2564
+ const formRules = pageContext.rules;
2565
+ const newFormRules = validatorUtil.packageCustomRules(customRules, formRules);
2566
+ pageContext.rules = newFormRules;
2567
+ pageContext.canClick = true;
2568
+ eventUtil.handleEvent(null, pageContext, pageContext, "afterFormLoadData");
2569
+ pageContextUtil.setFormPageDataLoadState(true);
2570
+ resolve(commonEntity);
2571
+ }).catch((error) => {
2572
+ pageContext.canClick = true;
2573
+ reject(error);
2574
+ });
2575
+ });
2576
+ }
2577
+ function getWorkflowFormData(pageContext, id, isNeedId) {
2578
+ return new Promise((resolve, reject) => {
2579
+ const systemCode = pageContext.systemCode;
2580
+ const pageCode = pageContext.code;
2581
+ const pageVersion = pageContext.version;
2582
+ const additionalParamMap = getAdditionalParamMap(pageContext);
2583
+ let dataId = id ? id : null;
2584
+ let ids2 = id ? [id] : null;
2585
+ if (isNeedId === void 0 || isNeedId) {
2586
+ if (!dataId) {
2587
+ dataId = additionalParamMap && additionalParamMap.id ? additionalParamMap.id : null;
2588
+ }
2589
+ if (!ids2) {
2590
+ ids2 = additionalParamMap ? additionalParamMap.ids : null;
2591
+ }
2592
+ } else {
2593
+ dataId = null;
2594
+ ids2 = null;
2595
+ additionalParamMap._id = additionalParamMap.id;
2596
+ additionalParamMap.id = null;
2597
+ }
2598
+ const taskId = additionalParamMap ? additionalParamMap.taskId : null;
2599
+ const permissionPrefix = pageCode;
2600
+ const param = {
2601
+ pageCode,
2602
+ pageVersion,
2603
+ tableName: pageContext.tableName,
2604
+ formNoRuleCode: pageContext.formNoRuleCode,
2605
+ isWorkflowEntity: true,
2606
+ systemCode,
2607
+ functionCode: permissionPrefix + ".workflowGets",
2608
+ listCodesMap: pageContext.listCodesMap,
2609
+ listCodesInitSearchForm: pageContext.listCodesInitSearchForm
2610
+ };
2611
+ console.log("getWorkflowFormData---listCodesMap=", pageContext.listCodesMap);
2612
+ if ((!pageContext.listCodesMap || Object.keys(pageContext.listCodesMap).length === 0) && pageContext.tableUuids) {
2613
+ const listCodesMap = {};
2614
+ pageContext.tableUuids.forEach((tableUuid) => {
2615
+ const listCode = commonUtil.getListCode(pageCode, pageVersion, tableUuid);
2616
+ listCodesMap[listCode] = listCode;
2617
+ });
2618
+ param["listCodesMap"] = listCodesMap;
2619
+ }
2620
+ if (ids2) {
2621
+ param["ids"] = formatAdditionalParamMapIds(ids2);
2622
+ }
2623
+ if (taskId) {
2624
+ param["taskId"] = taskId;
2625
+ } else if (dataId) {
2626
+ param["id"] = dataId;
2627
+ } else {
2628
+ if (additionalParamMap && additionalParamMap._t_ && auth.getSessionCache(additionalParamMap._t_ + "_id")) {
2629
+ param["id"] = auth.getSessionCache(additionalParamMap._t_ + "_id");
2630
+ }
2631
+ if (pageContext.notIdInitializationList) {
2632
+ param["noIdAndTaskIdInitSetting"] = JSON.stringify(pageContext.notIdInitializationList);
2633
+ }
2634
+ }
2635
+ if (additionalParamMap) {
2636
+ param["additionalParamMap"] = additionalParamMap;
2637
+ }
2638
+ if (pageContext.beanName) {
2639
+ param["beanName"] = pageContext.beanName;
2640
+ }
2641
+ if (pageContext.refercePropMap) {
2642
+ param["refercePropMap"] = pageContext.refercePropMap;
2643
+ }
2644
+ const baseUrl = commonUtil.getBaseUrl(pageContext.backendUrl, pageContext.isTest);
2645
+ const urlForView = baseUrl + "/dsc/workflow-commons/gets";
2646
+ const pageContextUtil = pageStore.usePageContextStore();
2647
+ pageContextUtil.restorePageLoadState();
2648
+ eventUtil.handleEvent(null, pageContext, pageContext, "beforeFormLoadData");
2649
+ request.post(urlForView, param).then((commonEntity) => {
2650
+ pageContext.definitionId = commonEntity.definitionId;
2651
+ pageContext.entity.task = commonEntity.taskParamMap;
2652
+ pageContext.dataTypeMaps = commonEntity.dataTypeMap;
2653
+ dealCompleteTaskParam(commonEntity, true, pageContext);
2654
+ pageContext.workflowRules = validatorUtil.getWorkflowRules(pageContext);
2655
+ const pageType = pageContext.pageType;
2656
+ if (pageType && pageType === "form") {
2657
+ changePermissionListToMap(pageContext);
2658
+ }
2659
+ pageContext.canClick = true;
2660
+ eventUtil.handleEvent(null, pageContext, pageContext, "afterFormLoadData");
2661
+ pageContextUtil.setFormPageDataLoadState(true);
2662
+ resolve(commonEntity);
2663
+ }).catch((error) => {
2664
+ pageContext.canClick = true;
2665
+ reject(error);
2666
+ });
2667
+ });
2668
+ }
2669
+ function formatAdditionalParamMapIds(ids2) {
2670
+ if (ids2) {
2671
+ if (typeof ids2 === "string") {
2672
+ ids2 = ids2.split(",");
2673
+ } else if (typeof ids2 === "number") {
2674
+ ids2 = [ids2];
2675
+ } else ;
2676
+ }
2677
+ return ids2;
2678
+ }
2679
+ function changePermissionListToMap(pageContext) {
2680
+ changeFieldPermissionToMap(pageContext);
2681
+ changeActionPermissionToMap(pageContext);
2682
+ }
2683
+ function changeFieldPermissionToMap(pageContext) {
2684
+ const fieldPermissionMap = /* @__PURE__ */ new Map();
2685
+ const fieldPermissions = pageContext.fieldPermissions;
2686
+ if (typeof fieldPermissions !== "undefined") {
2687
+ for (let i = 0; i < fieldPermissions.length; i++) {
2688
+ const prop = fieldPermissions[i].name;
2689
+ if (prop) {
2690
+ if (prop.indexOf("$") === 0 && prop.indexOf(".") > 0) {
2691
+ const fieldPermissionOrg = fieldPermissions[i];
2692
+ const fieldPermission = JSON.parse(JSON.stringify(fieldPermissionOrg));
2693
+ const subModelName = prop.substring(1, prop.indexOf("."));
2694
+ const subProp = prop.substring(prop.indexOf(".") + 1);
2695
+ fieldPermission.name = subProp;
2696
+ if (fieldPermission && fieldPermission.name === "all_fields") {
2697
+ if (fieldPermission.canEdit === false) {
2698
+ if (fieldPermission.rowIndexes) {
2699
+ fieldPermissionMap.set(subModelName, [
2700
+ {
2701
+ name: "all_fields",
2702
+ canEdit: false,
2703
+ rowIndexes: fieldPermission.rowIndexes
2704
+ }
2705
+ ]);
2706
+ } else {
2707
+ fieldPermissionMap.set(subModelName, [{ name: "all_fields", canEdit: false }]);
2708
+ }
2709
+ } else {
2710
+ if (fieldPermission.rowIndexes) {
2711
+ fieldPermissionMap.set(subModelName, [
2712
+ {
2713
+ name: "all_fields",
2714
+ canEdit: true,
2715
+ rowIndexes: fieldPermission.rowIndexes
2716
+ }
2717
+ ]);
2718
+ } else {
2719
+ fieldPermissionMap.set(subModelName, [{ name: "all_fields", canEdit: true }]);
2720
+ }
2721
+ }
2722
+ } else {
2723
+ let subTableFieldPermission = fieldPermissionMap.get(subModelName);
2724
+ if (subTableFieldPermission) {
2725
+ subTableFieldPermission.push(fieldPermission);
2726
+ } else {
2727
+ subTableFieldPermission = [];
2728
+ subTableFieldPermission.push(fieldPermission);
2729
+ }
2730
+ fieldPermissionMap.set(subModelName, subTableFieldPermission);
2731
+ }
2732
+ } else {
2733
+ fieldPermissionMap.set(prop, fieldPermissions[i]);
2734
+ }
2735
+ }
2736
+ }
2737
+ }
2738
+ pageContext.fieldPermissionMap = fieldPermissionMap;
2739
+ }
2740
+ function changeActionPermissionToMap(pageContext) {
2741
+ const fieldPermissionMap = pageContext.fieldPermissionMap;
2742
+ const actionPermissionMap = /* @__PURE__ */ new Map();
2743
+ const actionPermissions = pageContext.actionPermissions;
2744
+ if (typeof actionPermissions !== "undefined" && actionPermissions !== null) {
2745
+ const subModelNames = Object.keys(actionPermissions);
2746
+ subModelNames.forEach((subModelName) => {
2747
+ const oneTableActionPermission = actionPermissions[subModelName];
2748
+ const subTableFieldPermission = fieldPermissionMap.get(subModelName);
2749
+ if (subTableFieldPermission && subTableFieldPermission.length > 0 && subTableFieldPermission[0].name === "all_fields" && subTableFieldPermission[0].canEdit === false) {
2750
+ oneTableActionPermission.canUpdate = false;
2751
+ oneTableActionPermission.canAdd = false;
2752
+ } else {
2753
+ if (!oneTableActionPermission || Object.keys(oneTableActionPermission.deleteCondition).length === 0) {
2754
+ oneTableActionPermission.deleteCondition = null;
2755
+ }
2756
+ if (!oneTableActionPermission || Object.keys(oneTableActionPermission.updateCondition).length === 0) {
2757
+ oneTableActionPermission.updateCondition = null;
2758
+ }
2759
+ const canUpdate = oneTableActionPermission.canUpdate;
2760
+ const updateRowIndexes = oneTableActionPermission.updateRowIndexes;
2761
+ if (canUpdate !== void 0 && canUpdate === false && updateRowIndexes !== void 0 && updateRowIndexes !== null && updateRowIndexes.length > 0) {
2762
+ fieldPermissionMap.set(subModelName, [
2763
+ {
2764
+ name: "all_fields",
2765
+ canEdit: false,
2766
+ rowIndexes: updateRowIndexes
2767
+ }
2768
+ ]);
2769
+ }
2770
+ }
2771
+ actionPermissionMap.set(subModelName, oneTableActionPermission);
2772
+ });
2773
+ }
2774
+ pageContext.actionPermissionMap = actionPermissionMap;
2775
+ }
2776
+ function getButtonAutoSetValueData(configureObj) {
2777
+ const autoSetValueData = configureObj.props.setValueList;
2778
+ if (autoSetValueData) {
2779
+ if (commonUtil.isArrayFn(autoSetValueData) && autoSetValueData.length > 0) {
2780
+ return JSON.stringify(autoSetValueData);
2781
+ } else if (typeof autoSetValueData === "string" && autoSetValueData !== "[]") {
2782
+ return autoSetValueData;
2783
+ }
2784
+ }
2785
+ return null;
2786
+ }
2787
+ function saveChartConditionBase(pageContext, conditionName) {
2788
+ const entityData = pageContext.entity ? pageContext.entity : {};
2789
+ const queryCondition = {
2790
+ data: entityData.data,
2791
+ page: entityData.page
2792
+ };
2793
+ const pageCode = pageContext.code;
2794
+ const param = {
2795
+ pageCode,
2796
+ queryCondition: JSON.stringify(queryCondition),
2797
+ name: conditionName
2798
+ };
2799
+ const path = window["$vueApp"].config.globalProperties.baseAPI + "/component/chart-search-condition";
2800
+ return request.post(path, param);
2801
+ }
2802
+ function listChartConditions(pageContext) {
2803
+ const pageCode = pageContext.code;
2804
+ const path = window["$vueApp"].config.globalProperties.baseAPI + "/component/chart-search-condition/list/" + pageCode;
2805
+ return request.get(path);
2806
+ }
2807
+ function deleteChartCondition(conditionId) {
2808
+ const path = window["$vueApp"].config.globalProperties.baseAPI + "/component/chart-search-condition/" + conditionId;
2809
+ return request.delete(path);
2810
+ }
2811
+ exports.dealAfterOperate = dealAfterOperate;
2812
+ exports.dealCompleteTaskParam = dealCompleteTaskParam;
2813
+ exports.deleteChartCondition = deleteChartCondition;
2814
+ exports.doAddSigner = doAddSigner;
2815
+ exports.doAddTransactor = doAddTransactor;
2816
+ exports.doAssign = doAssign;
2817
+ exports.doCreateCopyTask = doCreateCopyTask;
2818
+ exports.doImportFinally = doImportFinally;
2819
+ exports.doRemoveSigners = doRemoveSigners;
2820
+ exports.doRemoveTransactors = doRemoveTransactors;
2821
+ exports.doReturnTaskTo = doReturnTaskTo;
2822
+ exports.exportFormReport = exportFormReport;
2823
+ exports.getAdditionalParamMap = getAdditionalParamMap;
2824
+ exports.getFormData = getFormData;
2825
+ exports.getRemoveSigner = getRemoveSigner;
2826
+ exports.getRemoveTransactor = getRemoveTransactor;
2827
+ exports.getSaveFormRequest = getSaveFormRequest;
2828
+ exports.getSaveFormRequestWithRow = getSaveFormRequestWithRow;
2829
+ exports.getTaskInformitions = getTaskInformitions;
2830
+ exports.isVisibleWorkflowButton = isVisibleWorkflowButton;
2831
+ exports.judgeDataNumber = judgeDataNumber;
2832
+ exports.listChartConditions = listChartConditions;
2833
+ exports.refreshFormOrListPage = refreshFormOrListPage;
2834
+ exports.refreshPage = refreshPage;
2835
+ exports.saveChartConditionBase = saveChartConditionBase;
2836
+ exports.standardEvents = standardEvents;
2837
+ exports.updateValuesWhenCloseDialog = updateValuesWhenCloseDialog;