cloud-web-corejs 1.1.0-dev.6 → 1.1.0-dev.61

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/README.md +38 -0
  2. package/bin/core-resources.js +16 -0
  3. package/bin/create-child-app.js +34 -0
  4. package/docs/child-app/README.md +95 -0
  5. package/docs/child-app/activiti-resources.md +63 -0
  6. package/docs/child-app/generate-prompt.md +55 -0
  7. package/docs/child-app/luckysheet-resources.md +80 -0
  8. package/docs/child-app/public-resources-plan.md +288 -0
  9. package/docs/child-app/resources-implementation.md +101 -0
  10. package/docs/child-app/tinymce-resources.md +88 -0
  11. package/docs/child-app/validation.md +34 -0
  12. package/docs/qiankun/346/216/245/345/205/245/345/215/217/350/256/256.md +298 -0
  13. package/docs/qiankun/350/257/246/346/203/205/346/211/277/350/275/275/345/255/220/345/272/224/347/224/250/345/257/271/346/216/245/346/270/205/345/215/225.md +111 -0
  14. package/package.json +29 -4
  15. package/resource-tools/index.js +126 -0
  16. package/src/app-bootstrap.js +531 -0
  17. package/src/app-bootstrap.sync.js +502 -0
  18. package/src/boot-assets.legacy.js +13 -0
  19. package/src/boot-assets.next.js +7 -0
  20. package/src/components/Qrcode/fileParse.vue +11 -0
  21. package/src/components/Tinymce/dynamicLoadScript.js +51 -59
  22. package/src/components/Tinymce/index.vue +382 -336
  23. package/src/components/Tinymce/mce-chrome.scss +150 -0
  24. package/src/components/VabUpload/image-viewer.vue +18 -10
  25. package/src/components/VabUpload/index.js +11 -4
  26. package/src/components/VabUpload/index.vue +1 -1
  27. package/src/components/VabUpload/mixins/fileLibraryDialog.js +2 -0
  28. package/src/components/VabUpload/mixins.js +72 -40
  29. package/src/components/VabUpload/partUploadConfig.js +95 -0
  30. package/src/components/VabUpload/privateProfileDialogMixins.js +2 -0
  31. package/src/components/VabUpload/style.scss +282 -0
  32. package/src/components/VabUpload/view.vue +19 -18
  33. package/src/components/baseArea/index.vue +2 -2
  34. package/src/components/baseInputExport/mixins.js +1 -6
  35. package/src/components/bizTab/BizTabListPage.vue +66 -33
  36. package/src/components/bizTab/README.md +3 -1
  37. package/src/components/bizTab/bizBillDetailMixin.js +2 -0
  38. package/src/components/code-editor/ace-chrome.scss +17 -0
  39. package/src/components/code-editor/index.vue +361 -340
  40. package/src/components/errorMsg/index.vue +142 -13
  41. package/src/components/errorMsg/mixins.js +53 -0
  42. package/src/components/excelExport/conditionExportConfig.js +112 -0
  43. package/src/components/excelExport/exportColumnMemory.js +118 -0
  44. package/src/components/excelExport/exportFieldDialog.vue +50 -38
  45. package/src/components/excelExport/exportType.js +8 -0
  46. package/src/components/excelExport/index.js +30 -13
  47. package/src/components/excelExport/index.vue +7 -1
  48. package/src/components/excelExport/mixins.js +782 -293
  49. package/src/components/excelImport/index.vue +156 -156
  50. package/src/components/excelImport/mixins.js +888 -834
  51. package/src/components/fileLibrary/mixins/indexMixins.js +2 -0
  52. package/src/components/fileLibrary/style.scss +579 -0
  53. package/src/components/formDialog/index.vue +11 -8
  54. package/src/components/hiprint/style.scss +188 -0
  55. package/src/components/hiprint/view/json-view.vue +4 -4
  56. package/src/components/jdPrint/mixins.js +2 -0
  57. package/src/components/jsonImport/index.vue +1 -1
  58. package/src/components/jsonImport/mixins.js +6 -10
  59. package/src/components/langImport/index.vue +1 -1
  60. package/src/components/langImport/mixins.js +6 -10
  61. package/src/components/luckysheet/loadResources.js +64 -0
  62. package/src/components/luckysheet/view.vue +239 -210
  63. package/src/components/mobile/buttonGroup/index.vue +1 -1
  64. package/src/components/mobile/wf/addTaskUserdialog.vue +100 -80
  65. package/src/components/mobile/wf/content.vue +1734 -1662
  66. package/src/components/mobile/wf/deleteTaskUserDialog.vue +73 -54
  67. package/src/components/mobile/wf/selectUserDialog.vue +118 -0
  68. package/src/components/mobile/wf/setCandidateDialog.vue +69 -48
  69. package/src/components/mobile/wf/urgingDialog.vue +75 -52
  70. package/src/components/mobile/wf/wfModifyDialog.vue +4 -0
  71. package/src/components/obsUpload/index.js +4 -1
  72. package/src/components/obsUpload/index.vue +1 -1
  73. package/src/components/obsUpload/mixins.js +45 -15
  74. package/src/components/onlineTalk/index.vue +4 -4
  75. package/src/components/onlineTalk/mixins.js +21 -7
  76. package/src/components/table/index.js +96 -81
  77. package/src/components/table/plugins/cell-area/index.js +10 -3
  78. package/src/components/table/style.scss +1399 -0
  79. package/src/components/table/vxeFilter/mixin.js +28 -18
  80. package/src/components/wf/content.vue +3 -2
  81. package/src/components/wf/content2.vue +1 -1
  82. package/src/components/wf/style.scss +265 -0
  83. package/src/components/wf/wf.js +7 -0
  84. package/src/components/wf/wfActionItems.js +3 -0
  85. package/src/components/wf/wfStartDialog.vue +1 -0
  86. package/src/components/wf/wfTransferEnabled.js +54 -0
  87. package/src/components/wf/wfUtil.js +47 -29
  88. package/src/components/wf/wfVisibility.js +6 -0
  89. package/src/components/xform/docs/2026-07 table/344/270/216excelExport/344/277/256/345/244/215/345/217/212/345/257/274/345/207/272/344/274/230/345/214/226.md" +64 -57
  90. package/src/components/xform/docs/2026-08 xform H5 P0 /345/256/236/347/216/260/350/247/204/346/240/274.md" +1 -1
  91. package/src/components/xform/docs/2026-08 xform /347/247/273/345/212/250/347/253/257/345/270/203/345/261/200/345/257/271/351/275/220 bill_setting /346/226/271/346/241/210.md" +1 -1
  92. package/src/components/xform/docs/2026-09 /345/212/250/346/200/201/345/255/227/346/256/265/350/247/204/345/210/231/344/270/216/346/265/201/347/250/213/346/216/247/345/210/266/346/211/247/350/241/214/351/241/272/345/272/217/350/220/275/345/234/260/346/226/271/346/241/210.md" +409 -0
  93. package/src/components/xform/docs/2026-09 /346/235/241/344/273/266/345/257/274/345/207/272/345/244/247/346/225/260/346/215/256/351/207/217/345/264/251/346/272/203/346/216/222/346/237/245.md" +389 -0
  94. package/src/components/xform/docs/2026-09 /346/265/217/350/247/210/345/231/250/345/264/251/346/272/203/346/262/273/347/220/206P0/344/273/243/347/240/201/350/257/204/345/256/241.md" +255 -0
  95. package/src/components/xform/docs/2026-09 /346/265/217/350/247/210/345/231/250/345/264/251/346/272/203/346/262/273/347/220/206P0/346/265/213/350/257/225/351/252/214/350/257/201/345/256/236/346/226/275/346/226/207/346/241/243.md" +595 -0
  96. package/src/components/xform/docs/2026-09 /347/274/226/350/276/221/350/241/250/350/241/214/345/206/205/344/277/235/345/255/230/346/240/241/351/252/214/350/214/203/345/233/264/344/270/216/345/210/227/345/277/205/345/241/253/350/247/243/346/236/220/344/277/256/345/244/215.md" +233 -0
  97. package/src/components/xform/docs/2026-09 /350/241/250/345/215/225/345/257/274/345/205/245/351/200/232/351/201/223/346/242/263/347/220/206/344/270/216/350/220/275/345/234/260/346/226/271/346/241/210.md" +745 -0
  98. package/src/components/xform/docs//346/265/217/350/247/210/345/231/250/345/264/251/346/272/203/346/262/273/347/220/206/344/270/216/344/277/256/345/244/215/350/220/275/345/234/260/346/226/271/346/241/210.md +324 -0
  99. package/src/components/xform/form-designer/designer.js +2133 -2100
  100. package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +7 -0
  101. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +4 -2
  102. package/src/components/xform/form-designer/form-widget/container-widget/detail-h5-widget.vue +243 -227
  103. package/src/components/xform/form-designer/form-widget/container-widget/h5-card-pane-widget.vue +228 -207
  104. package/src/components/xform/form-designer/form-widget/container-widget/h5-card-widget.vue +165 -136
  105. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +30 -4
  106. package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +190 -185
  107. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +2657 -1774
  108. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +27 -4
  109. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +1 -1
  110. package/src/components/xform/form-designer/form-widget/field-widget/a-text-widget.vue +1 -1
  111. package/src/components/xform/form-designer/form-widget/field-widget/area-select-widget.vue +1 -1
  112. package/src/components/xform/form-designer/form-widget/field-widget/autocomplete-widget.vue +1 -1
  113. package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +1 -1
  114. package/src/components/xform/form-designer/form-widget/field-widget/button-widget.vue +1 -1
  115. package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +1 -1
  116. package/src/components/xform/form-designer/form-widget/field-widget/census-widget.vue +1 -1
  117. package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +1 -1
  118. package/src/components/xform/form-designer/form-widget/field-widget/color-widget.vue +1 -1
  119. package/src/components/xform/form-designer/form-widget/field-widget/copy_button-widget.vue +1 -1
  120. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +1 -1
  121. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +1 -1
  122. package/src/components/xform/form-designer/form-widget/field-widget/descriptions-widget.vue +1 -1
  123. package/src/components/xform/form-designer/form-widget/field-widget/divider-widget.vue +1 -1
  124. package/src/components/xform/form-designer/form-widget/field-widget/download-button-widget.vue +1 -1
  125. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-item-widget.vue +1 -1
  126. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-widget.vue +35 -4
  127. package/src/components/xform/form-designer/form-widget/field-widget/echart-bar-widget.vue +1 -1
  128. package/src/components/xform/form-designer/form-widget/field-widget/echart-category-widget.vue +1 -1
  129. package/src/components/xform/form-designer/form-widget/field-widget/echart-pie-widget.vue +1 -1
  130. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +64 -10
  131. package/src/components/xform/form-designer/form-widget/field-widget/file-upload-widget.vue +1 -1
  132. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +14 -4
  133. package/src/components/xform/form-designer/form-widget/field-widget/html-text-widget.vue +1 -1
  134. package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +19 -6
  135. package/src/components/xform/form-designer/form-widget/field-widget/import2-button-widget.vue +1 -1
  136. package/src/components/xform/form-designer/form-widget/field-widget/index.js +10 -1
  137. package/src/components/xform/form-designer/form-widget/field-widget/input-batch-widget.vue +1 -1
  138. package/src/components/xform/form-designer/form-widget/field-widget/input-widget.vue +29 -3
  139. package/src/components/xform/form-designer/form-widget/field-widget/multiSearch-widget.vue +1 -1
  140. package/src/components/xform/form-designer/form-widget/field-widget/news-list-widget.vue +1 -1
  141. package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +1 -1
  142. package/src/components/xform/form-designer/form-widget/field-widget/oplog-widget.vue +1 -1
  143. package/src/components/xform/form-designer/form-widget/field-widget/picture-upload-widget.vue +1 -1
  144. package/src/components/xform/form-designer/form-widget/field-widget/print-button-widget.vue +1 -1
  145. package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +1 -1
  146. package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +1 -1
  147. package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +1 -1
  148. package/src/components/xform/form-designer/form-widget/field-widget/rate-widget.vue +1 -1
  149. package/src/components/xform/form-designer/form-widget/field-widget/rich-editor-widget.vue +1 -1
  150. package/src/components/xform/form-designer/form-widget/field-widget/row-col-select-widget.vue +64 -0
  151. package/src/components/xform/form-designer/form-widget/field-widget/save_submit_wf_button-widget.vue +1 -1
  152. package/src/components/xform/form-designer/form-widget/field-widget/script-input-widget.vue +1 -1
  153. package/src/components/xform/form-designer/form-widget/field-widget/search_button-widget.vue +1 -1
  154. package/src/components/xform/form-designer/form-widget/field-widget/select-export-button-widget.vue +1 -1
  155. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +6 -2
  156. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +1 -1
  157. package/src/components/xform/form-designer/form-widget/field-widget/singerSearch-widget.vue +1 -1
  158. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +145 -145
  159. package/src/components/xform/form-designer/form-widget/field-widget/slider-widget.vue +1 -1
  160. package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +1 -1
  161. package/src/components/xform/form-designer/form-widget/field-widget/static-text-widget.vue +1 -1
  162. package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +1 -1
  163. package/src/components/xform/form-designer/form-widget/field-widget/switch-widget.vue +1 -1
  164. package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +3 -2
  165. package/src/components/xform/form-designer/form-widget/field-widget/tempStorage-widget.vue +1 -1
  166. package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +1 -1
  167. package/src/components/xform/form-designer/form-widget/field-widget/textarea-widget.vue +1 -1
  168. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +1 -1
  169. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +1 -1
  170. package/src/components/xform/form-designer/form-widget/field-widget/title-head-widget.vue +1 -1
  171. package/src/components/xform/form-designer/form-widget/field-widget/vabSearch-widget.vue +1 -1
  172. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +3 -3
  173. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +25 -1
  174. package/src/components/xform/form-designer/form-widget/field-widget/vue-page-widget.vue +1 -1
  175. package/src/components/xform/form-designer/indexMixin.js +27 -0
  176. package/src/components/xform/form-designer/setting-panel/form-dynamicField-setting.vue +687 -602
  177. package/src/components/xform/form-designer/setting-panel/form-setting.vue +269 -36
  178. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +335 -12
  179. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +23 -7
  180. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +13 -1
  181. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +846 -860
  182. package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tab-lazyRender-editor.vue +27 -0
  183. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onTabChange-editor.vue +28 -0
  184. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onTabClick-editor.vue +28 -0
  185. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +62 -1
  186. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +142 -2
  187. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/empty-number-input.vue +51 -0
  188. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +27 -2
  189. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +33 -3
  190. package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +2 -4
  191. package/src/components/xform/form-designer/setting-panel/property-editor/suffixIconClickable-editor.vue +23 -0
  192. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +18 -4
  193. package/src/components/xform/form-designer/toolbar-panel/index.vue +884 -874
  194. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +13 -0
  195. package/src/components/xform/form-designer/widget-panel/index.vue +11 -7
  196. package/src/components/xform/form-designer/widget-panel/indexMixin.js +15 -2
  197. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +152 -9
  198. package/src/components/xform/form-render/container-item/containerItemMixin.js +93 -8
  199. package/src/components/xform/form-render/container-item/data-table-item.vue +352 -347
  200. package/src/components/xform/form-render/container-item/data-table-mixin.js +7261 -5985
  201. package/src/components/xform/form-render/container-item/detail-h5-item.vue +48 -19
  202. package/src/components/xform/form-render/container-item/detail-item.vue +350 -446
  203. package/src/components/xform/form-render/container-item/dynamicFieldMixin.js +55 -1
  204. package/src/components/xform/form-render/container-item/list-h5-item.vue +261 -178
  205. package/src/components/xform/form-render/container-item/panel-item.vue +1 -1
  206. package/src/components/xform/form-render/container-item/tab-item.vue +177 -129
  207. package/src/components/xform/form-render/fieldControlEngine.js +218 -0
  208. package/src/components/xform/form-render/fieldControlMixin.js +536 -0
  209. package/src/components/xform/form-render/index.vue +164 -153
  210. package/src/components/xform/form-render/indexMixin.js +5443 -5311
  211. package/src/components/xform/form-render/pageDialogScope.js +54 -0
  212. package/src/components/xform/icon-picker/index.vue +1 -1
  213. package/src/components/xform/lang/en-US.js +8 -0
  214. package/src/components/xform/lang/zh-CN.js +9 -0
  215. package/src/components/xform/mixins/businessLock.js +59 -0
  216. package/src/components/xform/mixins/defaultHandle.js +713 -707
  217. package/src/components/xform/mixins/scriptHttp.js +42 -21
  218. package/src/components/xform/mixins/wfStart.js +105 -0
  219. package/src/components/xform/mixins/wfVisibility.js +33 -0
  220. package/src/components/xform/styles/census.scss +288 -0
  221. package/src/components/xform/styles/containers.scss +215 -0
  222. package/src/components/xform/styles/designer.scss +904 -0
  223. package/src/components/xform/styles/detail-temp.scss +71 -0
  224. package/src/components/xform/styles/h5-designer.scss +191 -0
  225. package/src/components/xform/styles/h5-runtime.scss +520 -0
  226. package/src/components/xform/styles/h5.scss +836 -516
  227. package/src/components/xform/styles/skins.scss +398 -0
  228. package/src/components/xform/styles/table-layout.scss +91 -0
  229. package/src/components/xform/styles/titles.scss +255 -0
  230. package/src/components/xform/utils/dynamicSchemaUtil.js +385 -361
  231. package/src/components/xform/utils/fixedQueryUtil.js +29 -4
  232. package/src/components/xform/utils/serviceNameCache.js +69 -0
  233. package/src/components/xform/utils/tableColumnHelper.js +46 -4
  234. package/src/components/xform/utils/util.js +1776 -1708
  235. package/src/core-resources/css/h5.scss +548 -0
  236. package/src/core-resources/css/iconfont.css +1447 -0
  237. package/src/core-resources/font/iconfont.ttf +0 -0
  238. package/src/core-resources/font/iconfont.woff +0 -0
  239. package/src/core-resources/font/iconfont.woff2 +0 -0
  240. package/src/core-resources/images/default-header.png +0 -0
  241. package/src/core-resources/images/ico-default_wenjian.svg +1 -0
  242. package/src/core-resources/images/ico-excel.svg +1 -0
  243. package/src/core-resources/images/ico-ftl.svg +7 -0
  244. package/src/core-resources/images/ico-html.svg +1 -0
  245. package/src/core-resources/images/ico-java.svg +1 -0
  246. package/src/core-resources/images/ico-music.svg +1 -0
  247. package/src/core-resources/images/ico-pdf.svg +1 -0
  248. package/src/core-resources/images/ico-photo.svg +1 -0
  249. package/src/core-resources/images/ico-ppt.svg +1 -0
  250. package/src/core-resources/images/ico-psd.svg +1 -0
  251. package/src/core-resources/images/ico-service.png +0 -0
  252. package/src/core-resources/images/ico-txt.svg +1 -0
  253. package/src/core-resources/images/ico-video.svg +1 -0
  254. package/src/core-resources/images/ico-vue.svg +8 -0
  255. package/src/core-resources/images/ico-wenjianjia.svg +1 -0
  256. package/src/core-resources/images/ico-wrod.svg +1 -0
  257. package/src/core-resources/images/ico-xml.svg +1 -0
  258. package/src/core-resources/images/ico-yasuobao.svg +1 -0
  259. package/src/core-resources/images/icon-error.png +0 -0
  260. package/src/core-resources/images/icon-tips.png +0 -0
  261. package/src/core-resources/images/nodata.png +0 -0
  262. package/src/core-resources/images/nodata2.png +0 -0
  263. package/src/directive/append-to-body/index.js +48 -0
  264. package/src/directive/el-dialog-center/index.js +3 -2
  265. package/src/directive/el-drag-dialog/drag.js +33 -4
  266. package/src/icons/index.js +9 -0
  267. package/src/icons/svg/404.svg +1 -0
  268. package/src/icons/svg/alert.svg +1 -0
  269. package/src/icons/svg/bug.svg +1 -0
  270. package/src/icons/svg/button.svg +1 -0
  271. package/src/icons/svg/card.svg +1 -0
  272. package/src/icons/svg/cascader-field.svg +1 -0
  273. package/src/icons/svg/census.svg +1 -0
  274. package/src/icons/svg/chart.svg +1 -0
  275. package/src/icons/svg/checkbox-field.svg +1 -0
  276. package/src/icons/svg/clipboard.svg +1 -0
  277. package/src/icons/svg/color-field.svg +1 -0
  278. package/src/icons/svg/component.svg +1 -0
  279. package/src/icons/svg/custom-component.svg +1 -0
  280. package/src/icons/svg/dashboard.svg +1 -0
  281. package/src/icons/svg/data-table.svg +1 -0
  282. package/src/icons/svg/date-field.svg +1 -0
  283. package/src/icons/svg/date-range-field.svg +1 -0
  284. package/src/icons/svg/descriptions.svg +1 -0
  285. package/src/icons/svg/divider.svg +1 -0
  286. package/src/icons/svg/document.svg +1 -0
  287. package/src/icons/svg/documentation.svg +1 -0
  288. package/src/icons/svg/drag.svg +1 -0
  289. package/src/icons/svg/echart-category.svg +1 -0
  290. package/src/icons/svg/echart-pie.svg +1 -0
  291. package/src/icons/svg/echart.svg +1 -0
  292. package/src/icons/svg/edit.svg +1 -0
  293. package/src/icons/svg/education.svg +1 -0
  294. package/src/icons/svg/email.svg +1 -0
  295. package/src/icons/svg/example.svg +1 -0
  296. package/src/icons/svg/excel.svg +1 -0
  297. package/src/icons/svg/exit-fullscreen.svg +1 -0
  298. package/src/icons/svg/eye-open.svg +1 -0
  299. package/src/icons/svg/eye.svg +1 -0
  300. package/src/icons/svg/file-upload-field.svg +1 -0
  301. package/src/icons/svg/form.svg +1 -0
  302. package/src/icons/svg/fullscreen.svg +1 -0
  303. package/src/icons/svg/github.svg +1 -0
  304. package/src/icons/svg/grid.svg +1 -0
  305. package/src/icons/svg/guide.svg +1 -0
  306. package/src/icons/svg/html-text.svg +1 -0
  307. package/src/icons/svg/ico-more.svg +1 -0
  308. package/src/icons/svg/ico-wenjianjia.svg +1 -0
  309. package/src/icons/svg/icon.svg +1 -0
  310. package/src/icons/svg/input-batch.svg +1 -0
  311. package/src/icons/svg/international.svg +1 -0
  312. package/src/icons/svg/language.svg +1 -0
  313. package/src/icons/svg/link.svg +1 -0
  314. package/src/icons/svg/list-export.svg +1 -0
  315. package/src/icons/svg/list.svg +1 -0
  316. package/src/icons/svg/lock.svg +1 -0
  317. package/src/icons/svg/message.svg +1 -0
  318. package/src/icons/svg/money.svg +1 -0
  319. package/src/icons/svg/nested.svg +1 -0
  320. package/src/icons/svg/news-list.svg +1 -0
  321. package/src/icons/svg/node-tree.svg +1 -0
  322. package/src/icons/svg/number-field.svg +1 -0
  323. package/src/icons/svg/password.svg +1 -0
  324. package/src/icons/svg/pdf.svg +1 -0
  325. package/src/icons/svg/people.svg +1 -0
  326. package/src/icons/svg/peoples.svg +1 -0
  327. package/src/icons/svg/picture-upload-field.svg +1 -0
  328. package/src/icons/svg/qq.svg +1 -0
  329. package/src/icons/svg/query.svg +1 -0
  330. package/src/icons/svg/radio-field.svg +1 -0
  331. package/src/icons/svg/rate-field.svg +1 -0
  332. package/src/icons/svg/redo.svg +1 -0
  333. package/src/icons/svg/rich-editor-field.svg +1 -0
  334. package/src/icons/svg/search.svg +1 -0
  335. package/src/icons/svg/searchbox.svg +1 -0
  336. package/src/icons/svg/section.svg +1 -0
  337. package/src/icons/svg/select-field.svg +1 -0
  338. package/src/icons/svg/shopping.svg +1 -0
  339. package/src/icons/svg/size.svg +1 -0
  340. package/src/icons/svg/skill.svg +1 -0
  341. package/src/icons/svg/slider-field.svg +1 -0
  342. package/src/icons/svg/slot-component.svg +1 -0
  343. package/src/icons/svg/slot-field.svg +1 -0
  344. package/src/icons/svg/star.svg +1 -0
  345. package/src/icons/svg/static-text.svg +1 -0
  346. package/src/icons/svg/status.svg +1 -0
  347. package/src/icons/svg/sub-form.svg +1 -0
  348. package/src/icons/svg/switch-field.svg +1 -0
  349. package/src/icons/svg/tab.svg +1 -0
  350. package/src/icons/svg/table.svg +1 -0
  351. package/src/icons/svg/text-field.svg +1 -0
  352. package/src/icons/svg/text.svg +1 -0
  353. package/src/icons/svg/textarea-field.svg +1 -0
  354. package/src/icons/svg/theme.svg +1 -0
  355. package/src/icons/svg/time-field.svg +1 -0
  356. package/src/icons/svg/time-range-field.svg +1 -0
  357. package/src/icons/svg/tips-text.svg +1 -0
  358. package/src/icons/svg/title-head.svg +1 -0
  359. package/src/icons/svg/tree-pane.svg +1 -0
  360. package/src/icons/svg/tree-table.svg +1 -0
  361. package/src/icons/svg/tree.svg +1 -0
  362. package/src/icons/svg/undo.svg +1 -0
  363. package/src/icons/svg/uploadbox.svg +1 -0
  364. package/src/icons/svg/user.svg +1 -0
  365. package/src/icons/svg/vf-box.svg +1 -0
  366. package/src/icons/svg/vf-dialog.svg +1 -0
  367. package/src/icons/svg/vf-drawer.svg +1 -0
  368. package/src/icons/svg/vue-sfc.svg +1 -0
  369. package/src/icons/svg/wechat.svg +1 -0
  370. package/src/icons/svg/zip.svg +1 -0
  371. package/src/index.js +2 -510
  372. package/src/index.next.js +5 -0
  373. package/src/index.sync.js +5 -0
  374. package/src/layout/components/Sidebar/default.vue +1656 -1655
  375. package/src/layout/components/TagsView/index.vue +330 -323
  376. package/src/layout/components/TagsView/style.scss +92 -0
  377. package/src/layout/components/watermark/index.vue +1 -1
  378. package/src/layout/defaultLayout.vue +2 -2
  379. package/src/router/index.js +43 -48
  380. package/src/router/modules/customer.js +12 -0
  381. package/src/store/modules/settings.js +1 -1
  382. package/src/store/modules/tagsView.js +241 -217
  383. package/src/store/modules/user.js +16 -12
  384. package/src/styles/btn.scss +315 -0
  385. package/src/styles/dialog.scss +1710 -0
  386. package/src/styles/element-ui.scss +1076 -0
  387. package/src/styles/element-variables.scss +31 -0
  388. package/src/styles/global.scss +115 -0
  389. package/src/styles/index.scss +245 -0
  390. package/src/styles/layout-skins.scss +840 -0
  391. package/src/styles/legacy-base.scss +19 -0
  392. package/src/styles/menu-icons.scss +75 -0
  393. package/src/styles/mixin.scss +80 -0
  394. package/src/styles/nprogress.scss +14 -0
  395. package/src/styles/page-shell.scss +723 -0
  396. package/src/styles/sidebar.scss +296 -0
  397. package/src/styles/split-handle.scss +52 -0
  398. package/src/styles/theme-variables.scss +7 -0
  399. package/src/styles/transition.scss +48 -0
  400. package/src/styles/utilities.scss +253 -0
  401. package/src/styles/variables.scss +72 -0
  402. package/src/utils/baseDictsCache.js +197 -0
  403. package/src/utils/chunkLoadError.js +24 -0
  404. package/src/utils/featureResources.js +57 -0
  405. package/src/utils/importLimit.js +72 -0
  406. package/src/utils/pdfUtil.js +6 -1
  407. package/src/utils/request.js +149 -9
  408. package/src/utils/resolveViewComponent.js +45 -90
  409. package/src/utils/runtimeRecovery.js +105 -0
  410. package/src/utils/swiperLoader.js +20 -0
  411. package/src/utils/vab.js +1334 -1283
  412. package/src/utils/xlsxLoader.js +29 -0
  413. package/src/views/bd/setting/formVersion/compareContMixin.scss +1 -1
  414. package/src/views/bd/setting/form_template/edit.vue +378 -356
  415. package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
  416. package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
  417. package/src/views/bd/setting/form_template/list.vue +304 -303
  418. package/src/views/bd/setting/form_template/mixins/edit.js +344 -280
  419. package/src/views/bd/setting/form_template/mixins/list.js +749 -721
  420. package/src/views/bd/setting/form_template/mixins/list2.js +412 -411
  421. package/src/views/bd/setting/form_template/mixins/wf_list.js +431 -430
  422. package/src/views/mobile/user/area/dialog.vue +1 -1
  423. package/src/views/mobile/user/user/dialog.vue +1 -1
  424. package/src/views/user/bill_setting/mixins/wf.js +8 -0
  425. package/src/views/user/bill_setting/render.vue +1 -1
  426. package/src/views/user/commMenu/index.vue +3 -1
  427. package/src/views/user/commMenu/style.scss +123 -0
  428. package/src/views/user/common_attribute/edit.vue +2 -0
  429. package/src/views/user/common_attribute/itemEdit.vue +2 -0
  430. package/src/views/user/file_view_ins/list.vue +970 -970
  431. package/src/views/user/form/form_template/list.vue +527 -506
  432. package/src/views/user/form/vform/designer.vue +823 -821
  433. package/src/views/user/form/view/list.vue +24 -1
  434. package/src/views/user/home/default.vue +1124 -1117
  435. package/src/views/user/home/default2.vue +12 -8
  436. package/src/views/user/home/index.vue +102 -102
  437. package/src/views/user/home/wjl/content.vue +1581 -1569
  438. package/src/views/user/intf_permission/edit.vue +230 -0
  439. package/src/views/user/intf_permission/list.vue +196 -0
  440. package/src/views/user/menuFallback/index.vue +23 -0
  441. package/src/views/user/notify_message/dialog.vue +139 -139
  442. package/src/views/user/outLink/form_view.vue +202 -202
  443. package/src/views/user/outLink/index.vue +110 -110
  444. package/src/views/user/role/edit.vue +4 -0
  445. package/src/views/user/role/role-box.scss +83 -0
  446. package/src/views/user/role/voc_edit.vue +4 -0
  447. package/src/views/user/user/list.vue +28 -6
  448. package/src/views/user/wf/iframe/index.vue +51 -51
  449. package/src/views/user/wf/iframe/index2.vue +64 -64
  450. package/src/views/user/wf/wf_diy_attribute/edit.vue +1 -1
  451. package/src/views/user/wf/wf_manage/list2.vue +871 -871
  452. package/src/views/user/wf/wf_manage/wfContentDialog.vue +177 -126
  453. package/src/views/user/wf/wf_obj_config/activiti_wf.vue +134 -133
  454. package/src/views/user/wf/wf_obj_config/importItemDialog.vue +1 -1
  455. package/src/views/user/wf/wf_obj_config/list.vue +747 -746
  456. package/src/views/user/wf/wf_obj_config/list_form.vue +374 -373
  457. package/templates/child-app/.env +3 -0
  458. package/templates/child-app/README.md +49 -0
  459. package/templates/child-app/app.config.js +6 -0
  460. package/templates/child-app/babel.config.js +1 -0
  461. package/templates/child-app/core-resources.config.js +15 -0
  462. package/templates/child-app/gitignore +7 -0
  463. package/templates/child-app/package.json +34 -0
  464. package/templates/child-app/public/index.html +12 -0
  465. package/templates/child-app/src/assets/401_images/401.gif +0 -0
  466. package/templates/child-app/src/assets/404_images/404.png +0 -0
  467. package/templates/child-app/src/assets/404_images/404_cloud.png +0 -0
  468. package/templates/child-app/src/assets/logo.png +0 -0
  469. package/templates/child-app/src/corejsConfig.js +2 -0
  470. package/templates/child-app/src/icons/index.js +2 -0
  471. package/templates/child-app/src/icons/svg/child-demo.svg +1 -0
  472. package/templates/child-app/src/layout/index.vue +4 -0
  473. package/templates/child-app/src/main.js +5 -0
  474. package/templates/child-app/src/prefixConfig.js +13 -0
  475. package/templates/child-app/src/resources/css/login.scss +29 -0
  476. package/templates/child-app/src/resources/images/bg-login5.jpg +0 -0
  477. package/templates/child-app/src/resources/images/home-img.png +0 -0
  478. package/templates/child-app/src/router/modules/customer.js +3 -0
  479. package/templates/child-app/src/settings.js +25 -0
  480. package/templates/child-app/src/styles/app.scss +2 -0
  481. package/templates/child-app/src/views/demo/detail.vue +19 -0
  482. package/templates/child-app/src/views/demo/list.vue +38 -0
  483. package/templates/child-app/src/views/user/login/index.vue +18 -0
  484. package/templates/child-app/vue.config.js +107 -0
  485. package/src/components/xform/form-render/container-item/dynamicFieldEngine.js +0 -285
  486. package/src/components/xform/form-render/formDynamicFieldMixin.js +0 -131
  487. package/src/views/demo/bizTab/bill/billConfig.js +0 -41
  488. package/src/views/demo/bizTab/bill/detail.vue +0 -436
  489. package/src/views/demo/bizTab/bill/list.vue +0 -288
  490. package/src/views/demo/bizTab/bill/productDialog.vue +0 -176
  491. package/src/views/demo/bizTab/simple/billApi.js +0 -123
  492. package/src/views/demo/bizTab/simple/detail.vue +0 -407
  493. package/src/views/demo/bizTab/simple/list.vue +0 -217
  494. package/src/views/demo/bizTab/standalone/index.vue +0 -121
  495. package/src/views/demo/bizTab/wf/billConfig.js +0 -44
  496. package/src/views/demo/bizTab/wf/detail.vue +0 -661
  497. package/src/views/demo/bizTab/wf/list.vue +0 -242
  498. package/src/views/user/outLink/cc_form_view.vue +0 -188
  499. /package/src/{resources → core-resources}/js/base/common.js +0 -0
@@ -1,1662 +1,1734 @@
1
- <template>
2
- <div>
3
- <h5-card-pane label="流程信息">
4
- <template #default>
5
- <div class="flowPath-box">
6
- <!-- 这一行的值是 wfInfo.name(流程主题),标签原先误写成「任务情况」——
7
- 与下面第三行「查看任务情况」重名。PC content.vue 同一个值的标签就是
8
- 「流程主题」(components.wf.theme)。 -->
9
- <div class="t"><span>{{ $t2('流程主题', 'components.wf.theme') }}</span></div>
10
- <div class="c">
11
- <div class="name">
12
- {{ (wfInfo.createDate ? wfInfo.createDate.substring(0, 10) : '') + wfInfo.name }}
13
- <el-tag :type="getWfStatusType()" size="mini">{{ getWfStatusLabel() }}</el-tag>
14
- </div>
15
- </div>
16
- <div class="m2">
17
- <div class="t"><span>{{ $t2('流程图', 'components.wf.wfImage') }}</span></div>
18
- <div class="c">
19
- <el-button icon="" class="btn" @click="showPreviewDialog=true" icon="el-icon-view">查看流程图</el-button>
20
- </div>
21
- </div>
22
- <div class="m2">
23
- <div class="t"><span>{{ $t2('任务情况', 'components.wf.taskInfo') }}</span></div>
24
- <div class="c">
25
- <el-button icon="" class="btn" @click="showRenwuDialog=true" icon="iconfont icon-preview">查看任务情况
26
- </el-button>
27
- </div>
28
- </div>
29
-
30
- </div>
31
- <!-- hideActions:宿主已经把审批动作提到别处(如 xform H5 的底部动作栏)时,
32
- 这一排整条藏掉,避免一个动作出现两份。与 PC content.vue 的
33
- headerActionsMounted 同意图,这里做成 prop 是为了没有时序问题。 -->
34
- <div class="flowPath-btns" v-show="!hideActions">
35
- <el-button type="success" plain class="btn" @click="openAgreeDialog" v-show="wfInfo.toSubmit"
36
- icon="iconfont icon-tongguo">{{ $t2('通过', 'components.wf.agree') }}
37
- </el-button>
38
- <el-button type="warning" plain class="btn" @click="openManualDialog" v-show="wfInfo.toInterrupt"
39
- icon="iconfont icon-caozuozhongduan">{{ $t2('中断', 'components.wf.manual') }}
40
- </el-button>
41
- <el-button type="danger" plain class="btn" @click="rejectWfTask" v-show="wfInfo.toReject"
42
- icon="iconfont icon-a-bohui1">{{ $t2('驳回', 'components.wf.reject') }}
43
- </el-button>
44
- <el-button type="primary" plain class="btn" @click="openChangeWfForm"
45
- v-show="(wfInfo.toTransfer===null || wfInfo.toTransfer===undefined) ? wfInfo.toSubmit: wfInfo.toTransfer"
46
- icon="iconfont icon-zhuanban">{{ $t2('转办', 'components.wf.transfer') }}
47
- </el-button>
48
- <el-button type="primary" plain class="btn" @click="openUrgingDialog" v-show="wfInfo.toInterrupt"
49
- icon="iconfont icon-cuiban">{{ $t2('催办', 'components.wf.urging') }}
50
- </el-button>
51
- <el-button type="primary" plain class="btn" @click="openAddIncreaseSign" v-show="wfInfo.toAddIncreaseSign"
52
- icon="el-icon-plus">{{ $t2('加签', 'components.wf.addIncreaseSign') }}
53
- </el-button>
54
- <el-button type="primary" plain class="btn" @click="openDeleteTaskUserDialog"
55
- v-show="wfInfo.toDeleteIncreaseSign"
56
- icon="el-icon-delete">{{ $t2('减签', 'components.wf.deleteIncreaseSign') }}
57
- </el-button>
58
- <el-button type="primary" plain class="btn" @click="openTalkDialog()"
59
- icon="el-icon-chat-dot-square" v-if="toTalk && wfInfo.toLinkup">
60
- {{ $t2('沟通', 'components.wf.talk') }}
61
- </el-button>
62
- <el-button type="primary" plain class="btn" @click="openSetCandidateDialog(null)"
63
- v-show="wfInfo.toSetCandidate"
64
- icon="el-icon-user">{{ $t2('修改候选人', 'components.wf.setCandidate') }}
65
- </el-button>
66
- <el-button type="danger" plain class="btn" @click="openRevokeDialog(null)"
67
- v-show="wfInfo.toRevoke"
68
- icon="el-icon-document-delete">{{ $t2('撤回', 'components.wf.revoke') }}
69
- </el-button>
70
- </div>
71
- </template>
72
- </h5-card-pane>
73
-
74
- <!-- 流程相关的弹框必须放在卡片外面。h5CardPane 折叠时会给 .cont 加
75
- display:none,放在插槽里的弹框会被一起隐藏 —— 表现为「流程信息收起后,
76
- 通过/驳回/转办这些弹框点了没反应」(祖先 display:none 无法被后代覆盖)。 -->
77
- <div class="pop-box" v-if="showPreviewDialog">
78
- <div>
79
- <div class="header-box">
80
- <i class="back el-icon-close" @click="showPreviewDialog=false"></i>流程图预览
81
- </div>
82
- <div class="flex" style="height:calc(100vh - 38px)">
83
- <el-form label-position="top" class="form-box">
84
- <div class="tit"><span>{{
85
- (wfInfo.createDate ? wfInfo.createDate.substring(0, 10) : '') + wfInfo.name
86
- }}</span></div>
87
- <iframe style="width: 100%;flex:1" :src="wfImage"></iframe>
88
- </el-form>
89
- </div>
90
- <!-- 只读预览,没有「确定」要提交的东西:原先取消/确定两个按钮点了都是关掉,
91
- 合成一个「关 闭」。.btn 上的 flex:1 会让它自动铺满一行(见 styles/h5.scss)。 -->
92
- <div class="fixed-bottom-btns">
93
- <el-button type="primary" plain class="btn" @click="showPreviewDialog=false" icon="el-icon-close">{{
94
- $t2('关 闭', 'system.button.close2')
95
- }}
96
- </el-button>
97
- </div>
98
- </div>
99
- </div>
100
-
101
- <div class="pop-box" v-if="showRenwuDialog">
102
- <div>
103
- <div class="header-box">
104
- <i class="back el-icon-close" @click="showRenwuDialog=false"></i>任务情况预览
105
- </div>
106
- <div class="flex" style="height:calc(100vh - 38px);overflow:auto">
107
- <div class="h5-process-info">
108
- <div class="item" v-for="wftaskLineData in wftaskData" :key="wftaskLineData.id">
109
- <div class="time">
110
- {{ wftaskLineData.approveTime ? wftaskLineData.approveTime.substring(0, 10) : '' }}
111
- <br/>
112
- {{ wftaskLineData.approveTime ? wftaskLineData.approveTime.substring(11) : '' }}
113
- </div>
114
- <div class="status"
115
- :class="taskStatuses[wftaskLineData.type]?taskStatuses[wftaskLineData.type].class:''">
116
- {{ taskStatuses[wftaskLineData.type] ? taskStatuses[wftaskLineData.type].value : null }}
117
- </div>
118
- <i class="circle"></i>
119
- <div class="info">
120
- <p>
121
- <span class="name">{{ wftaskLineData.taskName }}</span>
122
- <span>{{ $t2('执行人', 'components.wf.approverName') }}:{{ wftaskLineData.approverName }}</span>
123
- <span>
124
- {{ $t2('候选人', 'components.wf.candidateName') }}:
125
- <span class="">{{ wftaskLineData.candidateNames }}</span>
126
- </span>
127
- </p>
128
- <p class="t"><span class="t1">{{ $t2('备注/意见', 'components.wf.opinion') }}:</span><span>{{
129
- wftaskLineData.opinion
130
- }}</span></p>
131
- </div>
132
- </div>
133
- </div>
134
- </div>
135
- <!-- 同上:只读预览,合成一个「关 闭」 -->
136
- <div class="fixed-bottom-btns">
137
- <el-button type="primary" plain class="btn" @click="showRenwuDialog=false" icon="el-icon-close">{{
138
- $t2('关 闭', 'system.button.close2')
139
- }}
140
- </el-button>
141
- </div>
142
- </div>
143
- </div>
144
-
145
- <div class="pop-tipsBox" style="display: block;" v-if="showWfManualDialog">
146
- <div>
147
- <i class="icon"></i>
148
- <div class="cont">
149
- <p class="name">
150
- {{ $t2('流程中断', 'components.wf.wfManual') }}<span>—</span><b
151
- class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
152
- wfInfo.taskName
153
- }}</b>
154
- </p>
155
- <p class="txt">{{ $t2('您确定要中断流程吗?', 'components.wf.manualTip') }}</p>
156
- </div>
157
- <div class="btns">
158
- <el-button type="primary" class="btn" plain icon="el-icon-close" @click="showWfManualDialog = false">{{
159
- $t2('取 消', 'system.button.cancel2')
160
- }}
161
- </el-button>
162
- <el-button type="primary" class="btn" icon="el-icon-check" @click="manualEndWf()">{{
163
- $t2('确 定', 'system.button.confirm2')
164
- }}
165
- </el-button>
166
- </div>
167
- </div>
168
- </div>
169
- <div class="pop-tipsBox" style="display: block;" v-if="rejectDialogVisible">
170
- <div>
171
- <i class="icon"></i>
172
- <div class="cont">
173
- <p class="name">{{ $t2('流程驳回', 'components.wf.wfReject') }}<span
174
- >—</span><b
175
- class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
176
- wfInfo.taskName
177
- }}</b></p>
178
- <el-form label-position="top" class="form-box">
179
- <el-form-item label="驳回节点" field="nodeId">
180
- <el-select v-model="rejectForm.nodeId"
181
- :placeholder="$t2('请选择驳回节点', 'components.wf.rejectNodePlaceholder')">
182
- <el-option v-for="(rejectNode,index) in rejectNodes" :label="rejectNode.nodeName"
183
- :value="rejectNode.nodeId" :key="index"></el-option>
184
- </el-select>
185
- </el-form-item>
186
- <el-form-item label="驳回意见" field="opinion">
187
- <el-input type="textarea" :rows="8"
188
- :placeholder="$t2('请输入内容', 'components.wf.rejectOpinionPlaceholder')"
189
- v-model="rejectForm.opinion" class="txt"></el-input>
190
- </el-form-item>
191
- </el-form>
192
- </div>
193
- <div class="btns">
194
- <el-button type="primary" class="btn" plain icon="el-icon-close" @click="rejectDialogVisible = false">{{
195
- $t2('取 消', 'system.button.cancel2')
196
- }}
197
- </el-button>
198
- <el-button type="primary" class="btn" icon="el-icon-check" @click="subRejectForm()">{{
199
- $t2('确 定', 'system.button.confirm2')
200
- }}
201
- </el-button>
202
- </div>
203
- </div>
204
- </div>
205
- <div class="pop-tipsBox" style="display: block;" v-if="agreeDialogVisible">
206
- <div>
207
- <i class="icon"></i>
208
- <div class="cont">
209
- <p class="name">{{ $t2('流程通过', 'components.wf.wfAgree') }}<span
210
- >—</span><b
211
- class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
212
- wfInfo.taskName
213
- }}</b></p>
214
- <el-form label-position="top" class="form-box">
215
- <!-- 只有分支网关这类多出口节点,getNextOutgoingNodes 才会返回候选节点;
216
- 单出口节点返回空数组,这一项必须整条不渲染,否则会露出一个没有任何
217
- 选项的空下拉(提交时 nodeId 本就传 null,不需要选)。
218
- 与 PC content.vue 的 <tr v-if="agreeNodes.length > 0"> 同口径。 -->
219
- <el-form-item v-if="agreeNodes.length > 0"
220
- :label="$t2('通过节点', 'components.wf.agreeNode')" field="nodeId">
221
- <el-select v-model="agreeForm.nodeId"
222
- :placeholder="$t2('请选择通过节点', 'components.wf.agreeNodePlaceholder')">
223
- <el-option v-for="(node,index) in agreeNodes" :label="node.nodeName"
224
- :value="node.nodeId" :key="index"></el-option>
225
- </el-select>
226
- </el-form-item>
227
- <el-form-item :label="$t2('通过意见', 'components.wf.agreeOpinion')" field="opinion">
228
- <el-input type="textarea" :rows="8" :placeholder="$t2(`请填写您的意见~
229
- 注:
230
- 通过默认意见为“同意”
231
- `, 'components.wf.agreeOpinionPlaceholder')" v-model="agreeForm.opinion"></el-input>
232
- </el-form-item>
233
- </el-form>
234
- </div>
235
- <div class="btns">
236
- <el-button type="primary" class="btn" plain icon="el-icon-close" @click="agreeDialogVisible = false">{{
237
- $t2('取 消', 'system.button.cancel2')
238
- }}
239
- </el-button>
240
- <el-button type="primary" class="btn" icon="el-icon-check" @click="subAgreeForm()">{{
241
- $t2('确 定', 'system.button.confirm2')
242
- }}
243
- </el-button>
244
- </div>
245
- </div>
246
- </div>
247
- <div class="pop-tipsBox" style="display: block;" v-if="changeWfDialogVisible">
248
- <div>
249
- <i class="icon"></i>
250
- <div class="cont">
251
- <p class="name">{{ $t2('流程转办', 'components.wf.wfTransfer') }}<span>—</span><b
252
- class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
253
- wfInfo.taskName
254
- }}</b></p>
255
- <el-form label-position="top" class="form-box">
256
- <el-form-item label="转办人" field="nodeId">
257
- <el-input
258
- class="search-input"
259
- max="200"
260
- v-model="changeWfForm.userNickNames"
261
- @clear="
262
- changeWfForm.userIds = '';
263
- changeUserRows = [];
264
- $forceUpdate();
265
- "
266
- v-el-readonly
267
- clearable
268
- >
269
- <i slot="suffix" class="el-input__icon el-icon-search" @click="showUserDialog = true"></i>
270
- </el-input>
271
- </el-form-item>
272
- <el-form-item label="转办意见" field="opinion">
273
- <el-input type="textarea" :rows="8"
274
- :placeholder="$t2('请输入内容', 'components.wf.transferOpinionPlaceholder')"
275
- v-model="changeWfForm.opinion"></el-input>
276
- </el-form-item>
277
- </el-form>
278
- </div>
279
- <div class="btns">
280
- <el-button type="primary" class="btn" plain @click="changeWfDialogVisible = false">{{
281
- $t2('取 消', 'system.button.cancel2')
282
- }}
283
- </el-button>
284
- <el-button type="primary" class="btn" @click="subChangeWfForm()">
285
- {{ $t2('确认转办', 'components.wf.confirmTransfer') }}
286
- </el-button>
287
- </div>
288
- </div>
289
- </div>
290
- <div class="pop-tipsBox" style="display: block;" v-if="showAddIncreaseSignDialog">
291
- <div>
292
- <i class="icon"></i>
293
- <div class="cont">
294
- <p class="name">
295
- {{ $t2('流程加签', 'components.wf.wfAddIncreaseSign') }}<span>—</span><b
296
- class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
297
- wfInfo.taskName
298
- }}</b>
299
- </p>
300
- <el-form label-position="top" class="form-box">
301
- <el-form-item label="候选人">
302
- <el-input
303
- class="search-input"
304
- max="200"
305
- v-model="addIncreaseSignForm.userNickNames"
306
- @clear="
307
- addIncreaseSignUsers = [];
308
- $forceUpdate();
309
- "
310
- :placeholder="$t2('候选人', 'components.wf.addIncreaseSignUser')"
311
- v-el-readonly
312
- clearable
313
- >
314
- <i slot="suffix" class="el-input__icon el-icon-search"
315
- @click="showAddTaskUserDialog = true"></i>
316
- </el-input>
317
- </el-form-item>
318
- <el-form-item label="加签意见" field="opinion">
319
- <el-input type="textarea" :rows="8"
320
- :placeholder="$t2('请输入内容', 'components.wf.addIncreaseSignOpinionPlaceholder')"
321
- v-model="addIncreaseSignForm.opinion"></el-input>
322
- </el-form-item>
323
- </el-form>
324
- </div>
325
- <div class="btns">
326
- <el-button type="primary" class="btn" plain @click="showAddIncreaseSignDialog = false">{{
327
- $t2('取 消', 'system.button.cancel2')
328
- }}
329
- </el-button>
330
- <el-button type="primary" class="btn" @click="submitAddTaskUserForm(0)">
331
- {{ $t2('确认加签', 'components.wf.confirmAddIncreaseSign') }}
332
- </el-button>
333
- </div>
334
- </div>
335
- </div>
336
-
337
- <user-dialog v-if="showUserDialog" :visiable.sync="showUserDialog" @close="showUserDialog = false"
338
- @confirm="userConfirm" multi="true" :param.sync="wfUserParamForTransfer"
339
- :rows="changeUserRows"></user-dialog>
340
- <urgingDialog v-if="urgingDialogVisible" :visiable.sync="urgingDialogVisible" :wfInfo="wfInfo"
341
- :current_prefix="current_prefix"
342
- @confirm="reloadContent" multi="true"></urgingDialog>
343
- <deleteTaskUserDialog v-if="showDeleteTaskUserDialog" :visiable.sync="showDeleteTaskUserDialog" :wfInfo="wfInfo"
344
- :current_prefix="current_prefix"
345
- @confirm="reloadContent" multi="true"></deleteTaskUserDialog>
346
-
347
- <addTaskUserdialog v-if="showAddTaskUserDialog" :visiable.sync="showAddTaskUserDialog" :wfInfo="wfInfo"
348
- :current_prefix="current_prefix" :rows.sync="addIncreaseSignUsers"
349
- @confirm="confirmAddTaskUser" multi="true"
350
- :param.sync="wfUserParamForAddSign"></addTaskUserdialog>
351
- <user-dialog v-if="showTalkUserDialog" :visiable.sync="showTalkUserDialog" @close="showTalkUserDialog = false"
352
- @confirm="confirmTalkUserDialog" multi="false" :param.sync="wfUserParamForTalk"></user-dialog>
353
- <setCandidateDialog v-if="showSetCandidateDialog" :visiable.sync="showSetCandidateDialog"
354
- @close="closeSetCandidateDialog"
355
- :wfInfo="wfInfo"
356
- :current_prefix="current_prefix"></setCandidateDialog>
357
- </div>
358
- </template>
359
- <script>
360
- import Vue from "vue";
361
-
362
- import settingConfig from "@/settings";
363
- import commonMixin from "../../../mixins/mobile/common/index";
364
- import {getToken} from "../../../utils/auth";
365
-
366
- let configUtil = {
367
- baseUrl: process.env.VUE_APP_BASE_API,
368
- getToken,
369
- settingConfig,
370
- Vue,
371
- };
372
-
373
- function appendPrevChildDom(parentDom, newDom) {
374
- if (parentDom.hasChildNodes()) {
375
- let currentDom = parentDom.children[0];
376
- parentDom.insertBefore(newDom, currentDom);
377
- } else {
378
- parentDom.append(newDom);
379
- }
380
- }
381
-
382
- function getTarget(t) {
383
- return t.parentVue;
384
- }
385
-
386
- export default {
387
- mixins: [commonMixin],
388
- props: {
389
- _wfInfo: Object,
390
- _taskParam: Object,
391
- wfOption: Object,
392
- defaultShowWfContent: Boolean,
393
- // 见模板里 .flowPath-btns 的注释:宿主接管审批动作时藏掉面板内那一排
394
- hideActions: Boolean,
395
- },
396
- components: {
397
- /* 本组件根节点就是 <h5-card-pane>,但此前没在这里注册——手写移动页是靠
398
- mixins/mobile/common 在**宿主**上局部注册才碰巧能渲染。Vue 2 解析组件只查
399
- 自身 components 与全局注册、不查父组件的局部注册,所以被别处(如 xform 的
400
- detail-h5-item)引用时会渲染不出来。补上自己的依赖声明。 */
401
- h5CardPane: () => import('../h5Card/h5CardPane.vue'),
402
- UserDialog: () => import('../../../views/mobile/user/user/dialog.vue'),
403
- urgingDialog: () => import('./urgingDialog'),
404
- deleteTaskUserDialog: () => import('./deleteTaskUserDialog'),
405
- addTaskUserdialog: () => import('./addTaskUserdialog'),
406
- setCandidateDialog: () => import('./setCandidateDialog')
407
- },
408
- computed: {
409
- current_prefix() {
410
- return this.serviceId ? "/" + this.serviceId : "";
411
- },
412
- viewTarget() {
413
- return getTarget(this);
414
- },
415
- isHideWf() {
416
- let that = this.viewTarget;
417
- let _hideWf = that._hideWf || that.$attrs._hideWf;
418
- return _hideWf === true || _hideWf === 'true';
419
- }
420
- },
421
- data() {
422
- let showWfFold =
423
- settingConfig.showWfFold != null && settingConfig.showWfFold != undefined
424
- ? settingConfig.showWfFold
425
- : false;
426
- let showWfContent =
427
- showWfFold &&
428
- settingConfig.defaultShowWfContent != null &&
429
- settingConfig.defaultShowWfContent != undefined
430
- ? settingConfig.defaultShowWfContent
431
- : true;
432
- if (
433
- this.defaultShowWfContent != null &&
434
- this.defaultShowWfContent != undefined
435
- ) {
436
- showWfContent = this.defaultShowWfContent;
437
- }
438
-
439
- return {
440
- showRenwuDialog: false,
441
- showDomContent: false,
442
- showPreviewDialog: false,
443
- objId: null,
444
- wfCode: null,
445
- serviceId: null,
446
- parentVue: null,
447
- wfConfig: null,
448
-
449
- fileInfos: [],
450
- showUserDialog: false,
451
- showContent: true,
452
- objTypeCode: "",
453
- // objId: '',
454
- wfInfo: {},
455
- // currentTask: {},
456
- taskParam: {},
457
- wfImage: "",
458
- wfStartBtn: false,
459
- wfManualendBtn: false,
460
- wfSubmitBtn: false,
461
- wfRejectBtn: false,
462
- changeHandlerBtn: false,
463
- wftaskData: [],
464
- allWfTaskOpinions: [],
465
- vxeOption: {},
466
- rejectNodes: [],
467
- rejectDialogVisible: false,
468
- rejectForm: {
469
- rejectSubmitModel: null,
470
- nodeId: null,
471
- opinion: null,
472
- },
473
- formLabelWidth: "120px",
474
- agreeDialogVisible: false,
475
- agreeForm: {
476
- opinion: this.$t2('同意', 'components.wf.defaultAgreeOption'),
477
- nodeId: null,
478
- },
479
- changeWfDialogVisible: false,
480
- changeWfForm: {},
481
- changeUserRows: [],
482
- taskStatuses: {
483
- start: {
484
- class: "blue",
485
- value: this.$t2('开始', 'components.wf.startStatus'),
486
- },
487
- approve: {
488
- class: "orgn",
489
- value: this.$t2('待审批', 'components.wf.approveStatus'),
490
- },
491
- submit: {
492
- class: "green",
493
- value: this.$t2('同意', 'components.wf.submitStatus'),
494
- },
495
- reject: {
496
- class: "red",
497
- value: this.$t2('驳回', 'components.wf.rejectStatus'),
498
- },
499
- transfer: {
500
- class: "green",
501
- value: this.$t2('转办', 'components.wf.transferStatus'),
502
- },
503
- addIncreaseSign: {
504
- class: "green",
505
- value: this.$t2('加签', 'components.wf.addIncreaseSignStatus'),
506
- },
507
- revoke: {
508
- class: "red",
509
- value: this.$t2('撤回', 'components.wf.revokeStatus'),
510
- },
511
- end: {
512
- class: "gray",
513
- value: this.$t2('结束', 'components.wf.endStatus'),
514
- },
515
- },
516
- opinion: "",
517
- showWfFold: showWfFold,
518
- showWfContent: showWfContent,
519
-
520
- urgingForm: {},
521
- urgingDialogVisible: false,
522
- urgingUserIds: [],
523
- urgingUsers: [],
524
- agreeNodes: [],
525
- showWfManualDialog: false,
526
-
527
- showDeleteTaskUserDialog: false,
528
- showAddTaskUserDialog: false,
529
- wfUserParam: {},
530
- wfUserParamForTransfer: {},//转办
531
- wfUserParamForAddSign: {},//加签
532
- wfUserParamForTalk: {},//沟通
533
- tabIndex: "1",
534
- linkupOption: {},
535
- talkForm: {
536
- receiverName: null,
537
- content: null,
538
- attachmentDTOs: [],
539
- replyId: null
540
- },
541
- showTalkUserDialog: false,
542
- showTalkDialog: false,
543
- showFlowImg: true,
544
- operateType: null,
545
- addIncreaseSignUsers: [],
546
- addIncreaseSignForm: {
547
- userNickNames: null,
548
- opinion: null
549
- },
550
- showAddIncreaseSignDialog: false,
551
- showOpeaImg: true,
552
- showSetCandidateDialog: false,
553
- toTalk: false,
554
- showAllWfOpinon: false,
555
-
556
- revokeDialogVisible: false,
557
- revokeForm: {opinion: null},
558
- wfStatusMap: {
559
- 1: {label: "审核中", type: "warning"},
560
- 3: {label: "已驳回", type: "danger"},
561
- 2: {label: "已完成", type: "success"}
562
- }
563
- };
564
- },
565
- provide() {
566
- return {
567
- getParentVue: () => {
568
- return this.parentVue;
569
- }
570
- };
571
- },
572
- created() {
573
- // this.wfInfo = this._wfInfo;
574
- this.showFlowImg = settingConfig.expandWfImage === false ? false : true;
575
- this.showAllWfOpinon = settingConfig.showAllWfOpinon === true;
576
- },
577
- mounted() {
578
- this.init();
579
- },
580
- methods: {
581
- getWfStatusLabel() {
582
- return this.wfStatusMap[this.wfInfo.stat]?.label;
583
- },
584
- getWfStatusType() {
585
- return this.wfStatusMap[this.wfInfo.stat]?.type;
586
- },
587
- init() {
588
- let opt = this.wfOption;
589
- this.objId = opt.objId;
590
- this.wfCode = opt.wfCode;
591
- this.serviceId = opt.serviceId;
592
- this.parentVue = opt.parentVue;
593
- this.wfConfig = this.wfOption;
594
-
595
- let wfConfig = this.wfOption;
596
- let that = getTarget(this);
597
- let hasWf = false;
598
- let wfInfo, currentTask, taskParam;
599
- let option = {
600
- objId: this.objId,
601
- wfCode: this.wfCode
602
- }
603
- let current_prefix = this.current_prefix;
604
-
605
- let initButton = () => {
606
- /*return
607
- this.$nextTick(() => {
608
- that.$refs.wfButtonGroup.init({
609
- taskParam,
610
- wfInfo,
611
- hasWf,
612
- current_prefix,
613
- wfConfig
614
- });
615
- });*/
616
- }
617
-
618
- this.initWfInfo(option, {
619
- success: res => {
620
- if (res.objx && res.objx.procInstId) {
621
- hasWf = true;
622
- wfInfo = res.objx;
623
- this.wfInfo = wfInfo;
624
- // this.showDomContent = true;
625
-
626
- if (wfInfo.taskId) {
627
- this.getTaskParams(wfInfo.taskId, {
628
- success: res2 => {
629
- taskParam = res2.objx || {};
630
- taskParam.objId = option.objId;
631
- this.taskParam = taskParam;
632
-
633
- initButton();
634
- }
635
- });
636
- } else {
637
- initButton();
638
- }
639
- this.initOperateType();
640
- this.initForAll();
641
- } else {
642
- initButton();
643
- }
644
- }
645
- });
646
- },
647
- initWfInfo(option, httpConfig) {
648
-
649
- let that = getTarget(this);
650
- let id = option.objId;
651
- let code = option.wfCode;
652
- return that.$http({
653
- url: this.current_prefix + '/wf/getWfInfo',
654
- method: `post`,
655
- data: {
656
- objTypeCode: code,
657
- objId: id
658
- },
659
- isLoading: true,
660
- modalStrictly: true,
661
- ...httpConfig
662
- });
663
- },
664
- getTaskParams(taskId, httpConfig) {
665
- let that = getTarget(this);
666
- return that.$http({
667
- url: this.current_prefix + '/wf/getTaskVariables',
668
- method: `post`,
669
- data: {
670
- stringOne: taskId
671
- },
672
- isLoading: true,
673
- modalStrictly: true,
674
- ...httpConfig
675
- });
676
- },
677
-
678
-
679
- initOperateType() {
680
- if (this.operateType) {
681
- let wfInfo = this.wfInfo;
682
- if (wfInfo.toSubmit) {
683
- this.openAgreeDialog('submit');
684
- } else if (wfInfo.toReject) {
685
- this.rejectWfTask('reject');
686
- } else if (wfInfo.toAddIncreaseSign) {
687
- this.openAddIncreaseSign('addIncreaseSign')
688
- } else if (wfInfo.toRevoke) {
689
- this.openRevokeDialog('revoke')
690
- } else if (wfInfo.toLinkup) {
691
- this.openTalkDialog(null, null, 'talk');
692
- } else {
693
- this.operateType = null;
694
- }
695
- }
696
- },
697
- initForAll() {
698
- let that = getTarget(this);
699
- this.initWf(() => {
700
- if (this.wfInfo.procInstId) {
701
- this.initCurrentTask(this.wfInfo.procInstId, () => {
702
- this.initWftask(this.wfInfo.procInstId);
703
- this.getAllWfTaskOpinions();
704
- });
705
- this.initWfUserParam();
706
- this.initTabIndex();
707
- }
708
- });
709
- },
710
- initTabIndex() {
711
- let that = getTarget(this);
712
- that.$http({
713
- url: USER_PREFIX + "/wf_diy_attribute/getValue",
714
- method: `post`,
715
- data: {attributeKey: "param7"},
716
- isLoading: true,
717
- success: (res) => {
718
- let val = res !== null ? res.objx === true : false;
719
- this.toTalk = val;
720
- let flag = false;
721
- if (val) {
722
- let flag1 = that.$attrs._isNotifyMessage == true || that.$attrs._isNotifyMessage == "true";
723
- if (flag1) {
724
- this.tabIndex = "2";
725
- }
726
- if (settingConfig.autoOpenWfLinkup) {
727
- flag = true;
728
- let flag2 = that.$attrs._wfNotifyType == "wfLinkup";
729
- let flag3 = flag1 && flag2;
730
- if (flag3) {
731
- this.$nextTick(() => {
732
- let wfTabPane = this.$refs.wfTabPane;
733
- if (!wfTabPane.showContent) {
734
- wfTabPane.handleFold();
735
- }
736
- });
737
- }
738
- }
739
- }
740
- this.initLinkup(flag);
741
- }
742
- });
743
-
744
- },
745
- initWf(done) {
746
- var data = this.wfInfo;
747
- if (data && data.procInstId) {
748
- /** 流程状态:0未启动,1审核中,2已完成,3驳回,4中断 */
749
- var statuses = {
750
- 1: '<span class="tag">' + this.$t2('审核中', 'components.wf.wfStatus1') + '</span>',
751
- 3: '<span class="tag red">' + this.$t2('已驳回', 'components.wf.wfStatus2') + '</span>',
752
- 2: '<span class="tag green">' + this.$t2('已完成', 'components.wf.wfStatus3') + '</span>',
753
- };
754
- var statusStr = "";
755
- if (data.stat != null) {
756
- statusStr = statuses[data.stat] || "";
757
- }
758
- data.statusStr = statusStr;
759
- this.wfInfo = data;
760
-
761
- this.wfStartBtn = false;
762
- if (data.status != 2 && data.starterId) {
763
- this.wfManualendBtn = true;
764
- }
765
- this.wfSubmitBtn = false;
766
- this.wfRejectBtn = false;
767
-
768
- var url =
769
- this.current_prefix +
770
- "/wf/flowImage?procInstId=" +
771
- data.procInstId +
772
- "&_r=" +
773
- Math.random() +
774
- "&access_token=" +
775
- configUtil.getToken();
776
- this.wfImage = configUtil.baseUrl + url;
777
- done();
778
- }
779
- },
780
- initCurrentTask(procInstId, done) {
781
- if (this.wfInfo.taskId) {
782
- this.wfSubmitBtn = true;
783
- this.wfRejectBtn = true;
784
- this.changeHandlerBtn = true;
785
- }
786
- done();
787
- },
788
- initWftask(procInstId) {
789
- let that = getTarget(this);
790
- that.$http({
791
- url: this.current_prefix + "/wf/getWfTaskOpinionMerge",
792
- data: {
793
- stringOne: procInstId,
794
- },
795
- method: "post",
796
- isLoading: true,
797
- modalStrictly: true,
798
- success: (resultmsg) => {
799
- var datas = resultmsg.objx || [];
800
- this.wftaskData = datas;
801
- },
802
- });
803
- },
804
- getAllWfTaskOpinions() {
805
- if (!this.showAllWfOpinon) {
806
- return;
807
- }
808
- let that = getTarget(this);
809
- let wfInfo = this.wfInfo;
810
- that.$http({
811
- url: this.current_prefix + "/wf/getAllWfTaskOpinions",
812
- data: {
813
- objId: wfInfo.objId,
814
- objTypeCode: wfInfo.objTypeCode
815
- },
816
- method: "post",
817
- isLoading: true,
818
- modalStrictly: true,
819
- success: (resultmsg) => {
820
- var datas = resultmsg.objx || [];
821
- this.allWfTaskOpinions = datas;
822
- },
823
- });
824
- },
825
- openManualDialog(operateType) {
826
- this.operateType = operateType;
827
- this.showWfManualDialog = true;
828
- },
829
- manualEndWf() {
830
- this.showWfManualDialog = false;
831
- let that = getTarget(this);
832
- var procInstId = this.wfInfo.procInstId;
833
- var taskId = this.wfInfo.taskId ? this.wfInfo.taskId : "";
834
- var data = JSON.stringify({
835
- uuid: this.wfInfo.uuid,
836
- });
837
- that.$http({
838
- url: this.current_prefix + "/wf/interrupt",
839
- data: data,
840
- method: "post",
841
- headers: {
842
- "Content-Type": "application/json;charset=utf-8",
843
- },
844
- isLoading: true,
845
- success: (resultMsg) => {
846
- that.$message({
847
- message: resultMsg.content,
848
- type: "success",
849
- duration: 500,
850
- onClose: (t) => {
851
- this.reloadContent();
852
- this.closeWinOnCheck(3);
853
- },
854
- });
855
- },
856
- });
857
- },
858
- async rejectWfTask(operateType) {
859
- // 与 PC wf.js 的 rejectWfTask 同结构:驳回也要先过一遍「驳回提醒」
860
- this.handleReminderContent("rejectReminder", async () => {
861
- let that = getTarget(this);
862
- var procInstId = this.wfInfo.procInstId;
863
- var taskId = this.wfInfo.taskId;
864
- var destinations = [];
865
-
866
- await that.$http({
867
- url: this.current_prefix + "/wf/getPreIncomeNodes",
868
- data: {
869
- stringOne: taskId,
870
- },
871
- method: "post",
872
- //contentType: 'application/json;charset=utf-8',
873
- isLoading: true,
874
- success: (resultMsg) => {
875
- destinations = (resultMsg.objx || []).reverse();
876
- },
877
- });
878
-
879
- if (destinations == null) {
880
- return false;
881
- }
882
- if (destinations.length == 0) {
883
- that.$message({
884
- message: this.$t2('无法驳回,没有目标节点', 'components.wf.rejectWarnMsg1'),
885
- type: "error",
886
- duration: 2 * 1000,
887
- });
888
- return false;
889
- }
890
- this.operateType = operateType;
891
-
892
- /* 驳回后提交模式,取自流程对象配置(wf_obj_config「驳回后提交模式」三选一):
893
- toNextNode === 1 → 顺延下一步提交 → 1
894
- toRejectNode false → 直接提交到驳回节点 → 2
895
- toRejectNode true → 由提交人确定节点提交 → null(提交时自己选)
896
- 三个分支不能省成两个:选了「顺延下一步」时后台把 toRejectNode 置为 null,
897
- 而 null == false 在 JS 里是 false,会落到 null 分支上,配置被静默丢掉。
898
- 与 PC wf.js 的 rejectWfTask 同口径。 */
899
- let rejectSubmitModel = null;
900
- if (this.wfInfo.toNextNode === 1) {
901
- rejectSubmitModel = this.wfInfo.toNextNode
902
- } else {
903
- rejectSubmitModel = this.wfInfo.toRejectNode == false ? 2 : null
904
- }
905
- this.rejectForm.rejectSubmitModel = rejectSubmitModel;
906
- this.rejectForm.nodeId = destinations[0].nodeId;
907
- this.rejectForm.opinion = "";
908
- this.rejectNodes = destinations;
909
- this.rejectDialogVisible = true;
910
- })
911
- },
912
- subRejectForm() {
913
- let that = getTarget(this);
914
- var procInstId = this.wfInfo.procInstId;
915
- var taskId = this.wfInfo.taskId;
916
-
917
- if (!this.rejectForm.nodeId) {
918
- that.$message({
919
- message: this.$t2('请选择驳回节点', 'components.wf.rejectWarnMsg2'),
920
- type: "error",
921
- duration: 2 * 1000,
922
- });
923
- return false;
924
- }
925
-
926
- if (!this.rejectForm.opinion) {
927
- that.$message({
928
- message: this.$t2('请输入驳回意见', 'components.wf.rejectWarnMsg3'),
929
- type: "error",
930
- duration: 2 * 1000,
931
- });
932
- return false;
933
- }
934
-
935
- var data = JSON.stringify({
936
- taskId: taskId,
937
- uuid: this.wfInfo.uuid,
938
- nodeId: this.rejectForm.nodeId,
939
- suggestion: this.rejectForm.opinion,
940
- rejectSubmitModel: this.rejectForm.rejectSubmitModel
941
- });
942
- this.rejectDialogVisible = false;
943
- that.$http({
944
- url: this.current_prefix + "/wf/reject",
945
- data: data,
946
- method: "post",
947
- headers: {
948
- "Content-Type": "application/json;charset=utf-8",
949
- },
950
- isLoading: true,
951
- success: (resultMsg) => {
952
- that.$message({
953
- message: resultMsg.content,
954
- type: "success",
955
- duration: 500,
956
- onClose: (t) => {
957
- this.reloadContent();
958
- this.closeWinOnCheck(2);
959
- },
960
- });
961
- },
962
- });
963
- },
964
- /**
965
- * 提交/驳回前的「提醒内容」:后台按 scriptType 跑脚本,返回文案就先弹确认框,
966
- * 用户点确定才继续;没有文案(或接口 404,即后端未部署该能力)直接放行。
967
- * 与 PC wf.js 的同名方法保持一致。
968
- *
969
- * 提醒只是主流程前面的一道增强,不能让它把主流程带崩或卡死,所以:
970
- * - 放行只允许一次(go 自带闸门),成功/异常各分支共用一个出口;
971
- * - 确认框点取消 = 放弃本次操作,什么都不做,但 MessageBox 的 reject 必须吃掉,
972
- * 否则是一条 unhandled rejection;
973
- * - error 分支绝不能抛异常。request.js 是先调 config.error(e) 再 removeModel(config)
974
- * (见 utils/request.js 的响应错误拦截),这里一抛,isLoading 的全屏遮罩就永远
975
- * 关不掉、整页被锁死。而网络失败/超时时 e.response 本就是 undefined,
976
- * 老写法 e.response.status 必崩 —— 故 status 取值全程判空。
977
- */
978
- handleReminderContent(scriptType, callback) {
979
- let that = getTarget(this);
980
- let called = false;
981
- const go = () => {
982
- if (called) return
983
- called = true;
984
- callback && callback();
985
- };
986
- that.$http({
987
- url: this.current_prefix + "/wf/getReminderContent",
988
- data: {
989
- scriptType,
990
- taskId: this.wfInfo.taskId,
991
- uuid: this.wfInfo.uuid,
992
- },
993
- method: "post",
994
- isLoading: true,
995
- errorMsg: false,
996
- success: (res) => {
997
- if (res && res.objx) {
998
- that.$baseConfirm(res.objx).then(go).catch(() => {});
999
- } else {
1000
- go();
1001
- }
1002
- },
1003
- error: (e) => {
1004
- let status = e && e.response ? e.response.status : null;
1005
- if (status === 404) {
1006
- // 后端没部署这个接口,等同于「没有提醒」,静默放行
1007
- go();
1008
- return
1009
- }
1010
- /* 其余错误只提示不放行:提醒内容可能是必须让人看到的业务警告,
1011
- 接口挂了就悄悄跳过等于把它吞掉。用户重试即可。 */
1012
- that.$errorMsg({
1013
- content: (e && e.message) || this.$t2('获取提醒内容失败', 'components.wf.reminderError'),
1014
- type: 'error',
1015
- }).catch(() => {});
1016
- },
1017
- });
1018
- },
1019
- openAgreeDialog(operateType) {
1020
- const done = () => {
1021
- this.handleReminderContent("submitReminder", () => {
1022
- this.operateType = operateType;
1023
- let that = getTarget(this);
1024
- this.agreeForm = {
1025
- opinion: this.$t2('同意', 'components.wf.defaultAgreeOption'),
1026
- nodeId: null,
1027
- };
1028
- this.agreeNodes = [];
1029
- that.$http({
1030
- url: this.current_prefix + "/wf/getNextOutgoingNodes",
1031
- data: {
1032
- stringOne: this.wfInfo.taskId,
1033
- },
1034
- method: "post",
1035
- isLoading: true,
1036
- success: (res) => {
1037
- let nodes = res.objx || [];
1038
- /*if (tq == true) {
1039
- nodes.reverse();
1040
- }*/
1041
- if (nodes.length) {
1042
- this.agreeForm.nodeId = nodes[0].nodeId;
1043
- }
1044
- this.agreeNodes = nodes;
1045
- this.agreeDialogVisible = true;
1046
- },
1047
- });
1048
- })
1049
- }
1050
- // wfConfig 在 init() 里才赋值(初值 null),这里兜一层空对象
1051
- let wfConfig = this.wfConfig || {};
1052
- if (wfConfig.onClickAgree) {
1053
- wfConfig.onClickAgree(done)
1054
- } else {
1055
- done();
1056
- }
1057
- },
1058
- subAgreeForm() {
1059
- let wfConfig = this.wfConfig;
1060
- let done = () => {
1061
- this.subAgreeHandle();
1062
- }
1063
- if (wfConfig.onBeforeAgree) {
1064
- wfConfig.onBeforeAgree(done)
1065
- } else {
1066
- done();
1067
- }
1068
- },
1069
- subAgreeHandle() {
1070
- let that = getTarget(this);
1071
- let nodeId = null;
1072
- if (this.agreeNodes.length) {
1073
- if (!this.agreeForm.nodeId) {
1074
- that.$message({
1075
- message: this.$t2('请选择节点', 'components.wf.agreeWarnMsg1'),
1076
- type: "error",
1077
- duration: 2 * 1000,
1078
- });
1079
- return;
1080
- }
1081
- nodeId = this.agreeForm.nodeId;
1082
- }
1083
-
1084
- var procInstId = this.wfInfo.procInstId;
1085
- var taskId = this.wfInfo.taskId;
1086
- var memo = this.agreeForm.opinion || this.$t2('同意', 'components.wf.defaultAgreeOption');
1087
- var data = JSON.stringify({
1088
- taskId: taskId,
1089
- uuid: this.wfInfo.uuid,
1090
- suggestion: memo,
1091
- nodeId: nodeId,
1092
- });
1093
- this.agreeDialogVisible = false;
1094
- that.$http({
1095
- url: this.current_prefix + "/wf/submit",
1096
- data: data,
1097
- method: "post",
1098
- headers: {
1099
- "Content-Type": "application/json;charset=utf-8",
1100
- },
1101
- isLoading: true,
1102
- success: (resultMsg) => {
1103
- if (resultMsg.objx && resultMsg.objx.code == "999999") {
1104
- this.errorSubmit({
1105
- taskId: taskId,
1106
- uuid: this.wfInfo.uuid,
1107
- suggestion: memo,
1108
- errorMsg: resultMsg.objx.errorMsg
1109
- });
1110
- } else {
1111
- that.$message({
1112
- message: resultMsg.content,
1113
- type: "success",
1114
- duration: 500,
1115
- onClose: (t) => {
1116
- this.reloadContent();
1117
- this.closeWinOnCheck(1);
1118
- },
1119
- });
1120
- }
1121
- },
1122
- });
1123
- },
1124
- errorSubmit(data) {
1125
- let that = getTarget(this);
1126
- that.$http({
1127
- url: this.current_prefix + "/wf/errorSubmit",
1128
- data: data,
1129
- method: "post",
1130
- isLoading: true,
1131
- success: (resultMsg) => {
1132
- that.$message({
1133
- message: resultMsg.content,
1134
- type: "success",
1135
- duration: 500,
1136
- onClose: (t) => {
1137
- this.reloadContent();
1138
- this.closeWinOnCheck(1);
1139
- },
1140
- });
1141
- },
1142
- });
1143
- },
1144
- openChangeWfForm(operateType) {
1145
- this.operateType = operateType;
1146
- this.changeWfDialogVisible = true;
1147
- this.changeUserRows = [];
1148
- this.changeWfForm = {
1149
- userIds: [],
1150
- userNickNames: null,
1151
- opinion: null,
1152
- };
1153
- },
1154
- subChangeWfForm() {
1155
- let that = getTarget(this);
1156
- var procInstId = this.wfInfo.procInstId;
1157
- var taskId = this.wfInfo.taskId;
1158
-
1159
- var userIds = this.changeWfForm.userIds || [];
1160
- var opinion = this.changeWfForm.opinion || null;
1161
-
1162
- if (!userIds.length) {
1163
- that.$message({
1164
- message: this.$t2('请选择转办人', 'components.wf.transferWarnMsg1'),
1165
- type: "error",
1166
- duration: 2000,
1167
- onClose: (t) => {
1168
- },
1169
- });
1170
- return false;
1171
- }
1172
-
1173
- var data = JSON.stringify({
1174
- taskId: taskId,
1175
- uuid: this.wfInfo.uuid,
1176
- transferTo: userIds,
1177
- suggestion: opinion,
1178
- });
1179
- this.changeWfDialogVisible = false;
1180
- that.$http({
1181
- url: this.current_prefix + "/wf/transfer",
1182
- data: data,
1183
- method: "post",
1184
- headers: {
1185
- "Content-Type": "application/json;charset=utf-8",
1186
- },
1187
- isLoading: true,
1188
- success: (resultMsg) => {
1189
- that.$message({
1190
- message: resultMsg.content,
1191
- type: "success",
1192
- duration: 500,
1193
- onClose: (t) => {
1194
- this.reloadContent();
1195
- this.closeWinOnCheck(4);
1196
- },
1197
- });
1198
- },
1199
- });
1200
- },
1201
- userConfirm(rows) {
1202
- if (rows.length > 0) {
1203
- let changeUserRows = this.changeUserRows;
1204
- let ids = changeUserRows.map((changeUserRow) => changeUserRow.id);
1205
- let addRows = rows.filter((row) => !ids.includes(row.id));
1206
- changeUserRows.push(...addRows);
1207
-
1208
- let row = rows[0];
1209
- this.changeWfForm.userIds = changeUserRows.map(
1210
- (changeUserRow) => changeUserRow.id
1211
- );
1212
- this.changeWfForm.userNickNames = changeUserRows
1213
- .map((changeUserRow) => changeUserRow.nickName)
1214
- .join(",");
1215
- }
1216
- },
1217
- reloadContent() {
1218
- let that = getTarget(this);
1219
- that.$baseReload();
1220
- },
1221
- closeWinOnCheck(flag) {
1222
- //_closeWindowOnCheck=true, 1提交,2驳回,3中断,4转办时,5沟通 关闭窗口
1223
- let that = getTarget(this);
1224
- let _closeWindowOnCheck = that.$attrs._closeWindowOnCheck || that._closeWindowOnCheck;
1225
- if (_closeWindowOnCheck === true || _closeWindowOnCheck === "true") {
1226
- window.close && window.close();
1227
- }
1228
- let _handleCallback = that.$attrs._handleCallback || that._handleCallback;
1229
- _handleCallback && _handleCallback(flag);
1230
- },
1231
- manualCallback() {
1232
- this.$emit("manualCallback");
1233
- },
1234
- openUrgingDialog(operateType) {
1235
- this.operateType = operateType;
1236
- this.urgingDialogVisible = true;
1237
- },
1238
- openDeleteTaskUserDialog(operateType) {
1239
- this.operateType = operateType;
1240
- this.showDeleteTaskUserDialog = true;
1241
- },
1242
- openAddTaskUserDialog(operateType) {
1243
- this.operateType = operateType;
1244
- this.showAddTaskUserDialog = true;
1245
- },
1246
- openAddIncreaseSign(operateType) {
1247
- this.operateType = operateType;
1248
- this.addIncreaseSignUsers = [];
1249
- this.addIncreaseSignForm = {userNickNames: null};
1250
- this.showAddIncreaseSignDialog = true;
1251
- },
1252
- initWfUserParam(callback) {
1253
- this.initTransferUserParam();//转办
1254
- this.initAddSignUserParam();//加签
1255
- this.initTalkUserParam();//沟通
1256
- },
1257
- //
1258
- initTransferUserParam(callback) {
1259
- //初始化转办用户参数
1260
- let that = getTarget(this);
1261
- return that.$http({
1262
- url: USER_PREFIX + "/wf_diy_attribute/getValue",
1263
- method: `post`,
1264
- data: {attributeKey: "param1"},
1265
- isLoading: true,
1266
- modalStrictly: true,
1267
- success: (res) => {
1268
- this.wfUserParamForTransfer = res.objx || {};
1269
- callback && callback();
1270
- },
1271
- });
1272
- },
1273
- initAddSignUserParam(callback) {
1274
- //初始化加签用户参数
1275
- let that = getTarget(this);
1276
- return that.$http({
1277
- url: USER_PREFIX + "/wf_diy_attribute/getValue",
1278
- method: `post`,
1279
- data: {attributeKey: "param2"},
1280
- isLoading: true,
1281
- modalStrictly: true,
1282
- success: (res) => {
1283
- this.wfUserParamForAddSign = res.objx || {};
1284
- callback && callback();
1285
- },
1286
- });
1287
- },
1288
- initTalkUserParam(callback) {
1289
- //初始化沟通用户参数
1290
- let that = getTarget(this);
1291
- return that.$http({
1292
- url: USER_PREFIX + "/wf_diy_attribute/getValue",
1293
- method: `post`,
1294
- data: {attributeKey: "param3"},
1295
- isLoading: true,
1296
- modalStrictly: true,
1297
- success: (res) => {
1298
- this.wfUserParamForTalk = res.objx || {};
1299
- callback && callback();
1300
- },
1301
- });
1302
- },
1303
- //
1304
- resetLinkup() {
1305
- this.formData = {};
1306
- this.$refs["table-linkup"].commitProxy("reload");
1307
- },
1308
- searchLinkup() {
1309
- this.$refs["table-linkup"].commitProxy("reload");
1310
- },
1311
- initLinkup(flag) {
1312
- return
1313
- let h = this.$createElement;
1314
- let statusMap = {
1315
- 0: this.$t2('未完成', 'components.wf.talkStatus0'),
1316
- 1: this.$t2('已完成', 'components.wf.talkStatus1'),
1317
- 2: this.$t2('已取消', 'components.wf.talkStatus2')
1318
- };
1319
- let tableOption = {
1320
- vue: this,
1321
- tableRef: "table-linkup",
1322
- tableName: "wf_table-linkup",
1323
- path: this.current_prefix + "/wf_linkup/listPage",
1324
- param: () => {
1325
- return {
1326
- uuid: this.wfInfo.uuid,
1327
- };
1328
- },
1329
- config: {
1330
- height: 350
1331
- },
1332
- columns: [
1333
- {type: "checkbox", width: 48, resizable: false, fixed: "left"},
1334
- {
1335
- title: this.$t2('任务名称', 'components.wf.taskName'),
1336
- field: "taskName",
1337
- width: 150,
1338
- fixed: "left",
1339
- },
1340
- {
1341
- title: this.$t2('发送人', 'components.wf.senderName'),
1342
- field: "senderName",
1343
- width: 150,
1344
- slots: {
1345
- default: "sender",
1346
- },
1347
- },
1348
- {
1349
- title: this.$t2('接收人', 'components.wf.receiverName'),
1350
- field: "receiverName",
1351
- width: 150,
1352
- slots: {
1353
- default: "receiver",
1354
- },
1355
- },
1356
- {
1357
- title: this.$t2('沟通内容', 'components.wf.talkContent'),
1358
- field: "content",
1359
- width: 250,
1360
- showOverflow: false,
1361
- slots: {
1362
- default: ({row, rowIndex}) => {
1363
- return row.replyId ? ("[" + this.$t2('回复', 'components.wf.reply') + "]" + row.content) : row.content;
1364
- },
1365
- },
1366
- },
1367
- {
1368
- width: 150,
1369
- title: this.$t2('沟通资料', 'components.wf.talkAttachment'),
1370
- field: "attachmentImage",
1371
- sortable: false,
1372
- slots: {
1373
- default: ({row, rowIndex}) => {
1374
- let option = {
1375
- title: this.$t2('沟通资料', 'components.wf.talkAttachment'),
1376
- edit: false,
1377
- rows: (done) => {
1378
- done(row.attachmentDTOs);
1379
- },
1380
- };
1381
- return [
1382
- h("base-attachment", {
1383
- props: {
1384
- option: option,
1385
- },
1386
- }),
1387
- ];
1388
- },
1389
- },
1390
- },
1391
-
1392
- {
1393
- title: this.$t2('状态', 'components.wf.status'),
1394
- field: "status",
1395
- width: 150,
1396
- slots: {
1397
- default: ({row, rowIndex}) => {
1398
- return statusMap[row.status] || "";
1399
- },
1400
- },
1401
- },
1402
- {
1403
- title: this.$t2('创建时间', 'system.label.createDate'),
1404
- field: "createDate",
1405
- width: 150,
1406
- },
1407
- {
1408
- width: 80,
1409
- fixed: "right",
1410
- title: "",
1411
- sortable: false,
1412
- slots: {
1413
- default: "operate"
1414
- }
1415
- },
1416
- ],
1417
- callback: (rows) => {
1418
- if (rows.length && flag) {
1419
- let row = rows[0];
1420
- if (row.replyToSender) {
1421
- this.$nextTick(() => {
1422
- this.tabIndex = "2";
1423
- this.openTalkDialog(row.sender, row.senderName, 'talk', 1, row.id)
1424
- });
1425
- }
1426
- }
1427
- }
1428
- };
1429
- this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
1430
- this.linkupOption = opts;
1431
- });
1432
- },
1433
- cancelTalk(row) {
1434
- let that = getTarget(this);
1435
- that.$baseConfirm(this.$t2('您确定要取消沟通记录吗?', 'components.wf.cancelTalkTip')).then(() => {
1436
- that.$http({
1437
- url: this.current_prefix + "/wf_linkup/cancel",
1438
- data: {id: row.id},
1439
- method: "post",
1440
- loadingTarget: document.body,
1441
- isLoading: true,
1442
- success: (resultMsg) => {
1443
- that.$message({
1444
- message: resultMsg.content,
1445
- type: "success",
1446
- duration: 500,
1447
- onClose: (t) => {
1448
- this.reloadContent();
1449
- },
1450
- });
1451
- },
1452
- });
1453
- });
1454
- },
1455
- openTalkDialog(receiver, receiverName, operateType, flag, replyId) {
1456
- this.operateType = operateType;
1457
- /*this.talkForm.receiver = receiver || null;
1458
- this.talkForm.receiverName = receiverName || null;
1459
- this.talkForm.replyId = replyId || null;
1460
- this.talkForm.content = null;
1461
- this.talkForm.attachmentDTOs = [];*/
1462
- this.initTalkForm(receiver, receiverName, replyId)
1463
- this.showTalkDialog = true;
1464
- if (flag == 1) {
1465
- let opeaBtnDom = this.$refs.opeaBtn;
1466
- opeaBtnDom && opeaBtnDom.scrollIntoView();
1467
- }
1468
- },
1469
- initTalkForm(receiver, receiverName, replyId) {
1470
- this.talkForm.receiver = receiver || null;
1471
- this.talkForm.receiverName = receiverName || null;
1472
- this.talkForm.replyId = replyId || null;
1473
- this.talkForm.content = null;
1474
- this.talkForm.attachmentDTOs = [];
1475
- },
1476
- submitTalkForm() {
1477
- let that = getTarget(this);
1478
- var procInstId = this.wfInfo.procInstId;
1479
- var taskId = this.wfInfo.taskId;
1480
-
1481
- if (!this.talkForm.receiver) {
1482
- that.$message({
1483
- message: this.$t2('请选择接收人', 'components.wf.talkWarnMsg1'),
1484
- type: "error",
1485
- duration: 2 * 1000,
1486
- });
1487
- return false;
1488
- }
1489
- if (!this.talkForm.content) {
1490
- that.$message({
1491
- message: this.$t2('请输入沟通内容', 'components.wf.talkWarnMsg2'),
1492
- type: "error",
1493
- duration: 2 * 1000,
1494
- });
1495
- return false;
1496
- }
1497
-
1498
- var data = {
1499
- taskId: taskId,
1500
- uuid: this.wfInfo.uuid,
1501
- receiver: this.talkForm.receiver,
1502
- receiverName: this.talkForm.receiverName,
1503
- replyId: this.talkForm.replyId,
1504
- content: this.talkForm.content,
1505
- attachmentDTOs: this.talkForm.attachmentDTOs,
1506
- notifyType: "wfLinkup",
1507
- };
1508
- this.showTalkDialog = false;
1509
- that.$http({
1510
- url: this.current_prefix + "/wf_linkup/save",
1511
- data: data,
1512
- method: "post",
1513
- isLoading: true,
1514
- success: (resultMsg) => {
1515
- that.$message({
1516
- message: resultMsg.content,
1517
- type: "success",
1518
- duration: 500,
1519
- onClose: (t) => {
1520
- this.reloadContent();
1521
- this.closeWinOnCheck(5);
1522
- },
1523
- });
1524
- },
1525
- });
1526
- },
1527
- openTalkUserDialog() {
1528
- this.showTalkUserDialog = true;
1529
- },
1530
- confirmTalkUserDialog(rows) {
1531
- if (rows.length > 0) {
1532
- let row = rows[0];
1533
- if (this.talkForm.receiver != row.id) {
1534
- this.talkForm.replyId = null;
1535
- }
1536
- this.talkForm.receiver = row.id;
1537
- this.talkForm.receiverName = row.nickName;
1538
- }
1539
- },
1540
- confirmUrging() {
1541
- this.reloadContent();
1542
- },
1543
- confirmDeleteTaskUser() {
1544
- this.reloadContent();
1545
- },
1546
- confirmAddTaskUser(rows) {
1547
- this.addIncreaseSignUsers = rows;
1548
- this.addIncreaseSignForm.userNickNames = rows.map(row => row.nickName).join(',');
1549
- // this.reloadContent();
1550
- },
1551
- submitAddTaskUserForm(flag) {
1552
- let that = getTarget(this);
1553
- let userIds = this.addIncreaseSignUsers.map((checkRow) => checkRow.id);
1554
- if (userIds.length == 0) {
1555
- that.$message({
1556
- message: this.$t2('请选择候选人', 'components.wf.addIncreaseSignWarnMsg1'),
1557
- type: "error",
1558
- duration: 2000,
1559
- onClose: (t) => {
1560
- },
1561
- });
1562
- return false;
1563
- }
1564
- let toDo = () => {
1565
- var data = JSON.stringify({
1566
- uuid: this.wfInfo.uuid,
1567
- taskId: this.wfInfo.taskId,
1568
- userIds: userIds,
1569
- suggestion: this.addIncreaseSignForm.opinion
1570
-
1571
- });
1572
- this.agreeDialogVisible = false;
1573
- that.$http({
1574
- url: this.current_prefix + "/wf/addIncreaseSign",
1575
- data: data,
1576
- method: "post",
1577
- loadingTarget: document.body,
1578
- headers: {
1579
- "Content-Type": "application/json;charset=utf-8",
1580
- },
1581
- isLoading: true,
1582
- success: (resultMsg) => {
1583
- that.$message({
1584
- message: resultMsg.content,
1585
- type: "success",
1586
- duration: 500,
1587
- onClose: (t) => {
1588
- this.reloadContent();
1589
- },
1590
- });
1591
- },
1592
- });
1593
- }
1594
- if (flag === 0) {
1595
- toDo();
1596
- } else {
1597
- that.$baseConfirm(this.$t2('您确定要加签吗?', 'components.wf.addIncreaseSignConfirmTip')).then(() => {
1598
- toDo();
1599
- });
1600
- }
1601
- },
1602
- openSetCandidateDialog(operateType) {
1603
- this.operateType = operateType;
1604
- this.showSetCandidateDialog = true;
1605
- },
1606
- closeSetCandidateDialog() {
1607
- this.showSetCandidateDialog = false;
1608
- this.reloadContent();
1609
- },
1610
- openRevokeDialog(operateType) {
1611
- this.operateType = operateType;
1612
- this.revokeForm = {opinion: null}
1613
- this.revokeDialogVisible = true;
1614
- },
1615
- subRevokeForm(flag) {
1616
- //撤回
1617
- let that = getTarget(this);
1618
- let toDo = () => {
1619
- var data = JSON.stringify({
1620
- uuid: this.wfInfo.uuid,
1621
- taskId: this.wfInfo.taskId,
1622
- suggestion: this.revokeForm.opinion,
1623
- });
1624
- this.revokeDialogVisible = false;
1625
- that.$http({
1626
- url: this.current_prefix + "/wf/revoke",
1627
- data: data,
1628
- method: "post",
1629
- loadingTarget: document.body,
1630
- headers: {
1631
- "Content-Type": "application/json;charset=utf-8",
1632
- },
1633
- isLoading: true,
1634
- success: (resultMsg) => {
1635
- that.$message({
1636
- message: resultMsg.content,
1637
- type: "success",
1638
- duration: 500,
1639
- onClose: (t) => {
1640
- this.reloadContent();
1641
- },
1642
- });
1643
- },
1644
- });
1645
- }
1646
- if (flag === 0) {
1647
- toDo();
1648
- } else {
1649
- that.$baseConfirm(this.$t2('您确定要撤回吗?', 'components.wf.revokeConfirmTip')).then(() => {
1650
- toDo();
1651
- });
1652
- }
1653
- }
1654
- }
1655
- }
1656
- </script>
1657
-
1658
- <style scoped>
1659
- ::v-deep .form-box.el-form .el-form-item .el-form-item__label {
1660
- width: 70px
1661
- }
1662
- </style>
1
+ <template>
2
+ <div>
3
+ <h5-card-pane label="流程信息">
4
+ <template #default>
5
+ <div class="flowPath-box">
6
+ <!-- 这一行的值是 wfInfo.name(流程主题),标签原先误写成「任务情况」——
7
+ 与下面第三行「查看任务情况」重名。PC content.vue 同一个值的标签就是
8
+ 「流程主题」(components.wf.theme)。 -->
9
+ <div class="t"><span>{{ $t2('流程主题', 'components.wf.theme') }}</span></div>
10
+ <div class="c">
11
+ <div class="name">
12
+ {{ (wfInfo.createDate ? wfInfo.createDate.substring(0, 10) : '') + wfInfo.name }}
13
+ <el-tag :type="getWfStatusType()" size="mini">{{ getWfStatusLabel() }}</el-tag>
14
+ </div>
15
+ </div>
16
+ <div class="m2">
17
+ <div class="t"><span>{{ $t2('流程图', 'components.wf.wfImage') }}</span></div>
18
+ <div class="c">
19
+ <el-button class="btn" @click="showPreviewDialog=true" icon="el-icon-view">查看流程图</el-button>
20
+ </div>
21
+ </div>
22
+ <div class="m2">
23
+ <div class="t"><span>{{ $t2('任务情况', 'components.wf.taskInfo') }}</span></div>
24
+ <div class="c">
25
+ <el-button class="btn" @click="showRenwuDialog=true" icon="iconfont icon-preview">查看任务情况
26
+ </el-button>
27
+ </div>
28
+ </div>
29
+
30
+ </div>
31
+ <!-- hideActions:宿主已经把审批动作提到别处(如 xform H5 的底部动作栏)时,
32
+ 这一排整条藏掉,避免一个动作出现两份。与 PC content.vue 的
33
+ headerActionsMounted 同意图,这里做成 prop 是为了没有时序问题。 -->
34
+ <div class="flowPath-btns" v-show="!hideActions">
35
+ <el-button type="success" plain class="btn" @click="openAgreeDialog" v-show="wfInfo.toSubmit"
36
+ icon="iconfont icon-tongguo">{{ $t2('通过', 'components.wf.agree') }}
37
+ </el-button>
38
+ <el-button type="warning" plain class="btn" @click="openManualDialog" v-show="wfInfo.toInterrupt"
39
+ icon="iconfont icon-caozuozhongduan">{{ $t2('中断', 'components.wf.manual') }}
40
+ </el-button>
41
+ <el-button type="danger" plain class="btn" @click="rejectWfTask" v-show="wfInfo.toReject"
42
+ icon="iconfont icon-a-bohui1">{{ $t2('驳回', 'components.wf.reject') }}
43
+ </el-button>
44
+ <el-button type="primary" plain class="btn" @click="openChangeWfForm"
45
+ v-show="transferEnabled && ((wfInfo.toTransfer===null || wfInfo.toTransfer===undefined) ? wfInfo.toSubmit: wfInfo.toTransfer)"
46
+ icon="iconfont icon-zhuanban">{{ $t2('转办', 'components.wf.transfer') }}
47
+ </el-button>
48
+ <el-button type="primary" plain class="btn" @click="openUrgingDialog" v-show="wfInfo.toInterrupt"
49
+ icon="iconfont icon-cuiban">{{ $t2('催办', 'components.wf.urging') }}
50
+ </el-button>
51
+ <el-button type="primary" plain class="btn" @click="openAddIncreaseSign" v-show="wfInfo.toAddIncreaseSign"
52
+ icon="el-icon-plus">{{ $t2('加签', 'components.wf.addIncreaseSign') }}
53
+ </el-button>
54
+ <el-button type="primary" plain class="btn" @click="openDeleteTaskUserDialog"
55
+ v-show="wfInfo.toDeleteIncreaseSign"
56
+ icon="el-icon-delete">{{ $t2('减签', 'components.wf.deleteIncreaseSign') }}
57
+ </el-button>
58
+ <el-button type="primary" plain class="btn" @click="openTalkDialog()"
59
+ icon="el-icon-chat-dot-square" v-if="toTalk && wfInfo.toLinkup">
60
+ {{ $t2('沟通', 'components.wf.talk') }}
61
+ </el-button>
62
+ <el-button type="primary" plain class="btn" @click="openSetCandidateDialog(null)"
63
+ v-show="wfInfo.toSetCandidate"
64
+ icon="el-icon-user">{{ $t2('修改候选人', 'components.wf.setCandidate') }}
65
+ </el-button>
66
+ <el-button type="danger" plain class="btn" @click="openRevokeDialog(null)"
67
+ v-show="wfInfo.toRevoke"
68
+ icon="el-icon-document-delete">{{ $t2('撤回', 'components.wf.revoke') }}
69
+ </el-button>
70
+ </div>
71
+ </template>
72
+ </h5-card-pane>
73
+
74
+ <!-- 流程相关的弹框必须放在卡片外面。h5CardPane 折叠时会给 .cont 加
75
+ display:none,放在插槽里的弹框会被一起隐藏 —— 表现为「流程信息收起后,
76
+ 通过/驳回/转办这些弹框点了没反应」(祖先 display:none 无法被后代覆盖)。 -->
77
+ <el-dialog
78
+ title="流程图预览"
79
+ :modal-append-to-body="false"
80
+ :close-on-click-modal="false"
81
+ :visible.sync="showPreviewDialog"
82
+ :modal="false"
83
+ custom-class="dialog-style h5view-dialog"
84
+ width="100%"
85
+ top="0px"
86
+ v-el-drag-dialog
87
+ v-el-dialog-center
88
+ :append-to-body ="true"
89
+ :destroy-on-close="true"
90
+ >
91
+ <div class="flex">
92
+ <el-form label-position="top" class="form-box">
93
+ <div class="tit"><span>{{
94
+ (wfInfo.createDate ? wfInfo.createDate.substring(0, 10) : '') + wfInfo.name
95
+ }}</span></div>
96
+ <iframe
97
+ ref="wfPreviewFrame"
98
+ style="width: 100%;flex:1"
99
+ :src="wfImage"
100
+ @load="fitWorkflowPreview"
101
+ ></iframe>
102
+ </el-form>
103
+ </div>
104
+ <span slot="footer" class="dialog-footer">
105
+ <el-button
106
+ type="primary"
107
+ plain
108
+ class="button-sty"
109
+ icon="el-icon-close"
110
+ @click="showPreviewDialog = false"
111
+ >{{$t2('关 闭', 'system.button.close2')}}</el-button
112
+ >
113
+ </span>
114
+ </el-dialog>
115
+
116
+ <el-dialog
117
+ title="任务情况预览"
118
+ :modal-append-to-body="false"
119
+ :close-on-click-modal="false"
120
+ :visible.sync="showRenwuDialog"
121
+ :modal="false"
122
+ custom-class="dialog-style h5view-dialog"
123
+ width="100%"
124
+ top="0px"
125
+ v-el-drag-dialog
126
+ v-el-dialog-center
127
+ :append-to-body ="true"
128
+ :destroy-on-close="true"
129
+ >
130
+ <div class="flex">
131
+ <div class="h5-process-info">
132
+ <div class="item" v-for="wftaskLineData in wftaskData" :key="wftaskLineData.id">
133
+ <div class="time">
134
+ {{ wftaskLineData.approveTime ? wftaskLineData.approveTime.substring(0, 10) : '' }}
135
+ <br/>
136
+ {{ wftaskLineData.approveTime ? wftaskLineData.approveTime.substring(11) : '' }}
137
+ </div>
138
+ <div class="status"
139
+ :class="taskStatuses[wftaskLineData.type]?taskStatuses[wftaskLineData.type].class:''">
140
+ {{ taskStatuses[wftaskLineData.type] ? taskStatuses[wftaskLineData.type].value : null }}
141
+ </div>
142
+ <i class="circle"></i>
143
+ <div class="info">
144
+ <p>
145
+ <span class="name">{{ wftaskLineData.taskName }}</span>
146
+ <span>{{ $t2('执行人', 'components.wf.approverName') }}:{{ wftaskLineData.approverName }}</span>
147
+ <span>
148
+ {{ $t2('候选人', 'components.wf.candidateName') }}:
149
+ <span class="">{{ wftaskLineData.candidateNames }}</span>
150
+ </span>
151
+ </p>
152
+ <p class="t"><span class="t1">{{ $t2('备注/意见', 'components.wf.opinion') }}:</span><span>{{
153
+ wftaskLineData.opinion
154
+ }}</span></p>
155
+ </div>
156
+ </div>
157
+ </div>
158
+ </div>
159
+ <!-- 同上:只读预览,合成一个「关 闭」 -->
160
+ <span slot="footer" class="dialog-footer">
161
+ <el-button
162
+ type="primary"
163
+ plain
164
+ class="button-sty"
165
+ icon="el-icon-close"
166
+ @click="showRenwuDialog = false"
167
+ >{{$t2('关 闭', 'system.button.close2')}}</el-button
168
+ >
169
+ </span>
170
+ </el-dialog>
171
+ <!-- 下面 5 个确认框(中断 / 驳回 / 通过 / 转办 / 加签)都走 v-append-to-body:
172
+ 节点搬到 document.body 下,不再靠 position:fixed 在宿主子树里侥幸生效。
173
+ 它们保持 .pop-tipsBox 的原造型,没有改成 el-dialog——那个圆角卡片 + 顶部
174
+ 溢出圆形图标的样子要用 el-dialog 复刻,得把 header/body/footer 三段默认
175
+ 样式全推翻,样式量不减反增。
176
+
177
+ 三条约束,改动前先看 directive/append-to-body/index.js 的说明:
178
+ 1. 必须是 v-show,不能换回 v-if(Vue 的 insert() 会静默跳过以被搬走的
179
+ 节点为参照物的插入,兄弟顺序会错乱);
180
+ 2. 内联 style="display: block;" 不能删(v-show 的 originalDisplay 取自
181
+ 它,删了「显示」态会退回各应用 h5.scss 里 .pop-tipsBox{display:none});
182
+ 3. 多挂的 h5-pop-tips 类是样式作用域锚点——搬到 body 后 .xform-h5 前缀
183
+ 全部失配,样式改挂在 .pop-tipsBox.h5-pop-tips 上,既保住原有优先级,
184
+ 又不会误伤同样用 .pop-tipsBox 的 confirmDialog / baseAlert / errorMsg。 -->
185
+ <div class="pop-tipsBox h5-pop-tips" style="display: block;" v-show="showWfManualDialog"
186
+ v-append-to-body>
187
+ <div>
188
+ <i class="icon"></i>
189
+ <div class="cont">
190
+ <p class="name">
191
+ {{ $t2('流程中断', 'components.wf.wfManual') }}<span>—</span><b
192
+ class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
193
+ wfInfo.taskName
194
+ }}</b>
195
+ </p>
196
+ <p class="txt">{{ $t2('您确定要中断流程吗?', 'components.wf.manualTip') }}</p>
197
+ </div>
198
+ <div class="btns">
199
+ <el-button type="primary" class="btn" plain icon="el-icon-close" @click="showWfManualDialog = false">{{
200
+ $t2('取 消', 'system.button.cancel2')
201
+ }}
202
+ </el-button>
203
+ <el-button type="primary" class="btn" icon="el-icon-check" @click="manualEndWf()">{{
204
+ $t2('确 定', 'system.button.confirm2')
205
+ }}
206
+ </el-button>
207
+ </div>
208
+ </div>
209
+ </div>
210
+ <div class="pop-tipsBox h5-pop-tips" style="display: block;" v-show="rejectDialogVisible"
211
+ v-append-to-body>
212
+ <div>
213
+ <i class="icon"></i>
214
+ <div class="cont">
215
+ <p class="name">{{ $t2('流程驳回', 'components.wf.wfReject') }}<span
216
+ >—</span><b
217
+ class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
218
+ wfInfo.taskName
219
+ }}</b></p>
220
+ <el-form label-position="top" class="form-box">
221
+ <el-form-item label="驳回节点" field="nodeId">
222
+ <el-select v-model="rejectForm.nodeId"
223
+ :placeholder="$t2('请选择驳回节点', 'components.wf.rejectNodePlaceholder')">
224
+ <el-option v-for="(rejectNode,index) in rejectNodes" :label="rejectNode.nodeName"
225
+ :value="rejectNode.nodeId" :key="index"></el-option>
226
+ </el-select>
227
+ </el-form-item>
228
+ <el-form-item label="驳回意见" field="opinion">
229
+ <el-input type="textarea" :rows="5"
230
+ :placeholder="$t2('请输入内容', 'components.wf.rejectOpinionPlaceholder')"
231
+ v-model="rejectForm.opinion" class="txt"></el-input>
232
+ </el-form-item>
233
+ </el-form>
234
+ </div>
235
+ <div class="btns">
236
+ <el-button type="primary" class="btn" plain icon="el-icon-close" @click="rejectDialogVisible = false">{{
237
+ $t2('取 消', 'system.button.cancel2')
238
+ }}
239
+ </el-button>
240
+ <el-button type="primary" class="btn" icon="el-icon-check" @click="subRejectForm()">{{
241
+ $t2('确 定', 'system.button.confirm2')
242
+ }}
243
+ </el-button>
244
+ </div>
245
+ </div>
246
+ </div>
247
+ <div class="pop-tipsBox h5-pop-tips" style="display: block;" v-show="agreeDialogVisible"
248
+ v-append-to-body>
249
+ <div>
250
+ <i class="icon"></i>
251
+ <div class="cont">
252
+ <p class="name">{{ $t2('流程通过', 'components.wf.wfAgree') }}<span
253
+ >—</span><b
254
+ class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
255
+ wfInfo.taskName
256
+ }}</b></p>
257
+ <el-form label-position="top" class="form-box">
258
+ <!-- 只有分支网关这类多出口节点,getNextOutgoingNodes 才会返回候选节点;
259
+ 单出口节点返回空数组,这一项必须整条不渲染,否则会露出一个没有任何
260
+ 选项的空下拉(提交时 nodeId 本就传 null,不需要选)。
261
+ 与 PC content.vue 的 <tr v-if="agreeNodes.length > 0"> 同口径。 -->
262
+ <el-form-item v-if="agreeNodes.length > 0"
263
+ :label="$t2('通过节点', 'components.wf.agreeNode')" field="nodeId">
264
+ <el-select v-model="agreeForm.nodeId"
265
+ :placeholder="$t2('请选择通过节点', 'components.wf.agreeNodePlaceholder')">
266
+ <el-option v-for="(node,index) in agreeNodes" :label="node.nodeName"
267
+ :value="node.nodeId" :key="index"></el-option>
268
+ </el-select>
269
+ </el-form-item>
270
+ <el-form-item :label="$t2('通过意见', 'components.wf.agreeOpinion')" field="opinion">
271
+ <el-input type="textarea" :rows="8" :placeholder="$t2(`请填写您的意见~
272
+ 注:
273
+ 通过默认意见为“同意”
274
+ `, 'components.wf.agreeOpinionPlaceholder')" v-model="agreeForm.opinion"></el-input>
275
+ </el-form-item>
276
+ </el-form>
277
+ </div>
278
+ <div class="btns">
279
+ <el-button type="primary" class="btn" plain icon="el-icon-close" @click="agreeDialogVisible = false">{{
280
+ $t2('取 消', 'system.button.cancel2')
281
+ }}
282
+ </el-button>
283
+ <el-button type="primary" class="btn" icon="el-icon-check" @click="subAgreeForm()">{{
284
+ $t2('确 定', 'system.button.confirm2')
285
+ }}
286
+ </el-button>
287
+ </div>
288
+ </div>
289
+ </div>
290
+ <div class="pop-tipsBox h5-pop-tips" style="display: block;" v-show="changeWfDialogVisible"
291
+ v-append-to-body>
292
+ <div>
293
+ <i class="icon"></i>
294
+ <div class="cont">
295
+ <p class="name">{{ $t2('流程转办', 'components.wf.wfTransfer') }}<span>—</span><b
296
+ class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
297
+ wfInfo.taskName
298
+ }}</b></p>
299
+ <el-form label-position="top" class="form-box">
300
+ <el-form-item label="转办人" field="nodeId">
301
+ <el-input
302
+ class="search-input"
303
+ max="200"
304
+ v-model="changeWfForm.userNickNames"
305
+ @clear="
306
+ changeWfForm.userIds = '';
307
+ changeUserRows = [];
308
+ $forceUpdate();
309
+ "
310
+ v-el-readonly
311
+ clearable
312
+ >
313
+ <i slot="suffix" class="el-input__icon el-icon-search" @click="showUserDialog = true"></i>
314
+ </el-input>
315
+ </el-form-item>
316
+ <el-form-item label="转办意见" field="opinion">
317
+ <el-input type="textarea" :rows="8"
318
+ :placeholder="$t2('请输入内容', 'components.wf.transferOpinionPlaceholder')"
319
+ v-model="changeWfForm.opinion"></el-input>
320
+ </el-form-item>
321
+ </el-form>
322
+ </div>
323
+ <div class="btns">
324
+ <el-button type="primary" class="btn" plain @click="changeWfDialogVisible = false">{{
325
+ $t2('取 消', 'system.button.cancel2')
326
+ }}
327
+ </el-button>
328
+ <el-button type="primary" class="btn" @click="subChangeWfForm()">
329
+ {{ $t2('确认转办', 'components.wf.confirmTransfer') }}
330
+ </el-button>
331
+ </div>
332
+ </div>
333
+ </div>
334
+ <div class="pop-tipsBox h5-pop-tips" style="display: block;" v-show="showAddIncreaseSignDialog"
335
+ v-append-to-body>
336
+ <div>
337
+ <i class="icon"></i>
338
+ <div class="cont">
339
+ <p class="name">
340
+ {{ $t2('流程加签', 'components.wf.wfAddIncreaseSign') }}<span>—</span><b
341
+ class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
342
+ wfInfo.taskName
343
+ }}</b>
344
+ </p>
345
+ <el-form label-position="top" class="form-box">
346
+ <el-form-item label="候选人">
347
+ <el-input
348
+ class="search-input"
349
+ max="200"
350
+ v-model="addIncreaseSignForm.userNickNames"
351
+ @clear="
352
+ addIncreaseSignUsers = [];
353
+ $forceUpdate();
354
+ "
355
+ :placeholder="$t2('候选人', 'components.wf.addIncreaseSignUser')"
356
+ v-el-readonly
357
+ clearable
358
+ >
359
+ <i slot="suffix" class="el-input__icon el-icon-search"
360
+ @click="showAddTaskUserDialog = true"></i>
361
+ </el-input>
362
+ </el-form-item>
363
+ <el-form-item label="加签意见" field="opinion">
364
+ <el-input type="textarea" :rows="8"
365
+ :placeholder="$t2('请输入内容', 'components.wf.addIncreaseSignOpinionPlaceholder')"
366
+ v-model="addIncreaseSignForm.opinion"></el-input>
367
+ </el-form-item>
368
+ </el-form>
369
+ </div>
370
+ <div class="btns">
371
+ <el-button type="primary" class="btn" plain @click="showAddIncreaseSignDialog = false">{{
372
+ $t2('取 消', 'system.button.cancel2')
373
+ }}
374
+ </el-button>
375
+ <el-button type="primary" class="btn" @click="submitAddTaskUserForm(0)">
376
+ {{ $t2('确认加签', 'components.wf.confirmAddIncreaseSign') }}
377
+ </el-button>
378
+ </div>
379
+ </div>
380
+ </div>
381
+
382
+ <user-dialog v-if="showUserDialog" :visiable.sync="showUserDialog" @close="showUserDialog = false"
383
+ @confirm="userConfirm" multi="true" :param.sync="wfUserParamForTransfer"
384
+ :rows="changeUserRows"></user-dialog>
385
+ <urgingDialog v-if="urgingDialogVisible" :visiable.sync="urgingDialogVisible" :wfInfo="wfInfo"
386
+ :current_prefix="current_prefix"
387
+ @confirm="reloadContent" multi="true"></urgingDialog>
388
+ <deleteTaskUserDialog v-if="showDeleteTaskUserDialog" :visiable.sync="showDeleteTaskUserDialog" :wfInfo="wfInfo"
389
+ :current_prefix="current_prefix"
390
+ @confirm="reloadContent" multi="true"></deleteTaskUserDialog>
391
+
392
+ <addTaskUserdialog v-if="showAddTaskUserDialog" :visiable.sync="showAddTaskUserDialog" :wfInfo="wfInfo"
393
+ :current_prefix="current_prefix" :rows.sync="addIncreaseSignUsers"
394
+ @confirm="confirmAddTaskUser" multi="true"
395
+ :param.sync="wfUserParamForAddSign"></addTaskUserdialog>
396
+ <user-dialog v-if="showTalkUserDialog" :visiable.sync="showTalkUserDialog" @close="showTalkUserDialog = false"
397
+ @confirm="confirmTalkUserDialog" multi="false" :param.sync="wfUserParamForTalk"></user-dialog>
398
+ <setCandidateDialog v-if="showSetCandidateDialog" :visiable.sync="showSetCandidateDialog"
399
+ @close="closeSetCandidateDialog"
400
+ :wfInfo="wfInfo"
401
+ :current_prefix="current_prefix"></setCandidateDialog>
402
+ </div>
403
+ </template>
404
+ <script>
405
+ import Vue from "vue";
406
+
407
+ import settingConfig from "@/settings";
408
+ import commonMixin from "../../../mixins/mobile/common/index";
409
+ import {getToken} from "../../../utils/auth";
410
+ import {isWfTransferEnabled, loadWfTransferEnabled} from "../../wf/wfTransferEnabled";
411
+
412
+ let configUtil = {
413
+ baseUrl: process.env.VUE_APP_BASE_API,
414
+ getToken,
415
+ settingConfig,
416
+ Vue,
417
+ };
418
+
419
+ function appendPrevChildDom(parentDom, newDom) {
420
+ if (parentDom.hasChildNodes()) {
421
+ let currentDom = parentDom.children[0];
422
+ parentDom.insertBefore(newDom, currentDom);
423
+ } else {
424
+ parentDom.append(newDom);
425
+ }
426
+ }
427
+
428
+ function getTarget(t) {
429
+ return t.parentVue;
430
+ }
431
+
432
+ export default {
433
+ mixins: [commonMixin],
434
+ props: {
435
+ _wfInfo: Object,
436
+ _taskParam: Object,
437
+ wfOption: Object,
438
+ defaultShowWfContent: Boolean,
439
+ // 见模板里 .flowPath-btns 的注释:宿主接管审批动作时藏掉面板内那一排
440
+ hideActions: Boolean,
441
+ },
442
+ components: {
443
+ /* 本组件根节点就是 <h5-card-pane>,但此前没在这里注册——手写移动页是靠
444
+ mixins/mobile/common 在**宿主**上局部注册才碰巧能渲染。Vue 2 解析组件只查
445
+ 自身 components 与全局注册、不查父组件的局部注册,所以被别处(如 xform 的
446
+ detail-h5-item)引用时会渲染不出来。补上自己的依赖声明。 */
447
+ h5CardPane: () => import('../h5Card/h5CardPane.vue'),
448
+ /* 选用户弹层用包内的 selectUserDialog(el-dialog + append-to-body 版)。
449
+ 原来引的 views/mobile/user/user/dialog.vue 仍是 .pop-box 就地渲染版,
450
+ 且 src/views 不随包发布(被包内组件引用属隐式依赖),保持原样不动。 */
451
+ UserDialog: () => import('./selectUserDialog.vue'),
452
+ urgingDialog: () => import('./urgingDialog'),
453
+ deleteTaskUserDialog: () => import('./deleteTaskUserDialog'),
454
+ addTaskUserdialog: () => import('./addTaskUserdialog'),
455
+ setCandidateDialog: () => import('./setCandidateDialog')
456
+ },
457
+ computed: {
458
+ current_prefix() {
459
+ return this.serviceId ? "/" + this.serviceId : "";
460
+ },
461
+ viewTarget() {
462
+ return getTarget(this);
463
+ },
464
+ isHideWf() {
465
+ let that = this.viewTarget;
466
+ let _hideWf = that._hideWf || that.$attrs._hideWf;
467
+ return _hideWf === true || _hideWf === 'true';
468
+ },
469
+ transferEnabled() {
470
+ return isWfTransferEnabled();
471
+ }
472
+ },
473
+ data() {
474
+ let showWfFold =
475
+ settingConfig.showWfFold != null && settingConfig.showWfFold != undefined
476
+ ? settingConfig.showWfFold
477
+ : false;
478
+ let showWfContent =
479
+ showWfFold &&
480
+ settingConfig.defaultShowWfContent != null &&
481
+ settingConfig.defaultShowWfContent != undefined
482
+ ? settingConfig.defaultShowWfContent
483
+ : true;
484
+ if (
485
+ this.defaultShowWfContent != null &&
486
+ this.defaultShowWfContent != undefined
487
+ ) {
488
+ showWfContent = this.defaultShowWfContent;
489
+ }
490
+
491
+ return {
492
+ showRenwuDialog: false,
493
+ showDomContent: false,
494
+ showPreviewDialog: false,
495
+ objId: null,
496
+ wfCode: null,
497
+ serviceId: null,
498
+ parentVue: null,
499
+ wfConfig: null,
500
+
501
+ fileInfos: [],
502
+ showUserDialog: false,
503
+ showContent: true,
504
+ objTypeCode: "",
505
+ // objId: '',
506
+ wfInfo: {},
507
+ // currentTask: {},
508
+ taskParam: {},
509
+ wfImage: "",
510
+ wfStartBtn: false,
511
+ wfManualendBtn: false,
512
+ wfSubmitBtn: false,
513
+ wfRejectBtn: false,
514
+ changeHandlerBtn: false,
515
+ wftaskData: [],
516
+ allWfTaskOpinions: [],
517
+ vxeOption: {},
518
+ rejectNodes: [],
519
+ rejectDialogVisible: false,
520
+ rejectForm: {
521
+ rejectSubmitModel: null,
522
+ nodeId: null,
523
+ opinion: null,
524
+ },
525
+ formLabelWidth: "120px",
526
+ agreeDialogVisible: false,
527
+ agreeForm: {
528
+ opinion: this.$t2('同意', 'components.wf.defaultAgreeOption'),
529
+ nodeId: null,
530
+ },
531
+ changeWfDialogVisible: false,
532
+ changeWfForm: {},
533
+ changeUserRows: [],
534
+ taskStatuses: {
535
+ start: {
536
+ class: "blue",
537
+ value: this.$t2('开始', 'components.wf.startStatus'),
538
+ },
539
+ approve: {
540
+ class: "orgn",
541
+ value: this.$t2('待审批', 'components.wf.approveStatus'),
542
+ },
543
+ submit: {
544
+ class: "green",
545
+ value: this.$t2('同意', 'components.wf.submitStatus'),
546
+ },
547
+ reject: {
548
+ class: "red",
549
+ value: this.$t2('驳回', 'components.wf.rejectStatus'),
550
+ },
551
+ transfer: {
552
+ class: "green",
553
+ value: this.$t2('转办', 'components.wf.transferStatus'),
554
+ },
555
+ addIncreaseSign: {
556
+ class: "green",
557
+ value: this.$t2('加签', 'components.wf.addIncreaseSignStatus'),
558
+ },
559
+ revoke: {
560
+ class: "red",
561
+ value: this.$t2('撤回', 'components.wf.revokeStatus'),
562
+ },
563
+ end: {
564
+ class: "gray",
565
+ value: this.$t2('结束', 'components.wf.endStatus'),
566
+ },
567
+ },
568
+ opinion: "",
569
+ showWfFold: showWfFold,
570
+ showWfContent: showWfContent,
571
+
572
+ urgingForm: {},
573
+ urgingDialogVisible: false,
574
+ urgingUserIds: [],
575
+ urgingUsers: [],
576
+ agreeNodes: [],
577
+ showWfManualDialog: false,
578
+
579
+ showDeleteTaskUserDialog: false,
580
+ showAddTaskUserDialog: false,
581
+ wfUserParam: {},
582
+ wfUserParamForTransfer: {},//转办
583
+ wfUserParamForAddSign: {},//加签
584
+ wfUserParamForTalk: {},//沟通
585
+ tabIndex: "1",
586
+ linkupOption: {},
587
+ talkForm: {
588
+ receiverName: null,
589
+ content: null,
590
+ attachmentDTOs: [],
591
+ replyId: null
592
+ },
593
+ showTalkUserDialog: false,
594
+ showTalkDialog: false,
595
+ showFlowImg: true,
596
+ operateType: null,
597
+ addIncreaseSignUsers: [],
598
+ addIncreaseSignForm: {
599
+ userNickNames: null,
600
+ opinion: null
601
+ },
602
+ showAddIncreaseSignDialog: false,
603
+ showOpeaImg: true,
604
+ showSetCandidateDialog: false,
605
+ toTalk: false,
606
+ showAllWfOpinon: false,
607
+
608
+ revokeDialogVisible: false,
609
+ revokeForm: {opinion: null},
610
+ wfStatusMap: {
611
+ 1: {label: "审核中", type: "warning"},
612
+ 3: {label: "已驳回", type: "danger"},
613
+ 2: {label: "已完成", type: "success"}
614
+ }
615
+ };
616
+ },
617
+ provide() {
618
+ return {
619
+ getParentVue: () => {
620
+ return this.parentVue;
621
+ }
622
+ };
623
+ },
624
+ created() {
625
+ // this.wfInfo = this._wfInfo;
626
+ this.showFlowImg = settingConfig.expandWfImage === false ? false : true;
627
+ this.showAllWfOpinon = settingConfig.showAllWfOpinon === true;
628
+ },
629
+ mounted() {
630
+ this.init();
631
+ },
632
+ methods: {
633
+ fitWorkflowPreview() {
634
+ /* warm-flow-ui 是独立 iframe,窄屏下默认画布宽于视口,左右节点会被
635
+ 它自己的 overflow:hidden 裁掉。复用其「自适应」能力,在数据逐步
636
+ 渲染的几个时点重新 fit;跨域部署时访问 document 会抛错,静默跳过。 */
637
+ [0, 300, 800, 1500].forEach((delay) => {
638
+ window.setTimeout(() => {
639
+ try {
640
+ const frame = this.$refs.wfPreviewFrame;
641
+ const buttons = frame?.contentDocument?.querySelectorAll("button") || [];
642
+ const fitButton = Array.from(buttons).find(
643
+ (button) => button.textContent.trim() === "自适应"
644
+ );
645
+ fitButton?.click();
646
+ } catch (e) {
647
+ // 跨域 iframe 无法读取内部 DOM,保留 warm-flow-ui 原有交互。
648
+ }
649
+ }, delay);
650
+ });
651
+ },
652
+ getWfStatusLabel() {
653
+ return this.wfStatusMap[this.wfInfo.stat]?.label;
654
+ },
655
+ getWfStatusType() {
656
+ return this.wfStatusMap[this.wfInfo.stat]?.type;
657
+ },
658
+ init() {
659
+ let opt = this.wfOption;
660
+ this.objId = opt.objId;
661
+ this.wfCode = opt.wfCode;
662
+ this.serviceId = opt.serviceId;
663
+ this.parentVue = opt.parentVue;
664
+ this.wfConfig = this.wfOption;
665
+
666
+ let wfConfig = this.wfOption;
667
+ let that = getTarget(this);
668
+ let hasWf = false;
669
+ let wfInfo, currentTask, taskParam;
670
+ let option = {
671
+ objId: this.objId,
672
+ wfCode: this.wfCode
673
+ }
674
+ let current_prefix = this.current_prefix;
675
+
676
+ let initButton = () => {
677
+ /*return
678
+ this.$nextTick(() => {
679
+ that.$refs.wfButtonGroup.init({
680
+ taskParam,
681
+ wfInfo,
682
+ hasWf,
683
+ current_prefix,
684
+ wfConfig
685
+ });
686
+ });*/
687
+ }
688
+
689
+ this.initWfInfo(option, {
690
+ success: res => {
691
+ if (res.objx && res.objx.procInstId) {
692
+ hasWf = true;
693
+ wfInfo = res.objx;
694
+ this.wfInfo = wfInfo;
695
+ // this.showDomContent = true;
696
+
697
+ if (wfInfo.taskId) {
698
+ this.getTaskParams(wfInfo.taskId, {
699
+ success: res2 => {
700
+ taskParam = res2.objx || {};
701
+ taskParam.objId = option.objId;
702
+ this.taskParam = taskParam;
703
+
704
+ initButton();
705
+ }
706
+ });
707
+ } else {
708
+ initButton();
709
+ }
710
+ this.initOperateType();
711
+ this.initForAll();
712
+ } else {
713
+ initButton();
714
+ }
715
+ }
716
+ });
717
+ },
718
+ initWfInfo(option, httpConfig) {
719
+
720
+ let that = getTarget(this);
721
+ let id = option.objId;
722
+ let code = option.wfCode;
723
+ return that.$http({
724
+ url: this.current_prefix + '/wf/getWfInfo',
725
+ method: `post`,
726
+ data: {
727
+ objTypeCode: code,
728
+ objId: id
729
+ },
730
+ isLoading: true,
731
+ modalStrictly: true,
732
+ ...httpConfig
733
+ });
734
+ },
735
+ getTaskParams(taskId, httpConfig) {
736
+ let that = getTarget(this);
737
+ return that.$http({
738
+ url: this.current_prefix + '/wf/getTaskVariables',
739
+ method: `post`,
740
+ data: {
741
+ stringOne: taskId
742
+ },
743
+ isLoading: true,
744
+ modalStrictly: true,
745
+ ...httpConfig
746
+ });
747
+ },
748
+
749
+
750
+ initOperateType() {
751
+ if (this.operateType) {
752
+ let wfInfo = this.wfInfo;
753
+ if (wfInfo.toSubmit) {
754
+ this.openAgreeDialog('submit');
755
+ } else if (wfInfo.toReject) {
756
+ this.rejectWfTask('reject');
757
+ } else if (wfInfo.toAddIncreaseSign) {
758
+ this.openAddIncreaseSign('addIncreaseSign')
759
+ } else if (wfInfo.toRevoke) {
760
+ this.openRevokeDialog('revoke')
761
+ } else if (wfInfo.toLinkup) {
762
+ this.openTalkDialog(null, null, 'talk');
763
+ } else {
764
+ this.operateType = null;
765
+ }
766
+ }
767
+ },
768
+ initForAll() {
769
+ let that = getTarget(this);
770
+ loadWfTransferEnabled(that);
771
+ this.initWf(() => {
772
+ if (this.wfInfo.procInstId) {
773
+ this.initCurrentTask(this.wfInfo.procInstId, () => {
774
+ this.initWftask(this.wfInfo.procInstId);
775
+ this.getAllWfTaskOpinions();
776
+ });
777
+ this.initWfUserParam();
778
+ this.initTabIndex();
779
+ }
780
+ });
781
+ },
782
+ initTabIndex() {
783
+ let that = getTarget(this);
784
+ that.$http({
785
+ url: USER_PREFIX + "/wf_diy_attribute/getValue",
786
+ method: `post`,
787
+ data: {attributeKey: "param7"},
788
+ isLoading: true,
789
+ success: (res) => {
790
+ let val = res !== null ? res.objx === true : false;
791
+ this.toTalk = val;
792
+ let flag = false;
793
+ if (val) {
794
+ let flag1 = that.$attrs._isNotifyMessage == true || that.$attrs._isNotifyMessage == "true";
795
+ if (flag1) {
796
+ this.tabIndex = "2";
797
+ }
798
+ if (settingConfig.autoOpenWfLinkup) {
799
+ flag = true;
800
+ let flag2 = that.$attrs._wfNotifyType == "wfLinkup";
801
+ let flag3 = flag1 && flag2;
802
+ if (flag3) {
803
+ this.$nextTick(() => {
804
+ let wfTabPane = this.$refs.wfTabPane;
805
+ if (!wfTabPane.showContent) {
806
+ wfTabPane.handleFold();
807
+ }
808
+ });
809
+ }
810
+ }
811
+ }
812
+ this.initLinkup(flag);
813
+ }
814
+ });
815
+
816
+ },
817
+ initWf(done) {
818
+ var data = this.wfInfo;
819
+ if (data && data.procInstId) {
820
+ /** 流程状态:0未启动,1审核中,2已完成,3驳回,4中断 */
821
+ var statuses = {
822
+ 1: '<span class="tag">' + this.$t2('审核中', 'components.wf.wfStatus1') + '</span>',
823
+ 3: '<span class="tag red">' + this.$t2('已驳回', 'components.wf.wfStatus2') + '</span>',
824
+ 2: '<span class="tag green">' + this.$t2('已完成', 'components.wf.wfStatus3') + '</span>',
825
+ };
826
+ var statusStr = "";
827
+ if (data.stat != null) {
828
+ statusStr = statuses[data.stat] || "";
829
+ }
830
+ data.statusStr = statusStr;
831
+ this.wfInfo = data;
832
+
833
+ this.wfStartBtn = false;
834
+ if (data.status != 2 && data.starterId) {
835
+ this.wfManualendBtn = true;
836
+ }
837
+ this.wfSubmitBtn = false;
838
+ this.wfRejectBtn = false;
839
+
840
+ var url =
841
+ this.current_prefix +
842
+ "/wf/flowImage?procInstId=" +
843
+ data.procInstId +
844
+ "&_r=" +
845
+ Math.random() +
846
+ "&access_token=" +
847
+ configUtil.getToken();
848
+ this.wfImage = configUtil.baseUrl + url;
849
+ done();
850
+ }
851
+ },
852
+ initCurrentTask(procInstId, done) {
853
+ if (this.wfInfo.taskId) {
854
+ this.wfSubmitBtn = true;
855
+ this.wfRejectBtn = true;
856
+ this.changeHandlerBtn = true;
857
+ }
858
+ done();
859
+ },
860
+ initWftask(procInstId) {
861
+ let that = getTarget(this);
862
+ that.$http({
863
+ url: this.current_prefix + "/wf/getWfTaskOpinionMerge",
864
+ data: {
865
+ stringOne: procInstId,
866
+ },
867
+ method: "post",
868
+ isLoading: true,
869
+ modalStrictly: true,
870
+ success: (resultmsg) => {
871
+ var datas = resultmsg.objx || [];
872
+ this.wftaskData = datas;
873
+ },
874
+ });
875
+ },
876
+ getAllWfTaskOpinions() {
877
+ if (!this.showAllWfOpinon) {
878
+ return;
879
+ }
880
+ let that = getTarget(this);
881
+ let wfInfo = this.wfInfo;
882
+ that.$http({
883
+ url: this.current_prefix + "/wf/getAllWfTaskOpinions",
884
+ data: {
885
+ objId: wfInfo.objId,
886
+ objTypeCode: wfInfo.objTypeCode
887
+ },
888
+ method: "post",
889
+ isLoading: true,
890
+ modalStrictly: true,
891
+ success: (resultmsg) => {
892
+ var datas = resultmsg.objx || [];
893
+ this.allWfTaskOpinions = datas;
894
+ },
895
+ });
896
+ },
897
+ openManualDialog(operateType) {
898
+ this.operateType = operateType;
899
+ this.showWfManualDialog = true;
900
+ },
901
+ manualEndWf() {
902
+ this.showWfManualDialog = false;
903
+ let that = getTarget(this);
904
+ var procInstId = this.wfInfo.procInstId;
905
+ var taskId = this.wfInfo.taskId ? this.wfInfo.taskId : "";
906
+ var data = JSON.stringify({
907
+ uuid: this.wfInfo.uuid,
908
+ });
909
+ that.$http({
910
+ url: this.current_prefix + "/wf/interrupt",
911
+ data: data,
912
+ method: "post",
913
+ headers: {
914
+ "Content-Type": "application/json;charset=utf-8",
915
+ },
916
+ isLoading: true,
917
+ success: (resultMsg) => {
918
+ that.$message({
919
+ message: resultMsg.content,
920
+ type: "success",
921
+ duration: 500,
922
+ onClose: (t) => {
923
+ this.reloadContent();
924
+ this.closeWinOnCheck(3);
925
+ },
926
+ });
927
+ },
928
+ });
929
+ },
930
+ async rejectWfTask(operateType) {
931
+ // 与 PC wf.js 的 rejectWfTask 同结构:驳回也要先过一遍「驳回提醒」
932
+ this.handleReminderContent("rejectReminder", async () => {
933
+ let that = getTarget(this);
934
+ var procInstId = this.wfInfo.procInstId;
935
+ var taskId = this.wfInfo.taskId;
936
+ var destinations = [];
937
+
938
+ await that.$http({
939
+ url: this.current_prefix + "/wf/getPreIncomeNodes",
940
+ data: {
941
+ stringOne: taskId,
942
+ },
943
+ method: "post",
944
+ //contentType: 'application/json;charset=utf-8',
945
+ isLoading: true,
946
+ success: (resultMsg) => {
947
+ destinations = (resultMsg.objx || []).reverse();
948
+ },
949
+ });
950
+
951
+ if (destinations == null) {
952
+ return false;
953
+ }
954
+ if (destinations.length == 0) {
955
+ that.$message({
956
+ message: this.$t2('无法驳回,没有目标节点', 'components.wf.rejectWarnMsg1'),
957
+ type: "error",
958
+ duration: 2 * 1000,
959
+ });
960
+ return false;
961
+ }
962
+ this.operateType = operateType;
963
+
964
+ /* 驳回后提交模式,取自流程对象配置(wf_obj_config「驳回后提交模式」三选一):
965
+ toNextNode === 1 → 顺延下一步提交 → 1
966
+ toRejectNode false → 直接提交到驳回节点 → 2
967
+ toRejectNode true → 由提交人确定节点提交 → null(提交时自己选)
968
+ 三个分支不能省成两个:选了「顺延下一步」时后台把 toRejectNode 置为 null,
969
+ 而 null == false 在 JS 里是 false,会落到 null 分支上,配置被静默丢掉。
970
+ 与 PC wf.js 的 rejectWfTask 同口径。 */
971
+ let rejectSubmitModel = null;
972
+ if (this.wfInfo.toNextNode === 1) {
973
+ rejectSubmitModel = this.wfInfo.toNextNode
974
+ } else {
975
+ rejectSubmitModel = this.wfInfo.toRejectNode == false ? 2 : null
976
+ }
977
+ this.rejectForm.rejectSubmitModel = rejectSubmitModel;
978
+ this.rejectForm.nodeId = destinations[0].nodeId;
979
+ this.rejectForm.opinion = "";
980
+ this.rejectNodes = destinations;
981
+ this.rejectDialogVisible = true;
982
+ })
983
+ },
984
+ subRejectForm() {
985
+ let that = getTarget(this);
986
+ var procInstId = this.wfInfo.procInstId;
987
+ var taskId = this.wfInfo.taskId;
988
+
989
+ if (!this.rejectForm.nodeId) {
990
+ that.$message({
991
+ message: this.$t2('请选择驳回节点', 'components.wf.rejectWarnMsg2'),
992
+ type: "error",
993
+ duration: 2 * 1000,
994
+ });
995
+ return false;
996
+ }
997
+
998
+ if (!this.rejectForm.opinion) {
999
+ that.$message({
1000
+ message: this.$t2('请输入驳回意见', 'components.wf.rejectWarnMsg3'),
1001
+ type: "error",
1002
+ duration: 2 * 1000,
1003
+ });
1004
+ return false;
1005
+ }
1006
+
1007
+ var data = JSON.stringify({
1008
+ taskId: taskId,
1009
+ uuid: this.wfInfo.uuid,
1010
+ nodeId: this.rejectForm.nodeId,
1011
+ suggestion: this.rejectForm.opinion,
1012
+ rejectSubmitModel: this.rejectForm.rejectSubmitModel
1013
+ });
1014
+ this.rejectDialogVisible = false;
1015
+ that.$http({
1016
+ url: this.current_prefix + "/wf/reject",
1017
+ data: data,
1018
+ method: "post",
1019
+ headers: {
1020
+ "Content-Type": "application/json;charset=utf-8",
1021
+ },
1022
+ isLoading: true,
1023
+ success: (resultMsg) => {
1024
+ that.$message({
1025
+ message: resultMsg.content,
1026
+ type: "success",
1027
+ duration: 500,
1028
+ onClose: (t) => {
1029
+ this.reloadContent();
1030
+ this.closeWinOnCheck(2);
1031
+ },
1032
+ });
1033
+ },
1034
+ });
1035
+ },
1036
+ /**
1037
+ * 提交/驳回前的「提醒内容」:后台按 scriptType 跑脚本,返回文案就先弹确认框,
1038
+ * 用户点确定才继续;没有文案(或接口 404,即后端未部署该能力)直接放行。
1039
+ * 与 PC wf.js 的同名方法保持一致。
1040
+ *
1041
+ * 提醒只是主流程前面的一道增强,不能让它把主流程带崩或卡死,所以:
1042
+ * - 放行只允许一次(go 自带闸门),成功/异常各分支共用一个出口;
1043
+ * - 确认框点取消 = 放弃本次操作,什么都不做,但 MessageBox 的 reject 必须吃掉,
1044
+ * 否则是一条 unhandled rejection;
1045
+ * - error 分支绝不能抛异常。request.js 是先调 config.error(e) 再 removeModel(config)
1046
+ * (见 utils/request.js 的响应错误拦截),这里一抛,isLoading 的全屏遮罩就永远
1047
+ * 关不掉、整页被锁死。而网络失败/超时时 e.response 本就是 undefined,
1048
+ * 老写法 e.response.status 必崩 —— 故 status 取值全程判空。
1049
+ */
1050
+ handleReminderContent(scriptType, callback) {
1051
+ let that = getTarget(this);
1052
+ let called = false;
1053
+ const go = () => {
1054
+ if (called) return
1055
+ called = true;
1056
+ callback && callback();
1057
+ };
1058
+ that.$http({
1059
+ url: this.current_prefix + "/wf/getReminderContent",
1060
+ data: {
1061
+ scriptType,
1062
+ taskId: this.wfInfo.taskId,
1063
+ uuid: this.wfInfo.uuid,
1064
+ },
1065
+ method: "post",
1066
+ isLoading: true,
1067
+ errorMsg: false,
1068
+ success: (res) => {
1069
+ if (res && res.objx) {
1070
+ that.$baseConfirm(res.objx).then(go).catch(() => {});
1071
+ } else {
1072
+ go();
1073
+ }
1074
+ },
1075
+ error: (e) => {
1076
+ let status = e && e.response ? e.response.status : null;
1077
+ if (status === 404) {
1078
+ // 后端没部署这个接口,等同于「没有提醒」,静默放行
1079
+ go();
1080
+ return
1081
+ }
1082
+ /* 其余错误只提示不放行:提醒内容可能是必须让人看到的业务警告,
1083
+ 接口挂了就悄悄跳过等于把它吞掉。用户重试即可。 */
1084
+ that.$errorMsg({
1085
+ content: (e && e.message) || this.$t2('获取提醒内容失败', 'components.wf.reminderError'),
1086
+ type: 'error',
1087
+ }).catch(() => {});
1088
+ },
1089
+ });
1090
+ },
1091
+ openAgreeDialog(operateType) {
1092
+ const done = () => {
1093
+ this.handleReminderContent("submitReminder", () => {
1094
+ this.operateType = operateType;
1095
+ let that = getTarget(this);
1096
+ this.agreeForm = {
1097
+ opinion: this.$t2('同意', 'components.wf.defaultAgreeOption'),
1098
+ nodeId: null,
1099
+ };
1100
+ this.agreeNodes = [];
1101
+ that.$http({
1102
+ url: this.current_prefix + "/wf/getNextOutgoingNodes",
1103
+ data: {
1104
+ stringOne: this.wfInfo.taskId,
1105
+ },
1106
+ method: "post",
1107
+ isLoading: true,
1108
+ success: (res) => {
1109
+ let nodes = res.objx || [];
1110
+ /*if (tq == true) {
1111
+ nodes.reverse();
1112
+ }*/
1113
+ if (nodes.length) {
1114
+ this.agreeForm.nodeId = nodes[0].nodeId;
1115
+ }
1116
+ this.agreeNodes = nodes;
1117
+ this.agreeDialogVisible = true;
1118
+ },
1119
+ });
1120
+ })
1121
+ }
1122
+ // wfConfig 在 init() 里才赋值(初值 null),这里兜一层空对象
1123
+ let wfConfig = this.wfConfig || {};
1124
+ if (wfConfig.onClickAgree) {
1125
+ wfConfig.onClickAgree(done)
1126
+ } else {
1127
+ done();
1128
+ }
1129
+ },
1130
+ subAgreeForm() {
1131
+ let wfConfig = this.wfConfig;
1132
+ let done = () => {
1133
+ this.subAgreeHandle();
1134
+ }
1135
+ if (wfConfig.onBeforeAgree) {
1136
+ wfConfig.onBeforeAgree(done)
1137
+ } else {
1138
+ done();
1139
+ }
1140
+ },
1141
+ subAgreeHandle() {
1142
+ let that = getTarget(this);
1143
+ let nodeId = null;
1144
+ if (this.agreeNodes.length) {
1145
+ if (!this.agreeForm.nodeId) {
1146
+ that.$message({
1147
+ message: this.$t2('请选择节点', 'components.wf.agreeWarnMsg1'),
1148
+ type: "error",
1149
+ duration: 2 * 1000,
1150
+ });
1151
+ return;
1152
+ }
1153
+ nodeId = this.agreeForm.nodeId;
1154
+ }
1155
+
1156
+ var procInstId = this.wfInfo.procInstId;
1157
+ var taskId = this.wfInfo.taskId;
1158
+ var memo = this.agreeForm.opinion || this.$t2('同意', 'components.wf.defaultAgreeOption');
1159
+ var data = JSON.stringify({
1160
+ taskId: taskId,
1161
+ uuid: this.wfInfo.uuid,
1162
+ suggestion: memo,
1163
+ nodeId: nodeId,
1164
+ });
1165
+ this.agreeDialogVisible = false;
1166
+ that.$http({
1167
+ url: this.current_prefix + "/wf/submit",
1168
+ data: data,
1169
+ method: "post",
1170
+ headers: {
1171
+ "Content-Type": "application/json;charset=utf-8",
1172
+ },
1173
+ isLoading: true,
1174
+ success: (resultMsg) => {
1175
+ if (resultMsg.objx && resultMsg.objx.code == "999999") {
1176
+ this.errorSubmit({
1177
+ taskId: taskId,
1178
+ uuid: this.wfInfo.uuid,
1179
+ suggestion: memo,
1180
+ errorMsg: resultMsg.objx.errorMsg
1181
+ });
1182
+ } else {
1183
+ that.$message({
1184
+ message: resultMsg.content,
1185
+ type: "success",
1186
+ duration: 500,
1187
+ onClose: (t) => {
1188
+ this.reloadContent();
1189
+ this.closeWinOnCheck(1);
1190
+ },
1191
+ });
1192
+ }
1193
+ },
1194
+ });
1195
+ },
1196
+ errorSubmit(data) {
1197
+ let that = getTarget(this);
1198
+ that.$http({
1199
+ url: this.current_prefix + "/wf/errorSubmit",
1200
+ data: data,
1201
+ method: "post",
1202
+ isLoading: true,
1203
+ success: (resultMsg) => {
1204
+ that.$message({
1205
+ message: resultMsg.content,
1206
+ type: "success",
1207
+ duration: 500,
1208
+ onClose: (t) => {
1209
+ this.reloadContent();
1210
+ this.closeWinOnCheck(1);
1211
+ },
1212
+ });
1213
+ },
1214
+ });
1215
+ },
1216
+ openChangeWfForm(operateType) {
1217
+ this.operateType = operateType;
1218
+ this.changeWfDialogVisible = true;
1219
+ this.changeUserRows = [];
1220
+ this.changeWfForm = {
1221
+ userIds: [],
1222
+ userNickNames: null,
1223
+ opinion: null,
1224
+ };
1225
+ },
1226
+ subChangeWfForm() {
1227
+ let that = getTarget(this);
1228
+ var procInstId = this.wfInfo.procInstId;
1229
+ var taskId = this.wfInfo.taskId;
1230
+
1231
+ var userIds = this.changeWfForm.userIds || [];
1232
+ var opinion = this.changeWfForm.opinion || null;
1233
+
1234
+ if (!userIds.length) {
1235
+ that.$message({
1236
+ message: this.$t2('请选择转办人', 'components.wf.transferWarnMsg1'),
1237
+ type: "error",
1238
+ duration: 2000,
1239
+ onClose: (t) => {
1240
+ },
1241
+ });
1242
+ return false;
1243
+ }
1244
+
1245
+ var data = JSON.stringify({
1246
+ taskId: taskId,
1247
+ uuid: this.wfInfo.uuid,
1248
+ transferTo: userIds,
1249
+ suggestion: opinion,
1250
+ });
1251
+ this.changeWfDialogVisible = false;
1252
+ that.$http({
1253
+ url: this.current_prefix + "/wf/transfer",
1254
+ data: data,
1255
+ method: "post",
1256
+ headers: {
1257
+ "Content-Type": "application/json;charset=utf-8",
1258
+ },
1259
+ isLoading: true,
1260
+ success: (resultMsg) => {
1261
+ that.$message({
1262
+ message: resultMsg.content,
1263
+ type: "success",
1264
+ duration: 500,
1265
+ onClose: (t) => {
1266
+ this.reloadContent();
1267
+ this.closeWinOnCheck(4);
1268
+ },
1269
+ });
1270
+ },
1271
+ });
1272
+ },
1273
+ userConfirm(rows) {
1274
+ if (rows.length > 0) {
1275
+ let changeUserRows = this.changeUserRows;
1276
+ let ids = changeUserRows.map((changeUserRow) => changeUserRow.id);
1277
+ let addRows = rows.filter((row) => !ids.includes(row.id));
1278
+ changeUserRows.push(...addRows);
1279
+
1280
+ let row = rows[0];
1281
+ this.changeWfForm.userIds = changeUserRows.map(
1282
+ (changeUserRow) => changeUserRow.id
1283
+ );
1284
+ this.changeWfForm.userNickNames = changeUserRows
1285
+ .map((changeUserRow) => changeUserRow.nickName)
1286
+ .join(",");
1287
+ }
1288
+ },
1289
+ reloadContent() {
1290
+ let that = getTarget(this);
1291
+ that.$baseReload();
1292
+ },
1293
+ closeWinOnCheck(flag) {
1294
+ //_closeWindowOnCheck=true, 1提交,2驳回,3中断,4转办时,5沟通 关闭窗口
1295
+ let that = getTarget(this);
1296
+ let _closeWindowOnCheck = that.$attrs._closeWindowOnCheck || that._closeWindowOnCheck;
1297
+ if (_closeWindowOnCheck === true || _closeWindowOnCheck === "true") {
1298
+ window.close && window.close();
1299
+ }
1300
+ let _handleCallback = that.$attrs._handleCallback || that._handleCallback;
1301
+ _handleCallback && _handleCallback(flag);
1302
+ },
1303
+ manualCallback() {
1304
+ this.$emit("manualCallback");
1305
+ },
1306
+ openUrgingDialog(operateType) {
1307
+ this.operateType = operateType;
1308
+ this.urgingDialogVisible = true;
1309
+ },
1310
+ openDeleteTaskUserDialog(operateType) {
1311
+ this.operateType = operateType;
1312
+ this.showDeleteTaskUserDialog = true;
1313
+ },
1314
+ openAddTaskUserDialog(operateType) {
1315
+ this.operateType = operateType;
1316
+ this.showAddTaskUserDialog = true;
1317
+ },
1318
+ openAddIncreaseSign(operateType) {
1319
+ this.operateType = operateType;
1320
+ this.addIncreaseSignUsers = [];
1321
+ this.addIncreaseSignForm = {userNickNames: null};
1322
+ this.showAddIncreaseSignDialog = true;
1323
+ },
1324
+ initWfUserParam(callback) {
1325
+ this.initTransferUserParam();//转办
1326
+ this.initAddSignUserParam();//加签
1327
+ this.initTalkUserParam();//沟通
1328
+ },
1329
+ //
1330
+ initTransferUserParam(callback) {
1331
+ //初始化转办用户参数
1332
+ let that = getTarget(this);
1333
+ return that.$http({
1334
+ url: USER_PREFIX + "/wf_diy_attribute/getValue",
1335
+ method: `post`,
1336
+ data: {attributeKey: "param1"},
1337
+ isLoading: true,
1338
+ modalStrictly: true,
1339
+ success: (res) => {
1340
+ this.wfUserParamForTransfer = res.objx || {};
1341
+ callback && callback();
1342
+ },
1343
+ });
1344
+ },
1345
+ initAddSignUserParam(callback) {
1346
+ //初始化加签用户参数
1347
+ let that = getTarget(this);
1348
+ return that.$http({
1349
+ url: USER_PREFIX + "/wf_diy_attribute/getValue",
1350
+ method: `post`,
1351
+ data: {attributeKey: "param2"},
1352
+ isLoading: true,
1353
+ modalStrictly: true,
1354
+ success: (res) => {
1355
+ this.wfUserParamForAddSign = res.objx || {};
1356
+ callback && callback();
1357
+ },
1358
+ });
1359
+ },
1360
+ initTalkUserParam(callback) {
1361
+ //初始化沟通用户参数
1362
+ let that = getTarget(this);
1363
+ return that.$http({
1364
+ url: USER_PREFIX + "/wf_diy_attribute/getValue",
1365
+ method: `post`,
1366
+ data: {attributeKey: "param3"},
1367
+ isLoading: true,
1368
+ modalStrictly: true,
1369
+ success: (res) => {
1370
+ this.wfUserParamForTalk = res.objx || {};
1371
+ callback && callback();
1372
+ },
1373
+ });
1374
+ },
1375
+ //
1376
+ resetLinkup() {
1377
+ this.formData = {};
1378
+ this.$refs["table-linkup"].commitProxy("reload");
1379
+ },
1380
+ searchLinkup() {
1381
+ this.$refs["table-linkup"].commitProxy("reload");
1382
+ },
1383
+ initLinkup(flag) {
1384
+ return
1385
+ let h = this.$createElement;
1386
+ let statusMap = {
1387
+ 0: this.$t2('未完成', 'components.wf.talkStatus0'),
1388
+ 1: this.$t2('已完成', 'components.wf.talkStatus1'),
1389
+ 2: this.$t2('已取消', 'components.wf.talkStatus2')
1390
+ };
1391
+ let tableOption = {
1392
+ vue: this,
1393
+ tableRef: "table-linkup",
1394
+ tableName: "wf_table-linkup",
1395
+ path: this.current_prefix + "/wf_linkup/listPage",
1396
+ param: () => {
1397
+ return {
1398
+ uuid: this.wfInfo.uuid,
1399
+ };
1400
+ },
1401
+ config: {
1402
+ height: 350
1403
+ },
1404
+ columns: [
1405
+ {type: "checkbox", width: 48, resizable: false, fixed: "left"},
1406
+ {
1407
+ title: this.$t2('任务名称', 'components.wf.taskName'),
1408
+ field: "taskName",
1409
+ width: 150,
1410
+ fixed: "left",
1411
+ },
1412
+ {
1413
+ title: this.$t2('发送人', 'components.wf.senderName'),
1414
+ field: "senderName",
1415
+ width: 150,
1416
+ slots: {
1417
+ default: "sender",
1418
+ },
1419
+ },
1420
+ {
1421
+ title: this.$t2('接收人', 'components.wf.receiverName'),
1422
+ field: "receiverName",
1423
+ width: 150,
1424
+ slots: {
1425
+ default: "receiver",
1426
+ },
1427
+ },
1428
+ {
1429
+ title: this.$t2('沟通内容', 'components.wf.talkContent'),
1430
+ field: "content",
1431
+ width: 250,
1432
+ showOverflow: false,
1433
+ slots: {
1434
+ default: ({row, rowIndex}) => {
1435
+ return row.replyId ? ("[" + this.$t2('回复', 'components.wf.reply') + "]" + row.content) : row.content;
1436
+ },
1437
+ },
1438
+ },
1439
+ {
1440
+ width: 150,
1441
+ title: this.$t2('沟通资料', 'components.wf.talkAttachment'),
1442
+ field: "attachmentImage",
1443
+ sortable: false,
1444
+ slots: {
1445
+ default: ({row, rowIndex}) => {
1446
+ let option = {
1447
+ title: this.$t2('沟通资料', 'components.wf.talkAttachment'),
1448
+ edit: false,
1449
+ rows: (done) => {
1450
+ done(row.attachmentDTOs);
1451
+ },
1452
+ };
1453
+ return [
1454
+ h("base-attachment", {
1455
+ props: {
1456
+ option: option,
1457
+ },
1458
+ }),
1459
+ ];
1460
+ },
1461
+ },
1462
+ },
1463
+
1464
+ {
1465
+ title: this.$t2('状态', 'components.wf.status'),
1466
+ field: "status",
1467
+ width: 150,
1468
+ slots: {
1469
+ default: ({row, rowIndex}) => {
1470
+ return statusMap[row.status] || "";
1471
+ },
1472
+ },
1473
+ },
1474
+ {
1475
+ title: this.$t2('创建时间', 'system.label.createDate'),
1476
+ field: "createDate",
1477
+ width: 150,
1478
+ },
1479
+ {
1480
+ width: 80,
1481
+ fixed: "right",
1482
+ title: "",
1483
+ sortable: false,
1484
+ slots: {
1485
+ default: "operate"
1486
+ }
1487
+ },
1488
+ ],
1489
+ callback: (rows) => {
1490
+ if (rows.length && flag) {
1491
+ let row = rows[0];
1492
+ if (row.replyToSender) {
1493
+ this.$nextTick(() => {
1494
+ this.tabIndex = "2";
1495
+ this.openTalkDialog(row.sender, row.senderName, 'talk', 1, row.id)
1496
+ });
1497
+ }
1498
+ }
1499
+ }
1500
+ };
1501
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
1502
+ this.linkupOption = opts;
1503
+ });
1504
+ },
1505
+ cancelTalk(row) {
1506
+ let that = getTarget(this);
1507
+ that.$baseConfirm(this.$t2('您确定要取消沟通记录吗?', 'components.wf.cancelTalkTip')).then(() => {
1508
+ that.$http({
1509
+ url: this.current_prefix + "/wf_linkup/cancel",
1510
+ data: {id: row.id},
1511
+ method: "post",
1512
+ loadingTarget: document.body,
1513
+ isLoading: true,
1514
+ success: (resultMsg) => {
1515
+ that.$message({
1516
+ message: resultMsg.content,
1517
+ type: "success",
1518
+ duration: 500,
1519
+ onClose: (t) => {
1520
+ this.reloadContent();
1521
+ },
1522
+ });
1523
+ },
1524
+ });
1525
+ });
1526
+ },
1527
+ openTalkDialog(receiver, receiverName, operateType, flag, replyId) {
1528
+ this.operateType = operateType;
1529
+ /*this.talkForm.receiver = receiver || null;
1530
+ this.talkForm.receiverName = receiverName || null;
1531
+ this.talkForm.replyId = replyId || null;
1532
+ this.talkForm.content = null;
1533
+ this.talkForm.attachmentDTOs = [];*/
1534
+ this.initTalkForm(receiver, receiverName, replyId)
1535
+ this.showTalkDialog = true;
1536
+ if (flag == 1) {
1537
+ let opeaBtnDom = this.$refs.opeaBtn;
1538
+ opeaBtnDom && opeaBtnDom.scrollIntoView();
1539
+ }
1540
+ },
1541
+ initTalkForm(receiver, receiverName, replyId) {
1542
+ this.talkForm.receiver = receiver || null;
1543
+ this.talkForm.receiverName = receiverName || null;
1544
+ this.talkForm.replyId = replyId || null;
1545
+ this.talkForm.content = null;
1546
+ this.talkForm.attachmentDTOs = [];
1547
+ },
1548
+ submitTalkForm() {
1549
+ let that = getTarget(this);
1550
+ var procInstId = this.wfInfo.procInstId;
1551
+ var taskId = this.wfInfo.taskId;
1552
+
1553
+ if (!this.talkForm.receiver) {
1554
+ that.$message({
1555
+ message: this.$t2('请选择接收人', 'components.wf.talkWarnMsg1'),
1556
+ type: "error",
1557
+ duration: 2 * 1000,
1558
+ });
1559
+ return false;
1560
+ }
1561
+ if (!this.talkForm.content) {
1562
+ that.$message({
1563
+ message: this.$t2('请输入沟通内容', 'components.wf.talkWarnMsg2'),
1564
+ type: "error",
1565
+ duration: 2 * 1000,
1566
+ });
1567
+ return false;
1568
+ }
1569
+
1570
+ var data = {
1571
+ taskId: taskId,
1572
+ uuid: this.wfInfo.uuid,
1573
+ receiver: this.talkForm.receiver,
1574
+ receiverName: this.talkForm.receiverName,
1575
+ replyId: this.talkForm.replyId,
1576
+ content: this.talkForm.content,
1577
+ attachmentDTOs: this.talkForm.attachmentDTOs,
1578
+ notifyType: "wfLinkup",
1579
+ };
1580
+ this.showTalkDialog = false;
1581
+ that.$http({
1582
+ url: this.current_prefix + "/wf_linkup/save",
1583
+ data: data,
1584
+ method: "post",
1585
+ isLoading: true,
1586
+ success: (resultMsg) => {
1587
+ that.$message({
1588
+ message: resultMsg.content,
1589
+ type: "success",
1590
+ duration: 500,
1591
+ onClose: (t) => {
1592
+ this.reloadContent();
1593
+ this.closeWinOnCheck(5);
1594
+ },
1595
+ });
1596
+ },
1597
+ });
1598
+ },
1599
+ openTalkUserDialog() {
1600
+ this.showTalkUserDialog = true;
1601
+ },
1602
+ confirmTalkUserDialog(rows) {
1603
+ if (rows.length > 0) {
1604
+ let row = rows[0];
1605
+ if (this.talkForm.receiver != row.id) {
1606
+ this.talkForm.replyId = null;
1607
+ }
1608
+ this.talkForm.receiver = row.id;
1609
+ this.talkForm.receiverName = row.nickName;
1610
+ }
1611
+ },
1612
+ confirmUrging() {
1613
+ this.reloadContent();
1614
+ },
1615
+ confirmDeleteTaskUser() {
1616
+ this.reloadContent();
1617
+ },
1618
+ confirmAddTaskUser(rows) {
1619
+ this.addIncreaseSignUsers = rows;
1620
+ this.addIncreaseSignForm.userNickNames = rows.map(row => row.nickName).join(',');
1621
+ // this.reloadContent();
1622
+ },
1623
+ submitAddTaskUserForm(flag) {
1624
+ let that = getTarget(this);
1625
+ let userIds = this.addIncreaseSignUsers.map((checkRow) => checkRow.id);
1626
+ if (userIds.length == 0) {
1627
+ that.$message({
1628
+ message: this.$t2('请选择候选人', 'components.wf.addIncreaseSignWarnMsg1'),
1629
+ type: "error",
1630
+ duration: 2000,
1631
+ onClose: (t) => {
1632
+ },
1633
+ });
1634
+ return false;
1635
+ }
1636
+ let toDo = () => {
1637
+ var data = JSON.stringify({
1638
+ uuid: this.wfInfo.uuid,
1639
+ taskId: this.wfInfo.taskId,
1640
+ userIds: userIds,
1641
+ suggestion: this.addIncreaseSignForm.opinion
1642
+
1643
+ });
1644
+ this.agreeDialogVisible = false;
1645
+ that.$http({
1646
+ url: this.current_prefix + "/wf/addIncreaseSign",
1647
+ data: data,
1648
+ method: "post",
1649
+ loadingTarget: document.body,
1650
+ headers: {
1651
+ "Content-Type": "application/json;charset=utf-8",
1652
+ },
1653
+ isLoading: true,
1654
+ success: (resultMsg) => {
1655
+ that.$message({
1656
+ message: resultMsg.content,
1657
+ type: "success",
1658
+ duration: 500,
1659
+ onClose: (t) => {
1660
+ this.reloadContent();
1661
+ },
1662
+ });
1663
+ },
1664
+ });
1665
+ }
1666
+ if (flag === 0) {
1667
+ toDo();
1668
+ } else {
1669
+ that.$baseConfirm(this.$t2('您确定要加签吗?', 'components.wf.addIncreaseSignConfirmTip')).then(() => {
1670
+ toDo();
1671
+ });
1672
+ }
1673
+ },
1674
+ openSetCandidateDialog(operateType) {
1675
+ this.operateType = operateType;
1676
+ this.showSetCandidateDialog = true;
1677
+ },
1678
+ closeSetCandidateDialog() {
1679
+ this.showSetCandidateDialog = false;
1680
+ this.reloadContent();
1681
+ },
1682
+ openRevokeDialog(operateType) {
1683
+ this.operateType = operateType;
1684
+ this.revokeForm = {opinion: null}
1685
+ this.revokeDialogVisible = true;
1686
+ },
1687
+ subRevokeForm(flag) {
1688
+ //撤回
1689
+ let that = getTarget(this);
1690
+ let toDo = () => {
1691
+ var data = JSON.stringify({
1692
+ uuid: this.wfInfo.uuid,
1693
+ taskId: this.wfInfo.taskId,
1694
+ suggestion: this.revokeForm.opinion,
1695
+ });
1696
+ this.revokeDialogVisible = false;
1697
+ that.$http({
1698
+ url: this.current_prefix + "/wf/revoke",
1699
+ data: data,
1700
+ method: "post",
1701
+ loadingTarget: document.body,
1702
+ headers: {
1703
+ "Content-Type": "application/json;charset=utf-8",
1704
+ },
1705
+ isLoading: true,
1706
+ success: (resultMsg) => {
1707
+ that.$message({
1708
+ message: resultMsg.content,
1709
+ type: "success",
1710
+ duration: 500,
1711
+ onClose: (t) => {
1712
+ this.reloadContent();
1713
+ },
1714
+ });
1715
+ },
1716
+ });
1717
+ }
1718
+ if (flag === 0) {
1719
+ toDo();
1720
+ } else {
1721
+ that.$baseConfirm(this.$t2('您确定要撤回吗?', 'components.wf.revokeConfirmTip')).then(() => {
1722
+ toDo();
1723
+ });
1724
+ }
1725
+ }
1726
+ }
1727
+ }
1728
+ </script>
1729
+
1730
+ <style scoped>
1731
+ ::v-deep .form-box.el-form .el-form-item .el-form-item__label {
1732
+ width: 70px
1733
+ }
1734
+ </style>