cloud-web-corejs 1.0.276 → 1.0.278

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 (311) hide show
  1. package/package.json +30 -24
  2. package/src/App.vue +73 -71
  3. package/src/api/user.js +21 -0
  4. package/src/components/baseArea/index.vue +82 -27
  5. package/src/components/baseTabs/mixins.js +5 -1
  6. package/src/components/formDialog/README.md +371 -0
  7. package/src/components/formDialog/actionButtons.js +90 -0
  8. package/src/components/formDialog/index.js +48 -0
  9. package/src/components/formDialog/index.vue +802 -0
  10. package/src/components/formDrawer/drawer.vue +722 -0
  11. package/src/components/formDrawer/index.js +50 -0
  12. package/src/components/luckysheet/dialog.vue +1 -1
  13. package/src/components/micro-view-host/contract.js +66 -0
  14. package/src/components/micro-view-host/index.vue +148 -0
  15. package/src/components/table/tableForm.vue +16 -5
  16. package/src/components/table/tableFormMixin.js +35 -7
  17. package/src/components/vb-tabs/x-tabs.vue +167 -143
  18. package/src/components/wf/content.vue +14 -0
  19. package/src/components/wf/content2.vue +4 -2
  20. package/src/components/wf/wf.js +74 -23
  21. package/src/components/wf/wfActionDropdown.vue +85 -0
  22. package/src/components/wf/wfActionItems.js +136 -0
  23. package/src/components/wf/wfAutoConfirm.js +55 -0
  24. package/src/components/wf/wfButtonName.js +60 -0
  25. package/src/components/wf/wfUserRange.js +53 -0
  26. package/src/components/wf/wfUtil.js +373 -295
  27. package/src/components/xform/XFormTabContainer//346/226/260/345/242/236/351/241/265/347/255/276/346/250/241/345/274/217-/346/234/200/347/273/210/345/256/236/347/216/260.md +195 -0
  28. 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" +57 -0
  29. package/src/components/xform/docs/2026-07 /346/216/222/346/237/245/344/277/256/345/244/215/350/256/260/345/275/225.md" +73 -0
  30. package/src/components/xform/docs/autocomplete /350/207/252/345/212/250/345/256/214/346/210/220/347/273/204/344/273/266/350/257/264/346/230/216.md" +126 -0
  31. package/src/components/xform/docs//345/257/271/346/257/224/345/212/237/350/203/275/350/220/275/345/234/260/346/226/271/346/241/210.md +986 -0
  32. package/src/components/xform/docs//346/225/260/346/215/256/350/241/250/346/240/274/345/212/250/346/200/201/345/210/227 JSON /350/257/264/346/230/216.md" +657 -0
  33. package/src/components/xform/docs//346/240/221/350/241/250rowField/346/224/266/346/225/233-/350/220/275/345/234/260/346/226/207/346/241/243.md +1427 -0
  34. package/src/components/xform/form-designer/designer.js +2085 -2025
  35. package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +9 -11
  36. package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +76 -75
  37. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +10 -4
  38. package/src/components/xform/form-designer/form-widget/container-widget/detail-plain-widget.vue +76 -0
  39. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +59 -5
  40. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +38 -17
  41. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +138 -13
  42. package/src/components/xform/form-designer/form-widget/dialog/formFieldDialog.vue +1 -1
  43. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1774 -1772
  44. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +2 -3
  45. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +1 -1
  46. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +66 -53
  47. package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +287 -214
  48. package/src/components/xform/form-designer/form-widget/field-widget/button-widget.vue +76 -66
  49. package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +208 -124
  50. package/src/components/xform/form-designer/form-widget/field-widget/census-widget.vue +3 -9
  51. package/src/components/xform/form-designer/form-widget/field-widget/copy_button-widget.vue +11 -2
  52. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +7 -6
  53. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +43 -19
  54. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +680 -372
  55. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +879 -763
  56. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +17 -2
  57. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +3 -9
  58. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +3 -9
  59. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js +3 -9
  60. package/src/components/xform/form-designer/form-widget/field-widget/mixins/relative-default-mixin.js +107 -0
  61. package/src/components/xform/form-designer/form-widget/field-widget/mixins/relativeDateUtil.js +321 -0
  62. package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -0
  63. package/src/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin.js +13 -0
  64. package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +13 -8
  65. package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +4 -9
  66. package/src/components/xform/form-designer/form-widget/field-widget/save_submit_wf_button-widget.vue +3 -0
  67. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +120 -120
  68. package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +4 -0
  69. package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +11 -0
  70. package/src/components/xform/form-designer/form-widget/field-widget/switch-widget.vue +9 -1
  71. package/src/components/xform/form-designer/form-widget/field-widget/tempStorage-widget.vue +1 -1
  72. package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +7 -3
  73. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +4 -2
  74. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +36 -5
  75. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +338 -374
  76. package/src/components/xform/form-designer/form-widget/index.vue +6 -1
  77. package/src/components/xform/form-designer/form-widget/indexMixin.js +29 -25
  78. package/src/components/xform/form-designer/index.vue +194 -191
  79. package/src/components/xform/form-designer/indexMixin.js +860 -847
  80. package/src/components/xform/form-designer/setting-panel/dataSource-setting.vue +397 -397
  81. package/src/components/xform/form-designer/setting-panel/form-dynamicField-setting.vue +602 -601
  82. package/src/components/xform/form-designer/setting-panel/form-setting.vue +1790 -1483
  83. package/src/components/xform/form-designer/setting-panel/index.vue +2 -7
  84. package/src/components/xform/form-designer/setting-panel/indexMixin.js +370 -335
  85. package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +585 -544
  86. package/src/components/xform/form-designer/setting-panel/property-editor/a-link-editor.vue +1 -1
  87. package/src/components/xform/form-designer/setting-panel/property-editor/a-text-editor.vue +1 -1
  88. package/src/components/xform/form-designer/setting-panel/property-editor/alignType-editor.vue +1 -1
  89. package/src/components/xform/form-designer/setting-panel/property-editor/buttonIcon-editor.vue +14 -15
  90. package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +1 -1
  91. package/src/components/xform/form-designer/setting-panel/property-editor/colorClass-editor.vue +1 -1
  92. package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +3 -3
  93. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +124 -125
  94. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +1151 -957
  95. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +96 -74
  96. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-plain/detail-plain-editor.vue +75 -0
  97. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/colHeight-editor.vue +1 -1
  98. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +14 -13
  99. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-height-editor.vue +1 -1
  100. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
  101. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
  102. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
  103. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-span-editor.vue +4 -4
  104. package/src/components/xform/form-designer/setting-panel/property-editor/container-h5-card/h5-card-editor.vue +124 -124
  105. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +26 -31
  106. package/src/components/xform/form-designer/setting-panel/property-editor/container-panel/height-editor.vue +1 -1
  107. package/src/components/xform/form-designer/setting-panel/property-editor/container-panel/width-editor.vue +1 -1
  108. package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tab-customClass-editor.vue +119 -119
  109. package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tabClass-editor.vue +45 -45
  110. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +340 -342
  111. package/src/components/xform/form-designer/setting-panel/property-editor/container-table-cell/cellHeight-editor.vue +1 -1
  112. package/src/components/xform/form-designer/setting-panel/property-editor/container-table-cell/cellWidth-editor.vue +1 -1
  113. package/src/components/xform/form-designer/setting-panel/property-editor/container-tree/tree-customClass-editor.vue +2 -2
  114. package/src/components/xform/form-designer/setting-panel/property-editor/container-tree-pane/tree-pane-editor.vue +1 -1
  115. package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/cancelButtonLabel-editor.vue +1 -1
  116. package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/okButtonLabel-editor.vue +1 -1
  117. package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/title-editor.vue +1 -1
  118. package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/width-editor.vue +1 -1
  119. package/src/components/xform/form-designer/setting-panel/property-editor/containerClass-editor.vue +1 -1
  120. package/src/components/xform/form-designer/setting-panel/property-editor/customClass-editor.vue +1 -1
  121. package/src/components/xform/form-designer/setting-panel/property-editor/defaultValue-editor.vue +1 -1
  122. package/src/components/xform/form-designer/setting-panel/property-editor/descriptionsItems-editor.vue +4 -4
  123. package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +3 -3
  124. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +6 -2
  125. package/src/components/xform/form-designer/setting-panel/property-editor/dsName-editor.vue +1 -1
  126. package/src/components/xform/form-designer/setting-panel/property-editor/echartHeight-editor.vue +1 -1
  127. package/src/components/xform/form-designer/setting-panel/property-editor/endPlaceholder-editor.vue +1 -1
  128. package/src/components/xform/form-designer/setting-panel/property-editor/field-accessUrl/accessUrl-editor.vue +2 -2
  129. package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaDataType-editor.vue +1 -1
  130. package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaMinLevel-editor.vue +50 -50
  131. package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaName-editor.vue +1 -1
  132. package/src/components/xform/form-designer/setting-panel/property-editor/field-autocomplete/autocomplete-vabSearchName-editor.vue +7 -7
  133. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/addTableData-event-editor.vue +84 -85
  134. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/button-type-editor.vue +1 -1
  135. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindActions.js +262 -0
  136. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindEvent-editor.vue +97 -88
  137. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/form-host-event-editor.vue +188 -0
  138. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/icon-editor.vue +14 -15
  139. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +27 -10
  140. package/src/components/xform/form-designer/setting-panel/property-editor/field-cascader/checkStrictly-editor.vue +11 -13
  141. package/src/components/xform/form-designer/setting-panel/property-editor/field-common/keyName-editor.vue +74 -67
  142. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-dateLimit-editor.vue +27 -5
  143. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +35 -18
  144. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-format-editor.vue +1 -1
  145. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-type-editor.vue +1 -1
  146. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-valueFormat-editor.vue +1 -1
  147. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +1 -1
  148. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +35 -18
  149. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-format-editor.vue +1 -1
  150. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-type-editor.vue +1 -1
  151. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-valueFormat-editor.vue +1 -1
  152. package/src/components/xform/form-designer/setting-panel/property-editor/field-divider/contentPosition-editor.vue +1 -1
  153. package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -59
  154. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +11 -11
  155. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +10 -10
  156. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +12 -12
  157. package/src/components/xform/form-designer/setting-panel/property-editor/field-file-upload/file-upload-fileTypes-editor.vue +44 -44
  158. package/src/components/xform/form-designer/setting-panel/property-editor/field-html-text/htmlContent-editor.vue +29 -29
  159. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +6 -6
  160. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +4 -4
  161. package/src/components/xform/form-designer/setting-panel/property-editor/field-number/controlsPosition-editor.vue +1 -1
  162. package/src/components/xform/form-designer/setting-panel/property-editor/field-picture-upload/picture-upload-fileTypes-editor.vue +44 -44
  163. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +115 -115
  164. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +115 -115
  165. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/highThreshold-editor.vue +1 -1
  166. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/lowThreshold-editor.vue +1 -1
  167. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
  168. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-max-editor.vue +1 -1
  169. package/src/components/xform/form-designer/setting-panel/property-editor/field-script/script-editor.vue +4 -4
  170. package/src/components/xform/form-designer/setting-panel/property-editor/field-script-input/script-input-editor.vue +4 -4
  171. package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/fontSize-editor.vue +1 -1
  172. package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/textContent-editor.vue +1 -1
  173. package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +3 -3
  174. package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/activeText-editor.vue +1 -1
  175. package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/inactiveText-editor.vue +1 -1
  176. package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/switchWidth-editor.vue +1 -1
  177. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-button-editor.vue +2 -2
  178. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +74 -74
  179. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +3 -3
  180. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +34 -18
  181. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-format-editor.vue +1 -1
  182. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-timeLimit-editor.vue +53 -0
  183. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +35 -18
  184. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-format-editor.vue +1 -1
  185. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchField-editor.vue +2 -2
  186. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +2 -2
  187. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +1 -1
  188. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +1 -1
  189. package/src/components/xform/form-designer/setting-panel/property-editor/field-vue-page/vue-page-editor.vue +2 -2
  190. package/src/components/xform/form-designer/setting-panel/property-editor/fileMaxSize-editor.vue +1 -1
  191. package/src/components/xform/form-designer/setting-panel/property-editor/fileTypesSelect.vue +176 -176
  192. package/src/components/xform/form-designer/setting-panel/property-editor/fixedQuery-editor.vue +39 -0
  193. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +41 -6
  194. package/src/components/xform/form-designer/setting-panel/property-editor/formatType-editor.vue +2 -2
  195. package/src/components/xform/form-designer/setting-panel/property-editor/formula-editor.vue +972 -972
  196. package/src/components/xform/form-designer/setting-panel/property-editor/iconClass-editor.vue +1 -1
  197. package/src/components/xform/form-designer/setting-panel/property-editor/label-editor.vue +1 -1
  198. package/src/components/xform/form-designer/setting-panel/property-editor/labelAlign-editor.vue +1 -1
  199. package/src/components/xform/form-designer/setting-panel/property-editor/labelColor-editor.vue +1 -1
  200. package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +1 -1
  201. package/src/components/xform/form-designer/setting-panel/property-editor/labelWidth-editor.vue +1 -1
  202. package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
  203. package/src/components/xform/form-designer/setting-panel/property-editor/max-editor.vue +1 -1
  204. package/src/components/xform/form-designer/setting-panel/property-editor/maxLength-editor.vue +1 -1
  205. package/src/components/xform/form-designer/setting-panel/property-editor/min-editor.vue +1 -1
  206. package/src/components/xform/form-designer/setting-panel/property-editor/minLength-editor.vue +1 -1
  207. package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
  208. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +15 -4
  209. package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +3 -3
  210. package/src/components/xform/form-designer/setting-panel/property-editor/placeholder-editor.vue +1 -1
  211. package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +1 -1
  212. package/src/components/xform/form-designer/setting-panel/property-editor/prefixIcon-editor.vue +14 -15
  213. package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +6 -6
  214. package/src/components/xform/form-designer/setting-panel/property-editor/relative-default-block.vue +369 -0
  215. package/src/components/xform/form-designer/setting-panel/property-editor/requiredHint-editor.vue +1 -1
  216. package/src/components/xform/form-designer/setting-panel/property-editor/rows-editor.vue +1 -1
  217. package/src/components/xform/form-designer/setting-panel/property-editor/space-editor-editor.vue +1 -1
  218. package/src/components/xform/form-designer/setting-panel/property-editor/startPlaceholder-editor.vue +1 -1
  219. package/src/components/xform/form-designer/setting-panel/property-editor/step-editor.vue +1 -1
  220. package/src/components/xform/form-designer/setting-panel/property-editor/styleTableClass-editor.vue +1 -1
  221. package/src/components/xform/form-designer/setting-panel/property-editor/styleTitClass-editor.vue +1 -1
  222. package/src/components/xform/form-designer/setting-panel/property-editor/suffixIcon-editor.vue +14 -15
  223. package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue +1 -1
  224. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +2 -3
  225. package/src/components/xform/form-designer/setting-panel/property-editor/type-editor.vue +1 -1
  226. package/src/components/xform/form-designer/setting-panel/property-editor/uploadTip-editor.vue +1 -1
  227. package/src/components/xform/form-designer/setting-panel/property-editor/uploadURL-editor.vue +1 -1
  228. package/src/components/xform/form-designer/setting-panel/property-editor/urlValueEnabled-editor.vue +91 -0
  229. package/src/components/xform/form-designer/setting-panel/property-editor/validation-editor.vue +1 -1
  230. package/src/components/xform/form-designer/setting-panel/property-editor/validationHint-editor.vue +1 -1
  231. package/src/components/xform/form-designer/setting-panel/property-editor/widgetWidth-editor.vue +1 -1
  232. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +374 -351
  233. package/src/components/xform/form-designer/toolbar-panel/index.vue +266 -103
  234. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +655 -589
  235. package/src/components/xform/form-designer/widget-panel/index.vue +391 -341
  236. package/src/components/xform/form-designer/widget-panel/indexMixin.js +351 -308
  237. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +4642 -4028
  238. package/src/components/xform/form-render/container-item/containerItemMixin.js +76 -61
  239. package/src/components/xform/form-render/container-item/data-table-item.vue +24 -13
  240. package/src/components/xform/form-render/container-item/data-table-mixin.js +5927 -3400
  241. package/src/components/xform/form-render/container-item/detail-h5-item.vue +173 -173
  242. package/src/components/xform/form-render/container-item/detail-item.vue +446 -224
  243. package/src/components/xform/form-render/container-item/detail-plain-item.vue +92 -0
  244. package/src/components/xform/form-render/container-item/list-h5-item.vue +1186 -411
  245. package/src/components/xform/form-render/container-item/tab-item.vue +129 -125
  246. package/src/components/xform/form-render/container-item/table-item.vue +0 -3
  247. package/src/components/xform/form-render/container-item/table2-item.vue +18 -10
  248. package/src/components/xform/form-render/dynamicDialogRender.js +140 -99
  249. package/src/components/xform/form-render/index.vue +8 -8
  250. package/src/components/xform/form-render/indexMixin.js +5299 -3766
  251. package/src/components/xform/form-render/refMixin.js +14 -11
  252. package/src/components/xform/lang/en-US.js +473 -438
  253. package/src/components/xform/lang/en-US_extension.js +4 -0
  254. package/src/components/xform/lang/zh-CN.js +646 -620
  255. package/src/components/xform/mixins/defaultHandle.js +363 -26
  256. package/src/components/xform/mixins/scriptHttp.js +54 -51
  257. package/src/components/xform/utils/attachmentValueUtil.js +239 -0
  258. package/src/components/xform/utils/fixedQueryUtil.js +93 -0
  259. package/src/components/xform/utils/format.js +195 -169
  260. package/src/components/xform/utils/queryParamUtil.js +84 -0
  261. package/src/components/xform/utils/tableColumnHelper.js +7 -8
  262. package/src/components/xform/utils/util.js +1663 -1551
  263. package/src/components/xform/utils/validators.js +100 -48
  264. package/src/index.js +403 -89
  265. package/src/layout/components/AppMain.vue +147 -119
  266. package/src/layout/components/Sidebar/default.vue +109 -59
  267. package/src/layout/components/TagsView/index.vue +1 -1
  268. package/src/layout/components/extractedCode/queryDialog.vue +33 -26
  269. package/src/layout/components/extractedCode/viewDialog.vue +207 -193
  270. package/src/layout/components/langTool.vue +128 -123
  271. package/src/layout/defaultLayout.vue +170 -158
  272. package/src/mixins/wf/index.js +40 -38
  273. package/src/public-path.js +38 -0
  274. package/src/router/modules/system.js +4 -0
  275. package/src/store/config/index.js +945 -669
  276. package/src/utils/pdfUtil.js +428 -70
  277. package/src/views/bd/setting/bd_company_env/dialog.vue +1 -1
  278. package/src/views/bd/setting/formVersion/button.vue +5 -0
  279. package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +21 -10
  280. package/src/views/bd/setting/formVersion/link.vue +5 -0
  281. package/src/views/bd/setting/form_script/edit.vue +1 -0
  282. package/src/views/bd/setting/form_script/edit1.vue +1 -0
  283. package/src/views/bd/setting/form_script/form_list.vue +1 -0
  284. package/src/views/bd/setting/form_script/list.vue +1 -0
  285. package/src/views/bd/setting/form_script/list1.vue +2 -0
  286. package/src/views/bd/setting/form_template/edit.vue +1 -0
  287. package/src/views/bd/setting/form_template/list.vue +2 -0
  288. package/src/views/bd/setting/form_template/mixins/edit.js +77 -74
  289. package/src/views/bd/setting/table_model/edit.vue +16 -29
  290. package/src/views/bd/setting/table_model/list.vue +1 -0
  291. package/src/views/bd/setting/table_model/mixins/edit.js +295 -149
  292. package/src/views/bd/setting/table_model/mixins/zdDialog.js +32 -0
  293. package/src/views/support/export_template/list.vue +1 -1
  294. package/src/views/user/company_info/edit.vue +149 -88
  295. package/src/views/user/form/form_template/dialog.vue +1 -1
  296. package/src/views/user/form/form_template/itemList.vue +1 -1
  297. package/src/views/user/form/form_template/list.vue +1 -1
  298. package/src/views/user/form/form_template_field/dialog.vue +1 -1
  299. package/src/views/user/form/form_type/dialog.vue +1 -1
  300. package/src/views/user/form/form_type/list.vue +1 -1
  301. package/src/views/user/form/report_requestaccess/dialog.vue +1 -1
  302. package/src/views/user/form/report_requestaccess/list.vue +1 -1
  303. package/src/views/user/form/vform/designer.vue +51 -22
  304. package/src/views/user/form/vform/render.vue +21 -23
  305. package/src/views/user/form/view/list.vue +134 -37
  306. package/src/views/user/wf/wfReport/index.vue +24 -1
  307. package/src/views/user/wf/wf_manage/list.vue +8 -4
  308. package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +0 -209
  309. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin - /345/211/257/346/234/254.js" +0 -1639
  310. package/src/views/bd/setting/table_model/mixins/edit copy.js +0 -903
  311. package/src/views/user/menu/voc_list.vue +0 -686
@@ -1,1487 +1,1794 @@
1
- <template>
2
- <div>
3
- <el-form
4
- :model="formConfig"
5
- size="mini"
6
- label-position="left"
7
- label-width="120px"
8
- class="setting-form"
9
- @submit.native.prevent
10
- >
11
- <el-collapse v-model="formActiveCollapseNames" class="setting-collapse">
12
- <el-collapse-item name="1" :title="i18nt('designer.setting.basicSetting')">
13
- <el-form-item :label="i18nt('数据库表')">
14
- <el-input type="text" v-model="formConfig.entity"></el-input>
15
- </el-form-item>
16
- <el-form-item :label="i18nt('数据保存脚本编码')">
17
- <el-input
18
- type="text"
19
- v-model="formConfig.saveScriptCode"
20
- placeholder="默认saveUpdatge"
21
- ></el-input>
22
- </el-form-item>
23
- <el-form-item label="全局参数配置">
24
- <a
25
- href="javascript:void(0);"
26
- class="a-link link-oneLind"
27
- @click="editFormEventHandler('globalConfig')"
28
- >
29
- <span>{{ formConfig.globalConfig }}</span>
30
- <i class="el-icon-edit"></i>
31
- </a>
32
- </el-form-item>
33
- <el-form-item :label="i18nt('designer.setting.globalFunctions')">
34
- <a
35
- href="javascript:void(0);"
36
- class="a-link link-oneLind"
37
- @click="editGlobalFunctions"
38
- >
39
- <span>{{ formConfig.functions }}</span>
40
- <i class="el-icon-edit"></i>
41
- </a>
42
- </el-form-item>
43
- <el-form-item :label="i18nt('designer.setting.formCss')">
44
- <el-button type="info" icon="el-icon-edit" plain round @click="editFormCss">
45
- {{ i18nt("designer.setting.addCss") }}
46
- </el-button>
47
- </el-form-item>
48
- </el-collapse-item>
49
- <el-collapse-item name="2" title="详情表单信息">
50
- <el-form-item :label="i18nt('加载详情数据')">
51
- <el-switch v-model="formConfig.isLoadEntity"></el-switch>
52
- </el-form-item>
53
- <el-form-item :label="i18nt('详情数据脚本编码')">
54
- <el-input
55
- type="text"
56
- v-model="formConfig.formScriptCode"
57
- placeholder="默认getOne"
58
- ></el-input>
59
- </el-form-item>
60
- <el-form-item :label="i18nt('详情数据脚本参数')">
61
- <a
62
- href="javascript:void(0);"
63
- class="a-link link-oneLind"
64
- @click="editFormScriptParam"
65
- >
66
- <span>{{ formConfig.formScriptParam }}</span>
67
- <i class="el-icon-edit"></i>
68
- </a>
69
- </el-form-item>
70
- <el-form-item :label="i18nt('详情数据脚本回调')">
71
- <a
72
- href="javascript:void(0);"
73
- class="a-link link-oneLind"
74
- @click="editFormScriptSuccess"
75
- >
76
- <span>{{ formConfig.formScriptSuccess }}</span>
77
- <i class="el-icon-edit"></i>
78
- </a>
79
- </el-form-item>
80
- <el-form-item :label="i18nt('查看页面表单编码')">
81
- <el-input
82
- class="search-input"
83
- max="200"
84
- v-model="formConfig.editFormCode"
85
- @clear="
86
- formConfig.editFormName = null;
87
- $forceUpdate();
88
- "
89
- v-el-readonly
90
- clearable
91
- >
92
- <i
93
- slot="suffix"
94
- class="el-input__icon el-icon-search"
95
- @click="openFormTemplate(2)"
96
- ></i>
97
- </el-input>
98
- </el-form-item>
99
- <el-form-item :label="i18nt('查看页面表单名称')">
100
- {{ formConfig.editFormName }}
101
- </el-form-item>
102
- <el-form-item :label="i18nt('新增页面表单编码')">
103
- <el-input
104
- class="search-input"
105
- max="200"
106
- v-model="formConfig.addFormCode"
107
- @clear="
108
- formConfig.addFormCode = null;
109
- formConfig.addFormName = null;
110
- $forceUpdate();
111
- "
112
- v-el-readonly
113
- clearable
114
- placeholder="默认使用查看表单编码"
115
- >
116
- <i
117
- slot="suffix"
118
- class="el-input__icon el-icon-search"
119
- @click="openFormTemplate(1)"
120
- ></i>
121
- </el-input>
122
- </el-form-item>
123
- <el-form-item :label="i18nt('新增页面表单名称')">
124
- {{ formConfig.addFormName }}
125
- </el-form-item>
126
- <el-form-item :label="i18nt('详情翻单按钮')">
127
- <el-switch v-model="formConfig.billNavEnabled"></el-switch>
128
- <span style="margin-left: 8px; color: #999; font-size: 12px">
129
- 编辑态页签显示「上一单/下一单」
130
- </span>
131
- </el-form-item>
132
- </el-collapse-item>
133
- <el-collapse-item name="3" title="流程信息">
134
- <el-form-item :label="i18nt('启用流程')">
135
- <el-switch
136
- v-model="formConfig.wfEnabled"
137
- @change="changeWfEnabled"
138
- ></el-switch>
139
- </el-form-item>
140
- <el-form-item :label="i18nt('默认流程单据类型名称')">
141
- <el-input
142
- type="text"
143
- v-model="designer.vueInstance.reportTemplate.objTypeName"
144
- ></el-input>
145
- </el-form-item>
146
- <el-form-item>
147
- <span slot="label"
148
- >流程主题
149
- <scriptDescriptionButton
150
- title="流程主题说明"
151
- path="static/readme/WfSubject.txt"
152
- ></scriptDescriptionButton>
153
- </span>
154
- </el-form-item>
155
- <div>
156
- <el-input
157
- style="word-break: break-word"
158
- type="textarea"
159
- :rows="3"
160
- v-model="formConfig.wfTheme"
161
- clearable
162
- ></el-input>
163
- </div>
164
- <el-form-item :label="i18nt('流程启动时自动保存表单数据')">
165
- <el-switch v-model="formConfig.wfStartBindSave"></el-switch>
166
- </el-form-item>
167
- <el-form-item :label="i18nt('流程启动确认提示脚本')">
168
- <a
169
- href="javascript:void(0);"
170
- class="a-link link-oneLind"
171
- @click="editFormEventHandler('wfStartConfirmText')"
172
- >
173
- <span>{{ formConfig.wfStartConfirmText }}</span>
174
- <i class="el-icon-edit"></i>
175
- </a>
176
- </el-form-item>
177
-
178
- <el-form-item :label="i18nt('流程通过时自动保存表单数据')">
179
- <el-switch v-model="formConfig.wfAgreenBindSave"></el-switch>
180
- </el-form-item>
181
- <el-form-item :label="i18nt('流程通过时自动保存表单数据的节点配置')">
182
- <a
183
- href="javascript:void(0);"
184
- class="a-link link-oneLind"
185
- @click="openWfConfigDataDialog2"
186
- >
187
- <span>{{
188
- formConfig.wfAgreeConfigData && formConfig.wfAgreeConfigData.length
189
- ? "已维护"
190
- : ""
191
- }}</span>
192
- <i class="el-icon-edit"></i>
193
- </a>
194
- </el-form-item>
195
- <el-form-item :label="i18nt('启用流程节点可编辑表单')">
196
- <el-switch v-model="formConfig.wfConfigDataEnabled"></el-switch>
197
- </el-form-item>
198
- <el-form-item :label="i18nt('流程节点可编辑表单配置')">
199
- <a
200
- href="javascript:void(0);"
201
- class="a-link link-oneLind"
202
- @click="openWfConfigDataDialog"
203
- >
204
- <span>{{
205
- formConfig.wfConfigData && formConfig.wfConfigData.length ? "已维护" : ""
206
- }}</span>
207
- <i class="el-icon-edit"></i>
208
- </a>
209
- </el-form-item>
210
- <el-form-item :label="i18nt('引用流程的表单编码')">
211
- <el-input
212
- type="text"
213
- v-model="designer.vueInstance.reportTemplate.fromWfFormCode"
214
- ></el-input>
215
- </el-form-item>
216
- <el-form-item :label="i18nt('流程自定义配置')">
217
- <a
218
- href="javascript:void(0);"
219
- class="a-link link-oneLind"
220
- @click="editFormEventHandler('wfConfig')"
221
- >
222
- <span>{{ formConfig.wfConfig }}</span>
223
- <i class="el-icon-edit"></i>
224
- </a>
225
- </el-form-item>
226
- </el-collapse-item>
227
- <el-collapse-item name="4" title="列表标签页信息">
228
- <el-form-item :label="i18nt('列表启用详情多标签')">
229
- <el-switch v-model="formConfig.multiTabEnabled"></el-switch>
230
- </el-form-item>
231
- <el-form-item :label="i18nt('标签名称字段')">
232
- <el-input type="text" v-model="formConfig.multiTabLabelField"></el-input>
233
- </el-form-item>
234
- </el-collapse-item>
235
- <el-collapse-item name="5" title="其他标签页信息">
236
- <el-form-item :label="i18nt('自定义列表标签名称')">
237
- <el-input
238
- type="text"
239
- v-model="formConfig.customListTabLabel"
240
- placeholder="默认`列表`"
241
- ></el-input>
242
- </el-form-item>
243
- <el-form-item :label="i18nt('启用其他标签页')">
244
- <el-switch v-model="formConfig.otherTabEnabled"></el-switch>
245
- </el-form-item>
246
- <el-form-item :label="i18nt('隐藏常规标签')">
247
- <el-switch v-model="formConfig.hideNormalTab"></el-switch>
248
- </el-form-item>
249
- <el-form-item :label="i18nt('其他标签页配置')"> </el-form-item>
250
- <el-form-item label-width="0">
251
- <div>
252
- <draggable
253
- tag="ul"
254
- class="draggable-box"
255
- :list="formConfig.otherTabList"
256
- v-bind="{
257
- group: 'optionsGroup',
258
- ghostClass: 'ghost',
259
- handle: '.drag-option',
260
- }"
261
- >
262
- <li v-for="(option, idx) in formConfig.otherTabList" :key="idx">
263
- <el-input
264
- v-model="option.label"
265
- size="mini"
266
- style="width: 100px"
267
- placeholder="标签名称"
268
- ></el-input>
269
- <el-input
270
- v-model="option.formCode"
271
- size="mini"
272
- style="width: 100px"
273
- placeholder="表单模板编码"
274
- ></el-input>
275
- <i class="el-icon-s-operation drag-option"></i>
276
- <el-button
277
- circle
278
- plain
279
- size="mini"
280
- type="danger"
281
- @click="formConfig.otherTabList.splice(idx, 1)"
282
- icon="el-icon-minus"
283
- class="col-delete-button"
284
- ></el-button>
285
- </li>
286
- </draggable>
287
- <el-button type="text" @click="addOtherTab">{{
288
- i18nt("designer.setting.addOption")
289
- }}</el-button>
290
- </div>
291
- </el-form-item>
292
- </el-collapse-item>
293
- <el-collapse-item name="6" title="查询弹框展示信息">
294
- <el-form-item :label="i18nt('展示字段')">
295
- <el-input
296
- class="search-input"
297
- max="200"
298
- v-model="formConfig.searchDialogNameField"
299
- clearable
300
- >
301
- </el-input>
302
- </el-form-item>
303
- <el-form-item :label="i18nt('数据唯一标识')">
304
- <el-input
305
- class="search-input"
306
- max="200"
307
- v-model="formConfig.searchDialogUniqueField"
308
- clearable
309
- >
310
- </el-input>
311
- </el-form-item>
312
- </el-collapse-item>
313
-
314
- <el-collapse-item name="8" title="动态字段规则">
315
- <form-dynamic-field-setting
316
- :designer="designer"
317
- :form-config="formConfig"
318
- ></form-dynamic-field-setting>
319
- </el-collapse-item>
320
-
321
- <el-collapse-item
322
- v-if="showEventCollapse()"
323
- name="7"
1
+ <template>
2
+ <div>
3
+ <el-form
4
+ :model="formConfig"
5
+ size="mini"
6
+ label-position="left"
7
+ label-width="120px"
8
+ class="setting-form"
9
+ @submit.native.prevent
10
+ >
11
+ <el-collapse v-model="formActiveCollapseNames" class="setting-collapse">
12
+ <el-collapse-item
13
+ name="1"
14
+ :title="i18nt('designer.setting.basicSetting')"
15
+ >
16
+ <el-form-item class="form-item-label-top" :label="i18nt('数据库表')">
17
+ <el-input type="text" v-model="formConfig.entity"></el-input>
18
+ </el-form-item>
19
+ <el-form-item class="form-item-label-top" :label="i18nt('数据保存脚本编码')">
20
+ <el-input
21
+ type="text"
22
+ v-model="formConfig.saveScriptCode"
23
+ placeholder="默认saveUpdatge"
24
+ ></el-input>
25
+ </el-form-item>
26
+ <el-form-item label="全局参数配置">
27
+ <a
28
+ href="javascript:void(0);"
29
+ class="a-link link-oneLind"
30
+ @click="editFormEventHandler('globalConfig')"
31
+ >
32
+ <span>{{ formConfig.globalConfig }}</span>
33
+ <i class="el-icon-edit"></i>
34
+ </a>
35
+ </el-form-item>
36
+ <el-form-item :label="i18nt('designer.setting.globalFunctions')">
37
+ <a
38
+ href="javascript:void(0);"
39
+ class="a-link link-oneLind"
40
+ @click="editGlobalFunctions"
41
+ >
42
+ <span>{{ formConfig.functions }}</span>
43
+ <i class="el-icon-edit"></i>
44
+ </a>
45
+ </el-form-item>
46
+ <el-form-item :label="i18nt('designer.setting.formCss')">
47
+ <el-button
48
+ type="info"
49
+ icon="el-icon-edit"
50
+ plain
51
+ round
52
+ @click="editFormCss"
53
+ >
54
+ {{ i18nt("designer.setting.addCss") }}
55
+ </el-button>
56
+ </el-form-item>
57
+ </el-collapse-item>
58
+ <el-collapse-item name="2" title="详情表单信息">
59
+ <el-form-item :label="i18nt('加载详情数据')">
60
+ <el-switch v-model="formConfig.isLoadEntity"></el-switch>
61
+ </el-form-item>
62
+ <el-form-item class="form-item-label-top" :label="i18nt('详情数据脚本编码')">
63
+ <el-input
64
+ type="text"
65
+ v-model="formConfig.formScriptCode"
66
+ placeholder="默认getOne"
67
+ ></el-input>
68
+ </el-form-item>
69
+ <el-form-item :label="i18nt('详情数据脚本参数')">
70
+ <a
71
+ href="javascript:void(0);"
72
+ class="a-link link-oneLind"
73
+ @click="editFormScriptParam"
74
+ >
75
+ <span>{{ formConfig.formScriptParam }}</span>
76
+ <i class="el-icon-edit"></i>
77
+ </a>
78
+ </el-form-item>
79
+ <el-form-item :label="i18nt('详情数据脚本回调')">
80
+ <a
81
+ href="javascript:void(0);"
82
+ class="a-link link-oneLind"
83
+ @click="editFormScriptSuccess"
84
+ >
85
+ <span>{{ formConfig.formScriptSuccess }}</span>
86
+ <i class="el-icon-edit"></i>
87
+ </a>
88
+ </el-form-item>
89
+ <el-form-item class="form-item-label-top" :label="i18nt('查看页面表单编码')">
90
+ <el-input
91
+ class="search-input"
92
+ max="200"
93
+ v-model="formConfig.editFormCode"
94
+ @clear="
95
+ formConfig.editFormName = null;
96
+ $forceUpdate();
97
+ "
98
+ v-el-readonly
99
+ clearable
100
+ >
101
+ <i
102
+ slot="suffix"
103
+ class="el-input__icon el-icon-search"
104
+ @click="openFormTemplate(2)"
105
+ ></i>
106
+ </el-input>
107
+ </el-form-item>
108
+ <el-form-item :label="i18nt('查看页面表单名称')">
109
+ {{ formConfig.editFormName }}
110
+ </el-form-item>
111
+ <el-form-item class="form-item-label-top" :label="i18nt('新增页面表单编码')">
112
+ <el-input
113
+ class="search-input"
114
+ max="200"
115
+ v-model="formConfig.addFormCode"
116
+ @clear="
117
+ formConfig.addFormCode = null;
118
+ formConfig.addFormName = null;
119
+ $forceUpdate();
120
+ "
121
+ v-el-readonly
122
+ clearable
123
+ placeholder="默认使用查看表单编码"
124
+ >
125
+ <i
126
+ slot="suffix"
127
+ class="el-input__icon el-icon-search"
128
+ @click="openFormTemplate(1)"
129
+ ></i>
130
+ </el-input>
131
+ </el-form-item>
132
+ <el-form-item :label="i18nt('新增页面表单名称')">
133
+ {{ formConfig.addFormName }}
134
+ </el-form-item>
135
+ <el-form-item :label="i18nt('详情翻单按钮')">
136
+ <el-switch v-model="formConfig.billNavEnabled"></el-switch>
137
+ <span style="margin-left: 8px; color: #999; font-size: 12px">
138
+ 编辑态页签显示「上一单/下一单」
139
+ </span>
140
+ </el-form-item>
141
+ </el-collapse-item>
142
+ <el-collapse-item name="actionButtons" title="操作按钮">
143
+ <!-- formDialog/formDrawer 按 formCode 打开时的底部按钮(formConfig.actionButtons),
144
+ 未配置则回退默认取消/确定;权限编码 = formCode:authName(禁用清单机制,默认放行) -->
145
+ <el-form-item label-width="0">
146
+ <draggable
147
+ tag="ul"
148
+ class="draggable-box"
149
+ v-if="actionButtons.length"
150
+ :list="actionButtons"
151
+ v-bind="{
152
+ group: 'actionBtnGroup',
153
+ ghostClass: 'ghost',
154
+ handle: '.drag-option',
155
+ }"
156
+ >
157
+ <li
158
+ v-for="(btn, btnIdx) in actionButtons"
159
+ :key="btnIdx"
160
+ class="col-item action-button-item"
161
+ >
162
+ <i class="el-icon-s-operation drag-option"></i>
163
+ <span class="action-button-label">{{
164
+ btn.label || btn.code
165
+ }}</span>
166
+ <el-button
167
+ circle
168
+ plain
169
+ size="mini"
170
+ icon="el-icon-edit"
171
+ @click="editActionButton(btnIdx)"
172
+ ></el-button>
173
+ <el-button
174
+ circle
175
+ plain
176
+ size="mini"
177
+ type="danger"
178
+ icon="el-icon-minus"
179
+ @click="removeActionButton(btnIdx)"
180
+ ></el-button>
181
+ </li>
182
+ </draggable>
183
+ <div>
184
+ <el-button
185
+ type="text"
186
+ icon="el-icon-circle-plus-outline"
187
+ class="add-option"
188
+ @click="addActionButton"
189
+ >
190
+ {{ i18nt("添加按钮") }}
191
+ </el-button>
192
+ </div>
193
+ </el-form-item>
194
+ </el-collapse-item>
195
+ <el-collapse-item name="3" title="流程信息">
196
+ <!-- 分组按单据的流程生命周期排:基础 → 提交入口 → 提交动作 → 审批过程 → 高级。
197
+ 「提交动作」组内的顺序即真实执行顺序:前置脚本 → 确认提示 → 启动时自动保存。 -->
198
+ <div class="wf-group-title">基础</div>
199
+ <el-form-item :label="i18nt('启用流程')">
200
+ <el-switch
201
+ v-model="formConfig.wfEnabled"
202
+ @change="changeWfEnabled"
203
+ ></el-switch>
204
+ </el-form-item>
205
+ <el-form-item class="form-item-label-top" :label="i18nt('默认流程单据类型名称')">
206
+ <el-input
207
+ type="text"
208
+ v-model="designer.vueInstance.reportTemplate.objTypeName"
209
+ ></el-input>
210
+ </el-form-item>
211
+ <el-form-item>
212
+ <span slot="label"
213
+ >流程主题
214
+ <scriptDescriptionButton
215
+ title="流程主题说明"
216
+ path="static/readme/WfSubject.txt"
217
+ ></scriptDescriptionButton>
218
+ </span>
219
+ </el-form-item>
220
+ <div>
221
+ <el-input
222
+ style="word-break: break-word"
223
+ type="textarea"
224
+ :rows="3"
225
+ v-model="formConfig.wfTheme"
226
+ clearable
227
+ ></el-input>
228
+ </div>
229
+
230
+ <div class="wf-group-title">提交入口(按钮)</div>
231
+ <el-form-item v-if="formConfig.wfEnabled" class="form-item-label-red">
232
+ <span slot="label">
233
+ {{ i18nt("新增页启用「保存并提交流程」按钮") }}
234
+ <el-tooltip effect="light" placement="top">
235
+ <div slot="content" style="line-height: 1.6">
236
+ 详情页标题栏内建「保存并提交流程」按钮<br />
237
+ 只在新增页显示,编辑态、已启动流程的单据不显示<br />
238
+ 按钮名由后台流程自定义属性(param18)统一下发,此处不配
239
+ </div>
240
+ <i class="el-icon-info"></i>
241
+ </el-tooltip>
242
+ </span>
243
+ <el-switch v-model="formConfig.saveSubmitEnabled"></el-switch>
244
+ </el-form-item>
245
+ <el-form-item>
246
+ <span slot="label">
247
+ {{ i18nt("提交流程按钮显隐控制脚本") }}
248
+ <el-tooltip effect="light" placement="top">
249
+ <div slot="content" style="line-height: 1.6">
250
+ 控制详情页「提交流程」按钮显隐,return false
251
+ 隐藏,不配则显示<br />
252
+ 随表单数据实时求值,脚本内只读数据、返回布尔即可,切勿修改数据
253
+ </div>
254
+ <i class="el-icon-info"></i>
255
+ </el-tooltip>
256
+ </span>
257
+ <a
258
+ href="javascript:void(0);"
259
+ class="a-link link-oneLind"
260
+ @click="editFormEventHandler('wfStartBtnShow')"
261
+ >
262
+ <span>{{ formConfig.wfStartBtnShow }}</span>
263
+ <i class="el-icon-edit"></i>
264
+ </a>
265
+ </el-form-item>
266
+
267
+ <div class="wf-group-title">提交动作(按执行先后)</div>
268
+ <el-form-item>
269
+ <span slot="label">
270
+ {{ i18nt("提交前置处理脚本") }}
271
+ <el-tooltip effect="light" placement="top">
272
+ <div slot="content" style="line-height: 1.6">
273
+ 「提交流程」「保存并提交流程」共用<br />
274
+ 表单校验通过后、确认框之前执行<br />
275
+ return false 中止提交;返回 Promise 则等它 resolve(false 或
276
+ reject 同样中止)<br />
277
+ 入参 source:saveSubmit=保存并提交流程,wfStart=提交流程
278
+ </div>
279
+ <i class="el-icon-info"></i>
280
+ </el-tooltip>
281
+ </span>
282
+ <a
283
+ href="javascript:void(0);"
284
+ class="a-link link-oneLind"
285
+ @click="editFormEventHandler('onBeforeSubmitWf')"
286
+ >
287
+ <span>{{ formConfig.onBeforeSubmitWf }}</span>
288
+ <i class="el-icon-edit"></i>
289
+ </a>
290
+ </el-form-item>
291
+ <el-form-item :label="i18nt('流程启动确认提示脚本')">
292
+ <a
293
+ href="javascript:void(0);"
294
+ class="a-link link-oneLind"
295
+ @click="editFormEventHandler('wfStartConfirmText')"
296
+ >
297
+ <span>{{ formConfig.wfStartConfirmText }}</span>
298
+ <i class="el-icon-edit"></i>
299
+ </a>
300
+ </el-form-item>
301
+ <el-form-item :label="i18nt('流程启动时自动保存表单数据')">
302
+ <el-switch v-model="formConfig.wfStartBindSave"></el-switch>
303
+ </el-form-item>
304
+
305
+ <div class="wf-group-title">审批过程</div>
306
+ <el-form-item :label="i18nt('流程通过时自动保存表单数据')">
307
+ <el-switch v-model="formConfig.wfAgreenBindSave"></el-switch>
308
+ </el-form-item>
309
+ <el-form-item :label="i18nt('流程通过时自动保存表单数据的节点配置')">
310
+ <a
311
+ href="javascript:void(0);"
312
+ class="a-link link-oneLind"
313
+ @click="openWfConfigDataDialog2"
314
+ >
315
+ <span>{{
316
+ formConfig.wfAgreeConfigData &&
317
+ formConfig.wfAgreeConfigData.length
318
+ ? "已维护"
319
+ : ""
320
+ }}</span>
321
+ <i class="el-icon-edit"></i>
322
+ </a>
323
+ </el-form-item>
324
+ <el-form-item :label="i18nt('启用流程节点可编辑表单')">
325
+ <el-switch v-model="formConfig.wfConfigDataEnabled"></el-switch>
326
+ </el-form-item>
327
+ <el-form-item :label="i18nt('流程节点可编辑表单配置')">
328
+ <a
329
+ href="javascript:void(0);"
330
+ class="a-link link-oneLind"
331
+ @click="openWfConfigDataDialog"
332
+ >
333
+ <span>{{
334
+ formConfig.wfConfigData && formConfig.wfConfigData.length
335
+ ? "已维护"
336
+ : ""
337
+ }}</span>
338
+ <i class="el-icon-edit"></i>
339
+ </a>
340
+ </el-form-item>
341
+
342
+ <div class="wf-group-title">高级</div>
343
+ <el-form-item class="form-item-label-top" :label="i18nt('引用流程的表单编码')">
344
+ <el-input
345
+ type="text"
346
+ v-model="designer.vueInstance.reportTemplate.fromWfFormCode"
347
+ ></el-input>
348
+ </el-form-item>
349
+ <el-form-item :label="i18nt('流程自定义配置')">
350
+ <a
351
+ href="javascript:void(0);"
352
+ class="a-link link-oneLind"
353
+ @click="editFormEventHandler('wfConfig')"
354
+ >
355
+ <span>{{ formConfig.wfConfig }}</span>
356
+ <i class="el-icon-edit"></i>
357
+ </a>
358
+ </el-form-item>
359
+ </el-collapse-item>
360
+ <el-collapse-item name="4" title="列表标签页信息(仅列表表单生效)">
361
+ <el-form-item label-width="0">
362
+ <span style="color:rgba(0,0,0,0.45); font-size: 12px; line-height: 1.6;display:block;">
363
+ 本组配置只从「查询列表页」所用的表单读取,在详情/编辑表单里设置不会生效
364
+ </span>
365
+ </el-form-item>
366
+ <el-form-item :label="i18nt('列表启用详情多标签')">
367
+ <el-switch v-model="formConfig.multiTabEnabled"></el-switch>
368
+ </el-form-item>
369
+ <el-form-item class="form-item-label-top" :label="i18nt('标签名称字段')">
370
+ <el-input
371
+ type="text"
372
+ v-model="formConfig.multiTabLabelField"
373
+ ></el-input>
374
+ </el-form-item>
375
+ <el-form-item
376
+ v-if="formConfig.multiTabEnabled"
377
+ :label="i18nt('新增打开页签')"
378
+ class="el-form-item-second"
379
+ >
380
+ <el-switch v-model="formConfig.addTabEnabled"></el-switch>
381
+ <span style="margin-left: 8px; color: #999; font-size: 12px">
382
+ 开启后新增打开独立可关闭页签,需配置「标签名称字段」
383
+ </span>
384
+ </el-form-item>
385
+ <el-form-item :label="i18nt('流程启动后行为')" class="form-item-label-top">
386
+ <el-radio-group v-model="formConfig.submitBehavior">
387
+ <el-radio label="closeToList">关闭页签并回列表刷新</el-radio>
388
+ <el-radio label="refreshCurrent">刷新当前页签</el-radio>
389
+ </el-radio-group>
390
+ <div style="color: #999; font-size: 12px; line-height: 1.6">
391
+ 详情页「保存并提交」「直接启动流程」成功后的行为,不填默认「刷新当前页签」
392
+ </div>
393
+ </el-form-item>
394
+ </el-collapse-item>
395
+ <el-collapse-item name="5" title="其他标签页信息">
396
+ <el-form-item class="form-item-label-top" :label="i18nt('自定义列表标签名称')">
397
+ <el-input
398
+ type="text"
399
+ v-model="formConfig.customListTabLabel"
400
+ placeholder="默认`列表`"
401
+ ></el-input>
402
+ </el-form-item>
403
+ <el-form-item :label="i18nt('启用其他标签页')">
404
+ <el-switch v-model="formConfig.otherTabEnabled"></el-switch>
405
+ </el-form-item>
406
+ <el-form-item :label="i18nt('隐藏常规标签')">
407
+ <el-switch v-model="formConfig.hideNormalTab"></el-switch>
408
+ </el-form-item>
409
+ <el-form-item :label="i18nt('其他标签页配置')" class="form-item-label-top" label-width="0">
410
+ <div>
411
+ <draggable
412
+ tag="ul"
413
+ class="draggable-box"
414
+ :list="formConfig.otherTabList"
415
+ v-bind="{
416
+ group: 'optionsGroup',
417
+ ghostClass: 'ghost',
418
+ handle: '.drag-option',
419
+ }"
420
+ >
421
+ <li v-for="(option, idx) in formConfig.otherTabList" :key="idx">
422
+ <el-input
423
+ v-model="option.label"
424
+ size="mini"
425
+ style="width: 100px"
426
+ placeholder="标签名称"
427
+ ></el-input>
428
+ <el-input
429
+ v-model="option.formCode"
430
+ size="mini"
431
+ style="width: 100px"
432
+ placeholder="表单模板编码"
433
+ ></el-input>
434
+ <i class="el-icon-s-operation drag-option"></i>
435
+ <el-button
436
+ circle
437
+ plain
438
+ size="mini"
439
+ type="danger"
440
+ @click="formConfig.otherTabList.splice(idx, 1)"
441
+ icon="el-icon-minus"
442
+ class="col-delete-button"
443
+ ></el-button>
444
+ </li>
445
+ </draggable>
446
+ <el-button type="text" @click="addOtherTab">{{
447
+ i18nt("designer.setting.addOption")
448
+ }}</el-button>
449
+ </div>
450
+ </el-form-item>
451
+ </el-collapse-item>
452
+ <el-collapse-item name="6" title="查询弹框展示信息">
453
+ <el-form-item class="form-item-label-top" :label="i18nt('展示字段')">
454
+ <el-input
455
+ class="search-input"
456
+ max="200"
457
+ v-model="formConfig.searchDialogNameField"
458
+ clearable
459
+ >
460
+ </el-input>
461
+ </el-form-item>
462
+ <el-form-item class="form-item-label-top" :label="i18nt('数据唯一标识')">
463
+ <el-input
464
+ class="search-input"
465
+ max="200"
466
+ v-model="formConfig.searchDialogUniqueField"
467
+ clearable
468
+ >
469
+ </el-input>
470
+ </el-form-item>
471
+ </el-collapse-item>
472
+
473
+ <el-collapse-item name="8" title="动态字段规则">
474
+ <form-dynamic-field-setting
475
+ :designer="designer"
476
+ :form-config="formConfig"
477
+ ></form-dynamic-field-setting>
478
+ </el-collapse-item>
479
+
480
+ <el-collapse-item
481
+ v-if="showEventCollapse()"
482
+ name="7"
324
483
  :title="i18nt('designer.setting.eventSetting')"
325
- >
326
- <!-- <el-form-item label="onBeforeCreated" label-width="150px">
327
- <a href="javascript:void(0);" class="a-link link-oneLind"
328
- @click="editFormEventHandler('onBeforeCreated', ['dataId','done'])">
329
- <span>{{ formConfig.onBeforeCreated }}</span>
330
- <i class="el-icon-edit"></i>
331
- </a>
332
- </el-form-item>-->
333
- <el-form-item label="onFormCreated" label-width="150px">
334
- <a
335
- href="javascript:void(0);"
336
- class="a-link link-oneLind"
337
- @click="editFormEventHandler('onFormCreated')"
338
- >
339
- <span>{{ formConfig.onFormCreated }}</span>
340
- <i class="el-icon-edit"></i>
341
- </a>
342
- </el-form-item>
343
- <el-form-item label="onFormBeforeMounted" label-width="150px">
344
- <a
345
- href="javascript:void(0);"
346
- class="a-link link-oneLind"
347
- @click="editFormEventHandler('onFormBeforeMounted')"
348
- >
349
- <span>{{ formConfig.onFormBeforeMounted }}</span>
350
- <i class="el-icon-edit"></i>
351
- </a>
352
- </el-form-item>
353
- <el-form-item label="onFormMounted" label-width="150px">
354
- <a
355
- href="javascript:void(0);"
356
- class="a-link link-oneLind"
357
- @click="editFormEventHandler('onFormMounted')"
358
- >
359
- <span>{{ formConfig.onFormMounted }}</span>
360
- <i class="el-icon-edit"></i>
361
- </a>
362
- </el-form-item>
363
- <!-- -->
364
- <el-form-item label="onFormDataChange" label-width="150px">
365
- <a
366
- href="javascript:void(0);"
367
- class="a-link link-oneLind"
368
- @click="editFormEventHandler('onFormDataChange')"
369
- >
370
- <span>{{ formConfig.onFormDataChange }}</span>
371
- <i class="el-icon-edit"></i>
372
- </a>
373
- </el-form-item>
374
- <!-- -->
375
- <!--
376
- <el-form-item label="onFormValidate">
377
- <el-button type="info" icon="el-icon-edit" plain round @click="editFormEventHandler('onFormValidate')">
378
- {{i18nt('designer.setting.addEventHandler')}}</el-button>
379
- </el-form-item>
380
- -->
381
- </el-collapse-item>
382
- </el-collapse>
383
- </el-form>
384
-
385
- <el-dialog
386
- :title="formEventDialogTitle"
387
- :visible.sync="showFormEventDialogFlag"
388
- v-if="showFormEventDialogFlag"
389
- :show-close="true"
390
- custom-class="dialog-style list-dialog"
391
- v-dialog-drag
392
- :close-on-click-modal="false"
393
- :close-on-press-escape="false"
394
- :destroy-on-close="true"
395
- :append-to-body="true"
396
- :modal-append-to-body="true"
397
- top="5vh"
398
- >
399
- <div class="cont">
400
- <el-alert
401
- type="info"
402
- :closable="false"
403
- :title="'form.' + eventParamsMap[curEventName]"
404
- ></el-alert>
405
- <code-editor
406
- :mode="'javascript'"
407
- :readonly="false"
408
- v-model="formEventHandlerCode"
409
- ref="ecEditor"
410
- ></code-editor>
411
- <el-alert type="info" :closable="false" title="}"></el-alert>
412
- </div>
413
- <div slot="footer" class="dialog-footer">
414
- <el-button
415
- @click="showFormEventDialogFlag = false"
416
- class="button-sty"
417
- icon="el-icon-close"
418
- >
419
- {{ i18nt("designer.hint.cancel") }}
420
- </el-button>
421
- <el-button
422
- type="primary"
423
- @click="saveFormEventHandler"
424
- class="button-sty"
425
- icon="el-icon-check"
426
- >
427
- {{ i18nt("designer.hint.confirm") }}
428
- </el-button>
429
- </div>
430
- </el-dialog>
431
-
432
- <el-dialog
433
- :title="i18nt('designer.setting.formCss')"
434
- :visible.sync="showEditFormCssDialogFlag"
435
- v-if="showEditFormCssDialogFlag"
436
- :show-close="true"
437
- custom-class="dialog-style list-dialog"
438
- v-dialog-drag
439
- :close-on-click-modal="false"
440
- :close-on-press-escape="false"
441
- :destroy-on-close="true"
442
- :append-to-body="true"
443
- :modal-append-to-body="true"
444
- >
445
- <div class="cont">
446
- <code-editor :mode="'css'" :readonly="false" v-model="formCssCode"></code-editor>
447
- </div>
448
- <div slot="footer" class="dialog-footer">
449
- <el-button
450
- @click="showEditFormCssDialogFlag = false"
451
- class="button-sty"
452
- icon="el-icon-close"
453
- >
454
- {{ i18nt("designer.hint.cancel") }}
455
- </el-button>
456
- <el-button
457
- type="primary"
458
- @click="saveFormCss"
459
- class="button-sty"
460
- icon="el-icon-check"
461
- >
462
- {{ i18nt("designer.hint.confirm") }}
463
- </el-button>
464
- </div>
465
- </el-dialog>
466
-
467
- <el-dialog
468
- :title="i18nt('designer.setting.globalFunctions')"
469
- :visible.sync="showEditFunctionsDialogFlag"
470
- v-if="showEditFunctionsDialogFlag"
471
- :show-close="true"
472
- custom-class="dialog-style list-dialog"
473
- v-dialog-drag
474
- :close-on-click-modal="false"
475
- :close-on-press-escape="false"
476
- :destroy-on-close="true"
477
- :append-to-body="true"
478
- :modal-append-to-body="true"
479
- >
480
- <div class="cont">
481
- <code-editor
482
- :mode="'javascript'"
483
- :readonly="false"
484
- v-model="functionsCode"
485
- ref="gfEditor"
486
- ></code-editor>
487
- </div>
488
- <div slot="footer" class="dialog-footer">
489
- <el-button
490
- @click="showEditFunctionsDialogFlag = false"
491
- class="button-sty"
492
- icon="el-icon-close"
493
- >
494
- {{ i18nt("designer.hint.cancel") }}
495
- </el-button>
496
- <el-button
497
- type="primary"
498
- @click="saveGlobalFunctions"
499
- class="button-sty"
500
- icon="el-icon-check"
501
- >
502
- {{ i18nt("designer.hint.confirm") }}
503
- </el-button>
504
- </div>
505
- </el-dialog>
506
-
507
- <el-dialog
508
- :title="i18nt('详情数据脚本参数')"
509
- :visible.sync="showFormScriptParamDialog"
510
- v-if="showFormScriptParamDialog"
511
- :show-close="true"
512
- custom-class="dialog-style list-dialog"
513
- v-dialog-drag
514
- :close-on-click-modal="false"
515
- :close-on-press-escape="false"
516
- :destroy-on-close="true"
517
- :append-to-body="true"
518
- :modal-append-to-body="true"
519
- >
520
- <div class="cont">
521
- <code-editor
522
- :mode="'javascript'"
523
- :readonly="false"
524
- v-model="formScriptParam"
525
- ref="gfEditor"
526
- ></code-editor>
527
- </div>
528
- <div slot="footer" class="dialog-footer">
529
- <el-button
530
- @click="showFormScriptParamDialog = false"
531
- class="button-sty"
532
- icon="el-icon-close"
533
- >
534
- {{ i18nt("designer.hint.cancel") }}
535
- </el-button>
536
- <el-button
537
- type="primary"
538
- @click="saveFormScriptParam"
539
- class="button-sty"
540
- icon="el-icon-check"
541
- >
542
- {{ i18nt("designer.hint.confirm") }}
543
- </el-button>
544
- </div>
545
- </el-dialog>
546
- <el-dialog
547
- :title="i18nt('详情数据脚本回调')"
548
- :visible.sync="showFormScriptSuccessDialog"
549
- v-if="showFormScriptSuccessDialog"
550
- :show-close="true"
551
- custom-class="dialog-style list-dialog"
552
- v-dialog-drag
553
- :close-on-click-modal="false"
554
- :close-on-press-escape="false"
555
- :destroy-on-close="true"
556
- :append-to-body="true"
557
- :modal-append-to-body="true"
558
- >
559
- <div class="cont">
560
- <code-editor
561
- :mode="'javascript'"
562
- :readonly="false"
563
- v-model="formScriptSuccess"
564
- ref="gfEditor"
565
- ></code-editor>
566
- </div>
567
- <div slot="footer" class="dialog-footer">
568
- <el-button
569
- @click="showFormScriptSuccessDialog = false"
570
- class="button-sty"
571
- icon="el-icon-close"
572
- >
573
- {{ i18nt("designer.hint.cancel") }}
574
- </el-button>
575
- <el-button
576
- type="primary"
577
- @click="saveFormScriptSuccess"
578
- class="button-sty"
579
- icon="el-icon-check"
580
- >
581
- {{ i18nt("designer.hint.confirm") }}
582
- </el-button>
583
- </div>
584
- </el-dialog>
585
- <el-dialog
586
- v-if="dialogVisible"
587
- custom-class="dialog-style list-dialog"
588
- :title="i18nt('流程节点可编辑表单配置')"
589
- :visible.sync="dialogVisible"
590
- :show-close="!0"
591
- :append-to-body="true"
592
- :modal="false"
593
- :close-on-click-modal="!1"
594
- :close-on-press-escape="!1"
595
- :destroy-on-close="!0"
596
- width="1220px"
597
- top="5vh"
598
- v-dialog-drag
599
- :fullscreen="true"
600
- >
601
- <div class="cont" style="padding-bottom: 8px">
602
- <el-table
603
- ref="singleTable"
604
- width="100%"
605
- :data="wfConfigData"
606
- height="100%"
607
- border=""
608
- row-key="columnId"
609
- stripe=""
610
- style="margin-bottom: 0px"
611
- >
612
- <el-table-column type="index" width="35" fixed="left"></el-table-column>
613
- <!-- <el-table-column :label="i18nt('服务')" width="150">
614
- <template slot-scope="{ row }">
615
- <el-select v-model="row.serveType" @change="changeServeType(row)">
616
- <el-option :value="1" label="正式"></el-option>
617
- <el-option :value="2" label="UAT"></el-option>
618
- <el-option :value="3" label="测试"></el-option>
619
- <el-option :value="4" label="自定义"></el-option>
620
- </el-select>
621
- </template>
622
- </el-table-column>
623
- <el-table-column :label="i18nt('自定义服务')" width="150">
624
- <template slot-scope="{ row }">
625
- <el-input
626
- v-model="row.serveName"
627
- clearable
628
- :disabled="row.serveType !== 4"
629
- ></el-input>
630
- </template>
631
- </el-table-column>
632
- <el-table-column :label="i18nt('组织编码')" width="250">
633
- <template slot-scope="{ row, $index }">
634
- <el-input v-model="row.companyCodes" clearable></el-input>
635
- </template>
636
- </el-table-column> -->
637
- <el-table-column :label="i18nt('组织编码')" width="250">
638
- <template slot-scope="{ row, $index }">
639
- <el-input
640
- class="search-input"
641
- max="200"
642
- v-model="row.companyCodes"
643
- @clear="clearBdCompanyEnv1(row)"
644
- v-el-readonly
645
- clearable
646
- >
647
- <i
648
- slot="suffix"
649
- class="el-input__icon el-icon-search"
650
- @click="openBdCompanyEnvDialog1($index)"
651
- ></i>
652
- </el-input>
653
- </template>
654
- </el-table-column>
655
- <el-table-column :label="i18nt('服务名称')" width="150">
656
- <template slot-scope="{ row }">
657
- {{ row.serveName }}
658
- </template>
659
- </el-table-column>
660
- <!-- <el-table-column :label="i18nt('流程模板编码')" width="150">
661
- <template slot-scope="{ row }">
662
- <el-input v-model="row.modelKey" clearable></el-input>
663
- </template>
664
- </el-table-column> -->
665
- <el-table-column :label="i18nt('流程模板序号')" width="150">
666
- <template slot-scope="{ row }">
667
- <base-input-number v-model="row.modelOrders" clearable></base-input-number>
668
- </template>
669
- </el-table-column>
670
- <el-table-column :label="i18nt('节点步骤(多个值用“,”隔开)')" width="250">
671
- <template slot-scope="{ row }">
672
- <el-input v-model="row.taskSteps" clearable></el-input>
673
- </template>
674
- </el-table-column>
675
- <!-- <el-table-column :label="i18nt('设置')" width="150">
676
- <template slot-scope="{row}">
677
- <el-select v-model="row.type" clearable>
678
- <el-option :value="1" label="可编辑"></el-option>
679
- <el-option :value="2" label="仅显示"></el-option>
680
- <el-option :value="3" label="隐藏"></el-option>
681
- </el-select>
682
- </template>
683
- </el-table-column>-->
684
- <el-table-column
685
- :label="i18nt('designer.setting.actionColumn')"
686
- width="100"
687
- align="center"
688
- >
689
- <template #header>
690
- <span>{{ i18nt("designer.setting.actionColumn") }}</span>
691
- <el-button
692
- :title="i18nt('designer.setting.addTableColumn')"
693
- size="mini"
694
- type=""
695
- circle=""
696
- icon="el-icon-plus"
697
- @click="addItem"
698
- ></el-button>
699
- </template>
700
- <template slot-scope="scope">
701
- <el-button
702
- :title="i18nt('designer.setting.deleteTableColumn')"
703
- size="mini"
704
- type=""
705
- circle=""
706
- icon="el-icon-minus"
707
- @click="wfConfigData.splice(scope.$index, 1)"
708
- ></el-button>
709
- </template>
710
- </el-table-column>
711
- </el-table>
712
- </div>
713
- <div class="dialog-footer" slot="footer">
714
- <el-button @click="dialogVisible = false" class="button-sty" icon="el-icon-close">
715
- {{ i18nt("designer.hint.cancel") }}
716
- </el-button>
717
- <el-button
718
- type="primary"
719
- @click="confirmWfConfigDataDialog"
720
- class="button-sty"
721
- icon="el-icon-check"
722
- >
723
- {{ i18nt("designer.hint.confirm") }}
724
- </el-button>
725
- </div>
726
- </el-dialog>
727
-
728
- <el-dialog
729
- v-if="dialogVisible2"
730
- custom-class="dialog-style list-dialog"
731
- :title="i18nt('流程通过时自动保存表单数据的节点配置')"
732
- :visible.sync="dialogVisible2"
733
- :show-close="!0"
734
- :append-to-body="true"
735
- :modal="false"
736
- :close-on-click-modal="!1"
737
- :close-on-press-escape="!1"
738
- :destroy-on-close="!0"
739
- width="1220px"
740
- top="5vh"
741
- v-dialog-drag
742
- :fullscreen="true"
743
- >
744
- <div class="cont" style="padding-bottom: 8px">
745
- <el-table
746
- ref="singleTable"
747
- width="100%"
748
- :data="wfAgreeConfigData"
749
- height="100%"
750
- border=""
751
- row-key="columnId"
752
- stripe=""
753
- style="margin-bottom: 0px"
754
- >
755
- <el-table-column type="index" width="35" fixed="left"></el-table-column>
756
- <!-- <el-table-column :label="i18nt('服务')" width="150">
757
- <template slot-scope="{ row }">
758
- <el-select v-model="row.serveType" @change="changeServeType(row)">
759
- <el-option :value="1" label="正式"></el-option>
760
- <el-option :value="2" label="UAT"></el-option>
761
- <el-option :value="3" label="测试"></el-option>
762
- <el-option :value="4" label="自定义"></el-option>
763
- </el-select>
764
- </template>
765
- </el-table-column>
766
- <el-table-column :label="i18nt('自定义服务')" width="150">
767
- <template slot-scope="{ row }">
768
- <el-input
769
- v-model="row.serveName"
770
- clearable
771
- :disabled="row.serveType !== 4"
772
- ></el-input>
773
- </template>
774
- </el-table-column>
775
- <el-table-column :label="i18nt('组织编码')" width="250">
776
- <template slot-scope="{ row, $index }">
777
- <el-input v-model="row.companyCodes" clearable></el-input>
778
- </template>
779
- </el-table-column> -->
780
- <el-table-column :label="i18nt('组织编码')" width="250">
781
- <template slot-scope="{ row, $index }">
782
- <el-input
783
- class="search-input"
784
- max="200"
785
- v-model="row.companyCodes"
786
- @clear="clearBdCompanyEnv2(row)"
787
- v-el-readonly
788
- clearable
789
- >
790
- <i
791
- slot="suffix"
792
- class="el-input__icon el-icon-search"
793
- @click="openBdCompanyEnvDialog2($index)"
794
- ></i>
795
- </el-input>
796
- </template>
797
- </el-table-column>
798
- <el-table-column :label="i18nt('服务名称')" width="150">
799
- <template slot-scope="{ row }">
800
- {{ row.serveName }}
801
- </template>
802
- </el-table-column>
803
- <!-- <el-table-column :label="i18nt('流程模板编码')" width="150">
804
- <template slot-scope="{ row }">
805
- <el-input v-model="row.modelKey" clearable></el-input>
806
- </template>
807
- </el-table-column> -->
808
- <el-table-column :label="i18nt('流程模板序号')" width="150">
809
- <template slot-scope="{ row }">
810
- <base-input-number v-model="row.modelOrders" clearable></base-input-number>
811
- </template>
812
- </el-table-column>
813
- <el-table-column :label="i18nt('节点步骤(多个值用“,”隔开)')" width="250">
814
- <template slot-scope="{ row }">
815
- <el-input v-model="row.taskSteps" clearable></el-input>
816
- </template>
817
- </el-table-column>
818
- <!-- <el-table-column :label="i18nt('设置')" width="150">
819
- <template slot-scope="{row}">
820
- <el-select v-model="row.type" clearable>
821
- <el-option :value="1" label="可编辑"></el-option>
822
- <el-option :value="2" label="仅显示"></el-option>
823
- <el-option :value="3" label="隐藏"></el-option>
824
- </el-select>
825
- </template>
826
- </el-table-column>-->
827
- <el-table-column
828
- :label="i18nt('designer.setting.actionColumn')"
829
- width="100"
830
- align="center"
831
- >
832
- <template #header>
833
- <span>{{ i18nt("designer.setting.actionColumn") }}</span>
834
- <el-button
835
- :title="i18nt('designer.setting.addTableColumn')"
836
- size="mini"
837
- type=""
838
- circle=""
839
- icon="el-icon-plus"
840
- @click="addItem2"
841
- ></el-button>
842
- </template>
843
- <template slot-scope="scope">
844
- <el-button
845
- :title="i18nt('designer.setting.deleteTableColumn')"
846
- size="mini"
847
- type=""
848
- circle=""
849
- icon="el-icon-minus"
850
- @click="wfAgreeConfigData.splice(scope.$index, 1)"
851
- ></el-button>
852
- </template>
853
- </el-table-column>
854
- </el-table>
855
- </div>
856
- <div class="dialog-footer" slot="footer">
857
- <el-button
858
- @click="dialogVisible2 = false"
859
- class="button-sty"
860
- icon="el-icon-close"
861
- >
862
- {{ i18nt("designer.hint.cancel") }}
863
- </el-button>
864
- <el-button
865
- type="primary"
866
- @click="confirmWfConfigDataDialog2"
867
- class="button-sty"
868
- icon="el-icon-check"
869
- >
870
- {{ i18nt("designer.hint.confirm") }}
871
- </el-button>
872
- </div>
873
- </el-dialog>
874
-
875
- <formTemplateDialog
876
- v-if="showFormTemplateDialog"
877
- :visiable.sync="showFormTemplateDialog"
878
- @confirm="confirmFormTemplate"
879
- multi="false"
880
- />
881
- <wfObjConfigDialog
882
- v-if="showWfObjConfigDialog"
883
- :visiable.sync="showWfObjConfigDialog"
884
- @confirm="confirmWfObjConfigDialog"
885
- :formTemplate="designer.vueInstance.reportTemplate"
886
- />
887
-
888
- <bdCompanyEnvDialog
889
- v-if="showBdCompanyEnvDialog1"
890
- :visiable.sync="showBdCompanyEnvDialog1"
891
- @confirm="confirmBdCompanyEnvDialog1"
892
- :multi="false"
893
- />
894
- <bdCompanyEnvDialog
895
- v-if="showBdCompanyEnvDialog2"
896
- :visiable.sync="showBdCompanyEnvDialog2"
897
- @confirm="confirmBdCompanyEnvDialog2"
898
- :multi="false"
899
- />
900
- </div>
901
- </template>
902
-
903
- <script>
904
- import i18n from "../../../../components/xform/utils/i18n";
905
- import {
906
- deepClone,
907
- insertCustomCssToHead,
908
- insertGlobalFunctionsToHtml,
909
- } from "../../../../components/xform/utils/util";
910
- import formTemplateDialog from "../../../../views/bd/setting/form_template/dialog.vue";
911
- import wfObjConfigDialog from "./wfObjConfigDialog.vue";
912
- import bdCompanyEnvDialog from "@base/views/bd/setting/bd_company_env/dialog";
913
- import Draggable from "vuedraggable";
914
- import formDynamicFieldSetting from "./form-dynamicField-setting.vue";
915
-
916
- export default {
917
- name: "form-setting",
918
- mixins: [i18n],
919
- components: {
920
- formTemplateDialog,
921
- wfObjConfigDialog,
922
- bdCompanyEnvDialog,
923
- Draggable,
924
- formDynamicFieldSetting,
925
- },
926
- props: {
927
- designer: Object,
928
- formConfig: Object,
929
- },
930
- inject: ["getDesignerConfig"],
931
- data() {
932
- return {
933
- designerConfig: this.getDesignerConfig(),
934
-
935
- formActiveCollapseNames: ["1", "2", "7"],
936
-
937
- formSizes: [
938
- { label: "default", value: "" },
939
- { label: "large", value: "large" },
940
- { label: "medium", value: "medium" },
941
- { label: "small", value: "small" },
942
- { label: "mini", value: "mini" },
943
- ],
944
-
945
- showEditFormCssDialogFlag: false,
946
- formCssCode: "",
947
- cssClassList: [],
948
-
949
- showEditFunctionsDialogFlag: false,
950
- functionsCode: "",
951
-
952
- showFormEventDialogFlag: false,
953
- formEventHandlerCode: "",
954
- curEventName: "",
955
- formEventDialogTitle: "",
956
- eventDialogTitleMap: {
957
- globalConfig: "全局参数配置",
958
- wfStartConfirmText: "流程启动确认提示语配置",
959
- wfConfig: "流程自定义配置",
960
- onBeforeCreated: "表单创建前事件配置",
961
- onFormCreated: "表单创建事件配置",
962
- onFormBeforeMounted: "表单挂载前事件配置",
963
- onFormMounted: "表单挂载事件配置",
964
- onFormDataChange: "表单数据变更事件配置",
965
- onFormValidate: "表单校验事件配置",
966
- },
967
-
968
- eventParamsMap: {
969
- onBeforeCreated: "onBeforeCreated(dataId,formCode,done) {",
970
- onFormCreated: "onFormCreated(dataId,formCode) {",
971
- onFormBeforeMounted: "onFormBeforeMounted(dataId,formCode, done) {",
972
- onFormMounted: "onFormMounted(dataId,formCode) {",
973
- onFormDataChange:
974
- "onFormDataChange(fieldName, newValue, oldValue, formModel, subFormName, subFormRowIndex) {",
975
- wfStartConfirmText:
976
- "wfStartConfirmText(dataId, formCode, formData) {",
977
- wfConfig: "wfConfig(dataId, formCode, formData) {",
978
- globalConfig: "globalConfig(dataId, formCode) {",
979
- //'onFormValidate': 'onFormValidate() {',
980
- },
981
- showVabsearchConfigDialog: false,
982
- vabsearchConfigType: 1,
983
- showFormTemplateDialog: false,
984
-
985
- formScriptParam: null,
986
- showFormScriptParamDialog: false,
987
- formScriptSuccess: null,
988
- showFormScriptSuccessDialog: false,
989
- wfObjConfigs: [],
990
- showWfObjConfigDialog: false,
991
-
992
- dialogVisible: false,
993
- wfConfigData: [],
994
-
995
- dialogVisible2: false,
996
- wfAgreeConfigData: [],
997
-
998
- showBdCompanyEnvDialog1: false,
999
- showBdCompanyEnvDialog2: false,
1000
-
1001
- globalConfigParams: ["dataId", "formCode"],
1002
-
1003
- tip1: `流程主题表达式设置说明。
1004
-
1005
- 1、可使用参数:
1006
- wf:流程对象
1007
- name:流程名称
1008
- objTypeCode:单据类型编码
1009
- objId:对象id
1010
- procInstId:act流程实例id
1011
- procDefId:act流程定义id
1012
- modelId:act流程模板id
1013
- starterId:启动人ID
1014
- starterName:启动人姓名
1015
- uuid:流程实例唯一标识
1016
- identityInfo:身份信息对象
1017
- id:用户ID
1018
- loginAccount:用户登录名
1019
- nickName:用户姓名
1020
- companyCode:企业编码
1021
- parentCompanyCode:集团企业编码
1022
- nowDate:当前时间
1023
- nowDateStr:当前时间字符串(yyyy-MM-dd HH:mm:ss)
1024
- nowDayStr:当前天字符串(yyyy-MM-dd)
1025
- tableName:数据库表名,取表单设计中维护的表名作为参数名称
1026
- tableField1:数据库表字段名1
1027
- tableField2:数据库表字段名2
1028
- tableField3:数据库表字段名3
1029
- ......
1030
-
1031
- 2、可使用函数:
1032
- func.orgName(orgId):根据机构id获取机构名称
1033
- func.convertDate(date, format):时间转换,如当前时间转为当前天字符串,则$\{func.convertDate(nowDate, 'yyyy-MM-dd')\},当前时间转为当前月字符串,则$\{func.convertDate(nowDate, 'yyyy-MM')\}
1034
-
1035
- 3、配置示例
1036
- 比如表名为:pm_product_project,配置如下:
1037
- $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_project.product_name\}$\{wf.name\}$\{pm_product_project.sn\}$\{func.orgName(pm_product_project.f_sale_org_id)\}$\{nowDayStr\}`,
1038
- };
1039
- },
1040
- created() {
1041
- //导入表单JSON后需要重新加载自定义CSS样式!!!
1042
- this.designer.handleEvent("form-json-imported", () => {
1043
- this.formCssCode = this.formConfig.cssCode || "";
1044
- insertCustomCssToHead(this.formCssCcssCodeode);
1045
- this.extractCssClass();
1046
- this.designer.emitEvent("form-css-updated", deepClone(this.cssClassList));
1047
- });
1048
- },
1049
- mounted() {
1050
- /* SettingPanel和FormWidget为兄弟组件, 在FormWidget加载formConfig时,
1051
- 此处SettingPanel可能无法获取到formConfig.cssCode, 故加个延时函数! */
1052
- setTimeout(() => {
1053
- this.formCssCode = this.formConfig.cssCode || "";
1054
- insertCustomCssToHead(this.formCssCode);
1055
- this.extractCssClass();
1056
- this.designer.emitEvent("form-css-updated", deepClone(this.cssClassList));
1057
- }, 1200);
1058
- this.getListByObjTypeCode();
1059
- },
1060
- methods: {
1061
- showEventCollapse() {
1062
- if (this.designerConfig["eventCollapse"] === undefined) {
1063
- return true;
1064
- }
1065
-
1066
- return !!this.designerConfig["eventCollapse"];
1067
- },
1068
-
1069
- editFormCss() {
1070
- this.formCssCode = this.designer.formConfig.cssCode;
1071
- this.showEditFormCssDialogFlag = true;
1072
- },
1073
-
1074
- extractCssClass() {
1075
- let regExp = /\..*{/g;
1076
- let result = this.formCssCode ? this.formCssCode.match(regExp) : [];
1077
- let cssNameArray = [];
1078
-
1079
- if (!!result && result.length > 0) {
1080
- result.forEach((rItem) => {
1081
- let classArray = rItem.split(","); //切分逗号分割的多个class
1082
- if (classArray.length > 0) {
1083
- classArray.forEach((cItem) => {
1084
- let caItem = cItem.trim();
1085
- if (caItem.indexOf(".", 1) !== -1) {
1086
- //查找第二个.位置
1087
- let newClass = caItem.substring(
1088
- caItem.indexOf(".") + 1,
1089
- caItem.indexOf(".", 1)
1090
- ); //仅截取第一、二个.号之间的class
1091
- if (!!newClass) {
1092
- cssNameArray.push(newClass.trim());
1093
- }
1094
- } else if (caItem.indexOf(" ") !== -1) {
1095
- //查找第一个空格位置
1096
- let newClass = caItem.substring(
1097
- caItem.indexOf(".") + 1,
1098
- caItem.indexOf(" ")
1099
- ); //仅截取第一、二个.号之间的class
1100
- if (!!newClass) {
1101
- cssNameArray.push(newClass.trim());
1102
- }
1103
- } else {
1104
- if (caItem.indexOf("{") !== -1) {
1105
- //查找第一个{位置
1106
- let newClass = caItem.substring(
1107
- caItem.indexOf(".") + 1,
1108
- caItem.indexOf("{")
1109
- );
1110
- cssNameArray.push(newClass.trim());
1111
- } else {
1112
- let newClass = caItem.substring(caItem.indexOf(".") + 1);
1113
- cssNameArray.push(newClass.trim());
1114
- }
1115
- }
1116
- });
1117
- }
1118
- });
1119
- }
1120
-
1121
- //this.cssClassList.length = 0
1122
- this.cssClassList.splice(0, this.cssClassList.length); //清除数组必须用splice,length=0不会响应式更新!!
1123
- this.cssClassList = Array.from(new Set(cssNameArray)); //数组去重
1124
- },
1125
-
1126
- saveFormCss() {
1127
- this.extractCssClass();
1128
- this.designer.formConfig.cssCode = this.formCssCode;
1129
- insertCustomCssToHead(this.formCssCode);
1130
- this.showEditFormCssDialogFlag = false;
1131
-
1132
- this.designer.emitEvent("form-css-updated", deepClone(this.cssClassList));
1133
- },
1134
-
1135
- editGlobalFunctions() {
1136
- this.functionsCode = this.designer.formConfig.functions;
1137
- this.showEditFunctionsDialogFlag = true;
1138
- },
1139
- editFormScriptParam() {
1140
- this.formScriptParam = this.designer.formConfig.formScriptParam;
1141
- this.showFormScriptParamDialog = true;
1142
- },
1143
-
1144
- saveGlobalFunctions() {
1145
- const codeHints = this.$refs.gfEditor.getEditorAnnotations();
1146
- let syntaxErrorFlag = false;
1147
- if (!!codeHints && codeHints.length > 0) {
1148
- codeHints.forEach((chItem) => {
1149
- if (chItem.type === "error") {
1150
- syntaxErrorFlag = true;
1151
- }
1152
- });
1153
-
1154
- if (syntaxErrorFlag) {
1155
- this.$message.error(this.i18nt("designer.setting.syntaxCheckWarning"));
1156
- return;
1157
- }
1158
- }
1159
-
1160
- this.designer.formConfig.functions = this.functionsCode;
1161
- insertGlobalFunctionsToHtml(this.functionsCode);
1162
- this.showEditFunctionsDialogFlag = false;
1163
- },
1164
-
1165
- editFormEventHandler(eventName, dialogTitle) {
1166
- this.curEventName = eventName;
1167
- this.formEventHandlerCode = this.formConfig[eventName];
1168
- let customTitle =
1169
- typeof dialogTitle === "string" && dialogTitle ? dialogTitle : null;
1170
- let eventTitle =
1171
- customTitle ||
1172
- this.eventDialogTitleMap[eventName] ||
1173
- (eventName ? eventName + " 配置" : "配置");
1174
- this.formEventDialogTitle = this.i18nt(eventTitle);
1175
- this.showFormEventDialogFlag = true;
1176
- },
1177
-
1178
- saveFormEventHandler() {
1179
- const codeHints = this.$refs.ecEditor.getEditorAnnotations();
1180
- let syntaxErrorFlag = false;
1181
- if (!!codeHints && codeHints.length > 0) {
1182
- codeHints.forEach((chItem) => {
1183
- if (chItem.type === "error") {
1184
- syntaxErrorFlag = true;
1185
- }
1186
- });
1187
-
1188
- if (syntaxErrorFlag) {
1189
- this.$message.error(this.i18nt("designer.setting.syntaxCheckWarning"));
1190
- return;
1191
- }
1192
- }
1193
-
1194
- this.formConfig[this.curEventName] = this.formEventHandlerCode;
1195
- this.showFormEventDialogFlag = false;
1196
- },
1197
- openFormTemplate(flag) {
1198
- this.formTemplateFlag = flag;
1199
- this.showFormTemplateDialog = true;
1200
- },
1201
- confirmFormTemplate(rows) {
1202
- if (rows.length) {
1203
- let row = rows[0];
1204
- if (this.formTemplateFlag == 1) {
1205
- //新增
1206
- this.$set(this.formConfig, "addFormCode", row.formCode);
1207
- this.$set(this.formConfig, "addFormName", row.formName);
1208
- } else {
1209
- //查看
1210
- this.$set(this.formConfig, "editFormCode", row.formCode);
1211
- this.$set(this.formConfig, "editFormName", row.formName);
1212
- }
1213
- }
1214
- },
1215
- getEventButtonName(funStr) {
1216
- let name = this.i18nt("designer.setting.addEventHandler");
1217
- if (funStr) name = "已维护";
1218
- return name;
1219
- },
1220
- saveFormScriptParam() {
1221
- const codeHints = this.$refs.gfEditor.getEditorAnnotations();
1222
- let syntaxErrorFlag = false;
1223
- if (!!codeHints && codeHints.length > 0) {
1224
- codeHints.forEach((chItem) => {
1225
- if (chItem.type === "error") {
1226
- syntaxErrorFlag = true;
1227
- }
1228
- });
1229
-
1230
- if (syntaxErrorFlag) {
1231
- this.$message.error(this.i18nt("designer.setting.syntaxCheckWarning"));
1232
- return;
1233
- }
1234
- }
1235
-
1236
- this.designer.formConfig.formScriptParam = this.formScriptParam;
1237
- this.showFormScriptParamDialog = false;
1238
- },
1239
- editFormScriptSuccess() {
1240
- this.formScriptSuccess = this.designer.formConfig.formScriptSuccess;
1241
- this.showFormScriptSuccessDialog = true;
1242
- },
1243
- saveFormScriptSuccess() {
1244
- const codeHints = this.$refs.gfEditor.getEditorAnnotations();
1245
- let syntaxErrorFlag = false;
1246
- if (!!codeHints && codeHints.length > 0) {
1247
- codeHints.forEach((chItem) => {
1248
- if (chItem.type === "error") {
1249
- syntaxErrorFlag = true;
1250
- }
1251
- });
1252
-
1253
- if (syntaxErrorFlag) {
1254
- this.$message.error(this.i18nt("designer.setting.syntaxCheckWarning"));
1255
- return;
1256
- }
1257
- }
1258
-
1259
- this.designer.formConfig.formScriptSuccess = this.formScriptSuccess;
1260
- this.showFormScriptSuccessDialog = false;
1261
- },
1262
- openWfObjConfigDialog() {
1263
- this.showWfObjConfigDialog = true;
1264
- },
1265
- confirmWfObjConfigDialog(rows) {
1266
- this.wfObjConfigs = rows || [];
1267
- },
1268
- getListByObjTypeCode() {
1269
- let reportTemplate = this.designer.vueInstance.reportTemplate;
1270
- this.$http({
1271
- url: `/${reportTemplate.serviceName}/wf_obj_config/listByObjTypeCode`,
1272
- method: `post`,
1273
- data: {
1274
- stringOne: reportTemplate.objTypeCode,
1275
- },
1276
- isLoading: true,
1277
- success: (res) => {
1278
- this.wfObjConfigs = res.objx || [];
1279
- },
1280
- });
1281
- },
1282
- changeWfEnabled(val) {
1283
- this.designer.vueInstance.reportTemplate.objTypeName = null;
1284
- this.designer.vueInstance.reportTemplate.fromWfFormCode = null;
1285
- },
1286
- openWfConfigDataDialog() {
1287
- let wfConfigData = this.formConfig.wfConfigData || [];
1288
- this.dialogVisible = true;
1289
- this.wfConfigData = this.$baseLodash.cloneDeep(wfConfigData);
1290
- },
1291
- addItem() {
1292
- let newItem = {
1293
- type: null,
1294
- serveType: null,
1295
- serveName: null,
1296
- modelKey: null,
1297
- modelOrders: undefined,
1298
- taskSteps: null,
1299
- companyCodes: null,
1300
- };
1301
- this.wfConfigData.push(newItem);
1302
- },
1303
- confirmWfConfigDataDialog() {
1304
- let tableData = this.wfConfigData;
1305
- let map = {};
1306
- for (let i = 0; i < tableData.length; i++) {
1307
- let item = tableData[i];
1308
- if (!item.serveName) {
1309
- this.$message({
1310
- type: "error",
1311
- message: "服务名称不能为空",
1312
- });
1313
- return;
1314
- }
1315
- if (!item.companyCodes) {
1316
- this.$message({
1317
- type: "error",
1318
- message: "组织编码不能为空",
1319
- });
1320
- return;
1321
- }
1322
- let modelOrders = item.modelOrders ?? "";
1323
-
1324
- let serveName = item.serveName;
1325
- let companyCodes = item.companyCodes;
1326
- let key = serveName + "_" + companyCodes + "_" + modelOrders;
1327
- if (!map[key]) {
1328
- map[key] = true;
1329
- } else {
1330
- this.$message({
1331
- type: "error",
1332
- message: "[服务+组织+流程模板序号]不能重复",
1333
- });
1334
- return;
1335
- }
1336
- }
1337
-
1338
- this.dialogVisible = !1;
1339
- this.formConfig.wfConfigData = this.wfConfigData;
1340
- },
1341
-
1342
- openWfConfigDataDialog2() {
1343
- let wfAgreeConfigData = this.formConfig.wfAgreeConfigData || [];
1344
- this.dialogVisible2 = true;
1345
- this.wfAgreeConfigData = this.$baseLodash.cloneDeep(wfAgreeConfigData);
1346
- },
1347
- addItem2() {
1348
- let newItem = {
1349
- type: null,
1350
- serveType: null,
1351
- serveName: null,
1352
- modelKey: null,
1353
- modelOrders: undefined,
1354
- taskSteps: null,
1355
- companyCodes: null,
1356
- };
1357
- this.wfAgreeConfigData.push(newItem);
1358
- },
1359
- confirmWfConfigDataDialog2() {
1360
- let tableData = this.wfAgreeConfigData;
1361
-
1362
- let map = {};
1363
- for (let i = 0; i < tableData.length; i++) {
1364
- let item = tableData[i];
1365
- if (!item.serveName) {
1366
- this.$message({
1367
- type: "error",
1368
- message: "服务名称不能为空",
1369
- });
1370
- return;
1371
- }
1372
- if (!item.companyCodes) {
1373
- this.$message({
1374
- type: "error",
1375
- message: "组织编码不能为空",
1376
- });
1377
- return;
1378
- }
1379
- let modelOrders = item.modelOrders ?? "";
1380
-
1381
- let serveName = item.serveName;
1382
- let companyCodes = item.companyCodes;
1383
- let key = serveName + "_" + companyCodes + "_" + modelOrders;
1384
- if (!map[key]) {
1385
- map[key] = true;
1386
- } else {
1387
- this.$message({
1388
- type: "error",
1389
- message: "[服务+组织+流程模板序号]不能重复",
1390
- });
1391
- return;
1392
- }
1393
- }
1394
- this.dialogVisible2 = !1;
1395
- this.formConfig.wfAgreeConfigData = this.wfAgreeConfigData;
1396
- },
1397
-
1398
- clearBdCompanyEnv1(row) {
1399
- row.serveName = null;
1400
- row.companyCodes = null;
1401
- },
1402
- openBdCompanyEnvDialog1(rowIndex) {
1403
- this.operateIndex = rowIndex;
1404
- this.showBdCompanyEnvDialog1 = true;
1405
- },
1406
- confirmBdCompanyEnvDialog1(rows) {
1407
- if (rows.length) {
1408
- let row = rows[0];
1409
- let item = this.wfConfigData[this.operateIndex];
1410
- item.serveName = row.bdService;
1411
- item.companyCodes = row.bdCompanyCode;
1412
- }
1413
- },
1414
-
1415
- clearBdCompanyEnv2(row) {
1416
- row.serveName = null;
1417
- row.companyCodes = null;
1418
- },
1419
- openBdCompanyEnvDialog2(rowIndex) {
1420
- this.operateIndex = rowIndex;
1421
- this.showBdCompanyEnvDialog2 = true;
1422
- },
1423
- confirmBdCompanyEnvDialog2(rows) {
1424
- if (rows.length) {
1425
- let row = rows[0];
1426
- let item = this.wfAgreeConfigData[this.operateIndex];
1427
- item.serveName = row.bdService;
1428
- item.companyCodes = row.bdCompanyCode;
1429
- }
1430
- },
1431
- addOtherTab() {
1432
- if (!this.formConfig.otherTabList) {
1433
- this.$set(this.formConfig, "otherTabList", []);
484
+ class="form-item-label-red"
485
+ >
486
+ <!-- <el-form-item label="onBeforeCreated" label-width="150px">
487
+ <a href="javascript:void(0);" class="a-link link-oneLind"
488
+ @click="editFormEventHandler('onBeforeCreated', ['dataId','done'])">
489
+ <span>{{ formConfig.onBeforeCreated }}</span>
490
+ <i class="el-icon-edit"></i>
491
+ </a>
492
+ </el-form-item>-->
493
+ <el-form-item label="onFormCreated" label-width="150px">
494
+ <a
495
+ href="javascript:void(0);"
496
+ class="a-link link-oneLind"
497
+ @click="editFormEventHandler('onFormCreated')"
498
+ >
499
+ <span>{{ formConfig.onFormCreated }}</span>
500
+ <i class="el-icon-edit"></i>
501
+ </a>
502
+ </el-form-item>
503
+ <el-form-item label="onFormBeforeMounted" label-width="150px">
504
+ <a
505
+ href="javascript:void(0);"
506
+ class="a-link link-oneLind"
507
+ @click="editFormEventHandler('onFormBeforeMounted')"
508
+ >
509
+ <span>{{ formConfig.onFormBeforeMounted }}</span>
510
+ <i class="el-icon-edit"></i>
511
+ </a>
512
+ </el-form-item>
513
+ <el-form-item label="onFormMounted" label-width="150px">
514
+ <a
515
+ href="javascript:void(0);"
516
+ class="a-link link-oneLind"
517
+ @click="editFormEventHandler('onFormMounted')"
518
+ >
519
+ <span>{{ formConfig.onFormMounted }}</span>
520
+ <i class="el-icon-edit"></i>
521
+ </a>
522
+ </el-form-item>
523
+ <!-- -->
524
+ <el-form-item label="onFormDataChange" label-width="150px">
525
+ <a
526
+ href="javascript:void(0);"
527
+ class="a-link link-oneLind"
528
+ @click="editFormEventHandler('onFormDataChange')"
529
+ >
530
+ <span>{{ formConfig.onFormDataChange }}</span>
531
+ <i class="el-icon-edit"></i>
532
+ </a>
533
+ </el-form-item>
534
+ <!-- -->
535
+ <!--
536
+ <el-form-item label="onFormValidate">
537
+ <el-button type="info" icon="el-icon-edit" plain round @click="editFormEventHandler('onFormValidate')">
538
+ {{i18nt('designer.setting.addEventHandler')}}</el-button>
539
+ </el-form-item>
540
+ -->
541
+ </el-collapse-item>
542
+ </el-collapse>
543
+ </el-form>
544
+
545
+ <el-dialog
546
+ :title="formEventDialogTitle"
547
+ :visible.sync="showFormEventDialogFlag"
548
+ v-if="showFormEventDialogFlag"
549
+ :show-close="true"
550
+ custom-class="dialog-style list-dialog"
551
+ v-dialog-drag
552
+ :close-on-click-modal="false"
553
+ :close-on-press-escape="false"
554
+ :destroy-on-close="true"
555
+ :append-to-body="true"
556
+ :modal-append-to-body="true"
557
+ top="5vh"
558
+ >
559
+ <div class="cont">
560
+ <el-alert
561
+ type="info"
562
+ :closable="false"
563
+ :title="'form.' + eventParamsMap[curEventName]"
564
+ ></el-alert>
565
+ <code-editor
566
+ :mode="'javascript'"
567
+ :readonly="false"
568
+ v-model="formEventHandlerCode"
569
+ ref="ecEditor"
570
+ ></code-editor>
571
+ <el-alert type="info" :closable="false" title="}"></el-alert>
572
+ </div>
573
+ <div slot="footer" class="dialog-footer">
574
+ <el-button
575
+ @click="showFormEventDialogFlag = false"
576
+ class="button-sty"
577
+ icon="el-icon-close"
578
+ >
579
+ {{ i18nt("designer.hint.cancel") }}
580
+ </el-button>
581
+ <el-button
582
+ type="primary"
583
+ @click="saveFormEventHandler"
584
+ class="button-sty"
585
+ icon="el-icon-check"
586
+ >
587
+ {{ i18nt("designer.hint.confirm") }}
588
+ </el-button>
589
+ </div>
590
+ </el-dialog>
591
+
592
+ <el-dialog
593
+ :title="i18nt('designer.setting.formCss')"
594
+ :visible.sync="showEditFormCssDialogFlag"
595
+ v-if="showEditFormCssDialogFlag"
596
+ :show-close="true"
597
+ custom-class="dialog-style list-dialog"
598
+ v-dialog-drag
599
+ :close-on-click-modal="false"
600
+ :close-on-press-escape="false"
601
+ :destroy-on-close="true"
602
+ :append-to-body="true"
603
+ :modal-append-to-body="true"
604
+ >
605
+ <div class="cont">
606
+ <code-editor
607
+ :mode="'css'"
608
+ :readonly="false"
609
+ v-model="formCssCode"
610
+ ></code-editor>
611
+ </div>
612
+ <div slot="footer" class="dialog-footer">
613
+ <el-button
614
+ @click="showEditFormCssDialogFlag = false"
615
+ class="button-sty"
616
+ icon="el-icon-close"
617
+ >
618
+ {{ i18nt("designer.hint.cancel") }}
619
+ </el-button>
620
+ <el-button
621
+ type="primary"
622
+ @click="saveFormCss"
623
+ class="button-sty"
624
+ icon="el-icon-check"
625
+ >
626
+ {{ i18nt("designer.hint.confirm") }}
627
+ </el-button>
628
+ </div>
629
+ </el-dialog>
630
+
631
+ <el-dialog
632
+ :title="i18nt('designer.setting.globalFunctions')"
633
+ :visible.sync="showEditFunctionsDialogFlag"
634
+ v-if="showEditFunctionsDialogFlag"
635
+ :show-close="true"
636
+ custom-class="dialog-style list-dialog"
637
+ v-dialog-drag
638
+ :close-on-click-modal="false"
639
+ :close-on-press-escape="false"
640
+ :destroy-on-close="true"
641
+ :append-to-body="true"
642
+ :modal-append-to-body="true"
643
+ >
644
+ <div class="cont">
645
+ <code-editor
646
+ :mode="'javascript'"
647
+ :readonly="false"
648
+ v-model="functionsCode"
649
+ ref="gfEditor"
650
+ ></code-editor>
651
+ </div>
652
+ <div slot="footer" class="dialog-footer">
653
+ <el-button
654
+ @click="showEditFunctionsDialogFlag = false"
655
+ class="button-sty"
656
+ icon="el-icon-close"
657
+ >
658
+ {{ i18nt("designer.hint.cancel") }}
659
+ </el-button>
660
+ <el-button
661
+ type="primary"
662
+ @click="saveGlobalFunctions"
663
+ class="button-sty"
664
+ icon="el-icon-check"
665
+ >
666
+ {{ i18nt("designer.hint.confirm") }}
667
+ </el-button>
668
+ </div>
669
+ </el-dialog>
670
+
671
+ <el-dialog
672
+ :title="i18nt('详情数据脚本参数')"
673
+ :visible.sync="showFormScriptParamDialog"
674
+ v-if="showFormScriptParamDialog"
675
+ :show-close="true"
676
+ custom-class="dialog-style list-dialog"
677
+ v-dialog-drag
678
+ :close-on-click-modal="false"
679
+ :close-on-press-escape="false"
680
+ :destroy-on-close="true"
681
+ :append-to-body="true"
682
+ :modal-append-to-body="true"
683
+ >
684
+ <div class="cont">
685
+ <code-editor
686
+ :mode="'javascript'"
687
+ :readonly="false"
688
+ v-model="formScriptParam"
689
+ ref="gfEditor"
690
+ ></code-editor>
691
+ </div>
692
+ <div slot="footer" class="dialog-footer">
693
+ <el-button
694
+ @click="showFormScriptParamDialog = false"
695
+ class="button-sty"
696
+ icon="el-icon-close"
697
+ >
698
+ {{ i18nt("designer.hint.cancel") }}
699
+ </el-button>
700
+ <el-button
701
+ type="primary"
702
+ @click="saveFormScriptParam"
703
+ class="button-sty"
704
+ icon="el-icon-check"
705
+ >
706
+ {{ i18nt("designer.hint.confirm") }}
707
+ </el-button>
708
+ </div>
709
+ </el-dialog>
710
+ <el-dialog
711
+ :title="i18nt('详情数据脚本回调')"
712
+ :visible.sync="showFormScriptSuccessDialog"
713
+ v-if="showFormScriptSuccessDialog"
714
+ :show-close="true"
715
+ custom-class="dialog-style list-dialog"
716
+ v-dialog-drag
717
+ :close-on-click-modal="false"
718
+ :close-on-press-escape="false"
719
+ :destroy-on-close="true"
720
+ :append-to-body="true"
721
+ :modal-append-to-body="true"
722
+ >
723
+ <div class="cont">
724
+ <code-editor
725
+ :mode="'javascript'"
726
+ :readonly="false"
727
+ v-model="formScriptSuccess"
728
+ ref="gfEditor"
729
+ ></code-editor>
730
+ </div>
731
+ <div slot="footer" class="dialog-footer">
732
+ <el-button
733
+ @click="showFormScriptSuccessDialog = false"
734
+ class="button-sty"
735
+ icon="el-icon-close"
736
+ >
737
+ {{ i18nt("designer.hint.cancel") }}
738
+ </el-button>
739
+ <el-button
740
+ type="primary"
741
+ @click="saveFormScriptSuccess"
742
+ class="button-sty"
743
+ icon="el-icon-check"
744
+ >
745
+ {{ i18nt("designer.hint.confirm") }}
746
+ </el-button>
747
+ </div>
748
+ </el-dialog>
749
+ <el-dialog
750
+ v-if="dialogVisible"
751
+ custom-class="dialog-style list-dialog"
752
+ :title="i18nt('流程节点可编辑表单配置')"
753
+ :visible.sync="dialogVisible"
754
+ :show-close="!0"
755
+ :append-to-body="true"
756
+ :modal="false"
757
+ :close-on-click-modal="!1"
758
+ :close-on-press-escape="!1"
759
+ :destroy-on-close="!0"
760
+ width="1220px"
761
+ top="5vh"
762
+ v-dialog-drag
763
+ :fullscreen="true"
764
+ >
765
+ <div class="cont" style="padding-bottom: 8px">
766
+ <el-table
767
+ ref="singleTable"
768
+ width="100%"
769
+ :data="wfConfigData"
770
+ height="100%"
771
+ border=""
772
+ row-key="columnId"
773
+ stripe=""
774
+ style="margin-bottom: 0px"
775
+ >
776
+ <el-table-column
777
+ type="index"
778
+ width="35"
779
+ fixed="left"
780
+ ></el-table-column>
781
+ <!-- <el-table-column :label="i18nt('服务')" width="150">
782
+ <template slot-scope="{ row }">
783
+ <el-select v-model="row.serveType" @change="changeServeType(row)">
784
+ <el-option :value="1" label="正式"></el-option>
785
+ <el-option :value="2" label="UAT"></el-option>
786
+ <el-option :value="3" label="测试"></el-option>
787
+ <el-option :value="4" label="自定义"></el-option>
788
+ </el-select>
789
+ </template>
790
+ </el-table-column>
791
+ <el-table-column :label="i18nt('自定义服务')" width="150">
792
+ <template slot-scope="{ row }">
793
+ <el-input
794
+ v-model="row.serveName"
795
+ clearable
796
+ :disabled="row.serveType !== 4"
797
+ ></el-input>
798
+ </template>
799
+ </el-table-column>
800
+ <el-table-column :label="i18nt('组织编码')" width="250">
801
+ <template slot-scope="{ row, $index }">
802
+ <el-input v-model="row.companyCodes" clearable></el-input>
803
+ </template>
804
+ </el-table-column> -->
805
+ <el-table-column :label="i18nt('组织编码')" width="250">
806
+ <template slot-scope="{ row, $index }">
807
+ <el-input
808
+ class="search-input"
809
+ max="200"
810
+ v-model="row.companyCodes"
811
+ @clear="clearBdCompanyEnv1(row)"
812
+ v-el-readonly
813
+ clearable
814
+ >
815
+ <i
816
+ slot="suffix"
817
+ class="el-input__icon el-icon-search"
818
+ @click="openBdCompanyEnvDialog1($index)"
819
+ ></i>
820
+ </el-input>
821
+ </template>
822
+ </el-table-column>
823
+ <el-table-column :label="i18nt('服务名称')" width="150">
824
+ <template slot-scope="{ row }">
825
+ {{ row.serveName }}
826
+ </template>
827
+ </el-table-column>
828
+ <!-- <el-table-column :label="i18nt('流程模板编码')" width="150">
829
+ <template slot-scope="{ row }">
830
+ <el-input v-model="row.modelKey" clearable></el-input>
831
+ </template>
832
+ </el-table-column> -->
833
+ <el-table-column :label="i18nt('流程模板序号')" width="150">
834
+ <template slot-scope="{ row }">
835
+ <base-input-number
836
+ v-model="row.modelOrders"
837
+ clearable
838
+ ></base-input-number>
839
+ </template>
840
+ </el-table-column>
841
+ <el-table-column
842
+ :label="i18nt('节点步骤(多个值用“,”隔开)')"
843
+ width="250"
844
+ >
845
+ <template slot-scope="{ row }">
846
+ <el-input v-model="row.taskSteps" clearable></el-input>
847
+ </template>
848
+ </el-table-column>
849
+ <!-- <el-table-column :label="i18nt('设置')" width="150">
850
+ <template slot-scope="{row}">
851
+ <el-select v-model="row.type" clearable>
852
+ <el-option :value="1" label="可编辑"></el-option>
853
+ <el-option :value="2" label="仅显示"></el-option>
854
+ <el-option :value="3" label="隐藏"></el-option>
855
+ </el-select>
856
+ </template>
857
+ </el-table-column>-->
858
+ <el-table-column
859
+ :label="i18nt('designer.setting.actionColumn')"
860
+ width="100"
861
+ align="center"
862
+ >
863
+ <template #header>
864
+ <span>{{ i18nt("designer.setting.actionColumn") }}</span>
865
+ <el-button
866
+ :title="i18nt('designer.setting.addTableColumn')"
867
+ size="mini"
868
+ type=""
869
+ circle=""
870
+ icon="el-icon-plus"
871
+ @click="addItem"
872
+ ></el-button>
873
+ </template>
874
+ <template slot-scope="scope">
875
+ <el-button
876
+ :title="i18nt('designer.setting.deleteTableColumn')"
877
+ size="mini"
878
+ type=""
879
+ circle=""
880
+ icon="el-icon-minus"
881
+ @click="wfConfigData.splice(scope.$index, 1)"
882
+ ></el-button>
883
+ </template>
884
+ </el-table-column>
885
+ </el-table>
886
+ </div>
887
+ <div class="dialog-footer" slot="footer">
888
+ <el-button
889
+ @click="dialogVisible = false"
890
+ class="button-sty"
891
+ icon="el-icon-close"
892
+ >
893
+ {{ i18nt("designer.hint.cancel") }}
894
+ </el-button>
895
+ <el-button
896
+ type="primary"
897
+ @click="confirmWfConfigDataDialog"
898
+ class="button-sty"
899
+ icon="el-icon-check"
900
+ >
901
+ {{ i18nt("designer.hint.confirm") }}
902
+ </el-button>
903
+ </div>
904
+ </el-dialog>
905
+
906
+ <el-dialog
907
+ v-if="dialogVisible2"
908
+ custom-class="dialog-style list-dialog"
909
+ :title="i18nt('流程通过时自动保存表单数据的节点配置')"
910
+ :visible.sync="dialogVisible2"
911
+ :show-close="!0"
912
+ :append-to-body="true"
913
+ :modal="false"
914
+ :close-on-click-modal="!1"
915
+ :close-on-press-escape="!1"
916
+ :destroy-on-close="!0"
917
+ width="1220px"
918
+ top="5vh"
919
+ v-dialog-drag
920
+ :fullscreen="true"
921
+ >
922
+ <div class="cont" style="padding-bottom: 8px">
923
+ <el-table
924
+ ref="singleTable"
925
+ width="100%"
926
+ :data="wfAgreeConfigData"
927
+ height="100%"
928
+ border=""
929
+ row-key="columnId"
930
+ stripe=""
931
+ style="margin-bottom: 0px"
932
+ >
933
+ <el-table-column
934
+ type="index"
935
+ width="35"
936
+ fixed="left"
937
+ ></el-table-column>
938
+ <!-- <el-table-column :label="i18nt('服务')" width="150">
939
+ <template slot-scope="{ row }">
940
+ <el-select v-model="row.serveType" @change="changeServeType(row)">
941
+ <el-option :value="1" label="正式"></el-option>
942
+ <el-option :value="2" label="UAT"></el-option>
943
+ <el-option :value="3" label="测试"></el-option>
944
+ <el-option :value="4" label="自定义"></el-option>
945
+ </el-select>
946
+ </template>
947
+ </el-table-column>
948
+ <el-table-column :label="i18nt('自定义服务')" width="150">
949
+ <template slot-scope="{ row }">
950
+ <el-input
951
+ v-model="row.serveName"
952
+ clearable
953
+ :disabled="row.serveType !== 4"
954
+ ></el-input>
955
+ </template>
956
+ </el-table-column>
957
+ <el-table-column :label="i18nt('组织编码')" width="250">
958
+ <template slot-scope="{ row, $index }">
959
+ <el-input v-model="row.companyCodes" clearable></el-input>
960
+ </template>
961
+ </el-table-column> -->
962
+ <el-table-column :label="i18nt('组织编码')" width="250">
963
+ <template slot-scope="{ row, $index }">
964
+ <el-input
965
+ class="search-input"
966
+ max="200"
967
+ v-model="row.companyCodes"
968
+ @clear="clearBdCompanyEnv2(row)"
969
+ v-el-readonly
970
+ clearable
971
+ >
972
+ <i
973
+ slot="suffix"
974
+ class="el-input__icon el-icon-search"
975
+ @click="openBdCompanyEnvDialog2($index)"
976
+ ></i>
977
+ </el-input>
978
+ </template>
979
+ </el-table-column>
980
+ <el-table-column :label="i18nt('服务名称')" width="150">
981
+ <template slot-scope="{ row }">
982
+ {{ row.serveName }}
983
+ </template>
984
+ </el-table-column>
985
+ <!-- <el-table-column :label="i18nt('流程模板编码')" width="150">
986
+ <template slot-scope="{ row }">
987
+ <el-input v-model="row.modelKey" clearable></el-input>
988
+ </template>
989
+ </el-table-column> -->
990
+ <el-table-column :label="i18nt('流程模板序号')" width="150">
991
+ <template slot-scope="{ row }">
992
+ <base-input-number
993
+ v-model="row.modelOrders"
994
+ clearable
995
+ ></base-input-number>
996
+ </template>
997
+ </el-table-column>
998
+ <el-table-column
999
+ :label="i18nt('节点步骤(多个值用“,”隔开)')"
1000
+ width="250"
1001
+ >
1002
+ <template slot-scope="{ row }">
1003
+ <el-input v-model="row.taskSteps" clearable></el-input>
1004
+ </template>
1005
+ </el-table-column>
1006
+ <!-- <el-table-column :label="i18nt('设置')" width="150">
1007
+ <template slot-scope="{row}">
1008
+ <el-select v-model="row.type" clearable>
1009
+ <el-option :value="1" label="可编辑"></el-option>
1010
+ <el-option :value="2" label="仅显示"></el-option>
1011
+ <el-option :value="3" label="隐藏"></el-option>
1012
+ </el-select>
1013
+ </template>
1014
+ </el-table-column>-->
1015
+ <el-table-column
1016
+ :label="i18nt('designer.setting.actionColumn')"
1017
+ width="100"
1018
+ align="center"
1019
+ >
1020
+ <template #header>
1021
+ <span>{{ i18nt("designer.setting.actionColumn") }}</span>
1022
+ <el-button
1023
+ :title="i18nt('designer.setting.addTableColumn')"
1024
+ size="mini"
1025
+ type=""
1026
+ circle=""
1027
+ icon="el-icon-plus"
1028
+ @click="addItem2"
1029
+ ></el-button>
1030
+ </template>
1031
+ <template slot-scope="scope">
1032
+ <el-button
1033
+ :title="i18nt('designer.setting.deleteTableColumn')"
1034
+ size="mini"
1035
+ type=""
1036
+ circle=""
1037
+ icon="el-icon-minus"
1038
+ @click="wfAgreeConfigData.splice(scope.$index, 1)"
1039
+ ></el-button>
1040
+ </template>
1041
+ </el-table-column>
1042
+ </el-table>
1043
+ </div>
1044
+ <div class="dialog-footer" slot="footer">
1045
+ <el-button
1046
+ @click="dialogVisible2 = false"
1047
+ class="button-sty"
1048
+ icon="el-icon-close"
1049
+ >
1050
+ {{ i18nt("designer.hint.cancel") }}
1051
+ </el-button>
1052
+ <el-button
1053
+ type="primary"
1054
+ @click="confirmWfConfigDataDialog2"
1055
+ class="button-sty"
1056
+ icon="el-icon-check"
1057
+ >
1058
+ {{ i18nt("designer.hint.confirm") }}
1059
+ </el-button>
1060
+ </div>
1061
+ </el-dialog>
1062
+
1063
+ <formTemplateDialog
1064
+ v-if="showFormTemplateDialog"
1065
+ :visiable.sync="showFormTemplateDialog"
1066
+ @confirm="confirmFormTemplate"
1067
+ multi="false"
1068
+ />
1069
+ <wfObjConfigDialog
1070
+ v-if="showWfObjConfigDialog"
1071
+ :visiable.sync="showWfObjConfigDialog"
1072
+ @confirm="confirmWfObjConfigDialog"
1073
+ :formTemplate="designer.vueInstance.reportTemplate"
1074
+ />
1075
+
1076
+ <bdCompanyEnvDialog
1077
+ v-if="showBdCompanyEnvDialog1"
1078
+ :visiable.sync="showBdCompanyEnvDialog1"
1079
+ @confirm="confirmBdCompanyEnvDialog1"
1080
+ :multi="false"
1081
+ />
1082
+ <bdCompanyEnvDialog
1083
+ v-if="showBdCompanyEnvDialog2"
1084
+ :visiable.sync="showBdCompanyEnvDialog2"
1085
+ @confirm="confirmBdCompanyEnvDialog2"
1086
+ :multi="false"
1087
+ />
1088
+
1089
+ <actionButtonConfigDialog
1090
+ v-if="showActionButtonDialog && currentActionButton"
1091
+ :visible.sync="showActionButtonDialog"
1092
+ :button="currentActionButton"
1093
+ :form-code="currentFormCode"
1094
+ @confirm="confirmActionButton"
1095
+ />
1096
+ </div>
1097
+ </template>
1098
+
1099
+ <script>
1100
+ import i18n from "../../../../components/xform/utils/i18n";
1101
+ import {
1102
+ deepClone,
1103
+ insertCustomCssToHead,
1104
+ insertGlobalFunctionsToHtml,
1105
+ } from "../../../../components/xform/utils/util";
1106
+ import formTemplateDialog from "../../../../views/bd/setting/form_template/dialog.vue";
1107
+ import wfObjConfigDialog from "./wfObjConfigDialog.vue";
1108
+ import bdCompanyEnvDialog from "@base/views/bd/setting/bd_company_env/dialog";
1109
+ import Draggable from "vuedraggable";
1110
+ import formDynamicFieldSetting from "./form-dynamicField-setting.vue";
1111
+ import actionButtonConfigDialog from "./action-button-config-dialog.vue";
1112
+
1113
+ export default {
1114
+ name: "form-setting",
1115
+ mixins: [i18n],
1116
+ components: {
1117
+ formTemplateDialog,
1118
+ wfObjConfigDialog,
1119
+ bdCompanyEnvDialog,
1120
+ Draggable,
1121
+ formDynamicFieldSetting,
1122
+ actionButtonConfigDialog,
1123
+ },
1124
+ props: {
1125
+ designer: Object,
1126
+ formConfig: Object,
1127
+ },
1128
+ inject: ["getDesignerConfig"],
1129
+ data() {
1130
+ return {
1131
+ designerConfig: this.getDesignerConfig(),
1132
+
1133
+ formActiveCollapseNames: ["1", "2", "7"],
1134
+
1135
+ formSizes: [
1136
+ { label: "default", value: "" },
1137
+ { label: "large", value: "large" },
1138
+ { label: "medium", value: "medium" },
1139
+ { label: "small", value: "small" },
1140
+ { label: "mini", value: "mini" },
1141
+ ],
1142
+
1143
+ showEditFormCssDialogFlag: false,
1144
+ formCssCode: "",
1145
+ cssClassList: [],
1146
+
1147
+ showEditFunctionsDialogFlag: false,
1148
+ functionsCode: "",
1149
+
1150
+ showFormEventDialogFlag: false,
1151
+ formEventHandlerCode: "",
1152
+ curEventName: "",
1153
+ formEventDialogTitle: "",
1154
+ eventDialogTitleMap: {
1155
+ globalConfig: "全局参数配置",
1156
+ wfStartConfirmText: "流程启动确认提示语配置",
1157
+ onBeforeSubmitWf: "提交前置处理脚本配置",
1158
+ wfStartBtnShow: "提交流程按钮显隐控制脚本配置",
1159
+ wfConfig: "流程自定义配置",
1160
+ onBeforeCreated: "表单创建前事件配置",
1161
+ onFormCreated: "表单创建事件配置",
1162
+ onFormBeforeMounted: "表单挂载前事件配置",
1163
+ onFormMounted: "表单挂载事件配置",
1164
+ onFormDataChange: "表单数据变更事件配置",
1165
+ onFormValidate: "表单校验事件配置",
1166
+ },
1167
+
1168
+ eventParamsMap: {
1169
+ onBeforeCreated: "onBeforeCreated(dataId,formCode,done) {",
1170
+ onFormCreated: "onFormCreated(dataId,formCode) {",
1171
+ onFormBeforeMounted: "onFormBeforeMounted(dataId,formCode, done) {",
1172
+ onFormMounted: "onFormMounted(dataId,formCode) {",
1173
+ onFormDataChange:
1174
+ "onFormDataChange(fieldName, newValue, oldValue, formModel, subFormName, subFormRowIndex) {",
1175
+ wfStartConfirmText: "wfStartConfirmText(dataId, formCode, formData) {",
1176
+ onBeforeSubmitWf:
1177
+ "onBeforeSubmitWf(dataId, formCode, formData, source) {",
1178
+ /* 顺序以 indexMixin 的 new Function("formCode","dataId","formData") 为准,
1179
+ 不是其他脚本的 (dataId, formCode) 惯例——存量脚本按这个顺序写的,只改提示不动实参 */
1180
+ wfConfig: "wfConfig(formCode, dataId, formData) {",
1181
+ wfStartBtnShow: "wfStartBtnShow(dataId, formCode, formData) {",
1182
+ globalConfig: "globalConfig(dataId, formCode) {",
1183
+ //'onFormValidate': 'onFormValidate() {',
1184
+ },
1185
+ showVabsearchConfigDialog: false,
1186
+ vabsearchConfigType: 1,
1187
+ showFormTemplateDialog: false,
1188
+
1189
+ formScriptParam: null,
1190
+ showFormScriptParamDialog: false,
1191
+ formScriptSuccess: null,
1192
+ showFormScriptSuccessDialog: false,
1193
+ wfObjConfigs: [],
1194
+ showWfObjConfigDialog: false,
1195
+
1196
+ dialogVisible: false,
1197
+ wfConfigData: [],
1198
+
1199
+ dialogVisible2: false,
1200
+ wfAgreeConfigData: [],
1201
+
1202
+ showBdCompanyEnvDialog1: false,
1203
+ showBdCompanyEnvDialog2: false,
1204
+
1205
+ showActionButtonDialog: false,
1206
+ currentActionButton: null,
1207
+ currentActionButtonIndex: -1,
1208
+
1209
+ globalConfigParams: ["dataId", "formCode"],
1210
+
1211
+ tip1: `流程主题表达式设置说明。
1212
+
1213
+ 1、可使用参数:
1214
+ wf:流程对象
1215
+ name:流程名称
1216
+ objTypeCode:单据类型编码
1217
+ objId:对象id
1218
+ procInstId:act流程实例id
1219
+ procDefId:act流程定义id
1220
+ modelId:act流程模板id
1221
+ starterId:启动人ID
1222
+ starterName:启动人姓名
1223
+ uuid:流程实例唯一标识
1224
+ identityInfo:身份信息对象
1225
+ id:用户ID
1226
+ loginAccount:用户登录名
1227
+ nickName:用户姓名
1228
+ companyCode:企业编码
1229
+ parentCompanyCode:集团企业编码
1230
+ nowDate:当前时间
1231
+ nowDateStr:当前时间字符串(yyyy-MM-dd HH:mm:ss)
1232
+ nowDayStr:当前天字符串(yyyy-MM-dd)
1233
+ tableName:数据库表名,取表单设计中维护的表名作为参数名称
1234
+ tableField1:数据库表字段名1
1235
+ tableField2:数据库表字段名2
1236
+ tableField3:数据库表字段名3
1237
+ ......
1238
+
1239
+ 2、可使用函数:
1240
+ func.orgName(orgId):根据机构id获取机构名称
1241
+ func.convertDate(date, format):时间转换,如当前时间转为当前天字符串,则$\{func.convertDate(nowDate, 'yyyy-MM-dd')\},当前时间转为当前月字符串,则$\{func.convertDate(nowDate, 'yyyy-MM')\}
1242
+
1243
+ 3、配置示例
1244
+ 比如表名为:pm_product_project,配置如下:
1245
+ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_project.product_name\}$\{wf.name\}$\{pm_product_project.sn\}$\{func.orgName(pm_product_project.f_sale_org_id)\}$\{nowDayStr\}`,
1246
+ };
1247
+ },
1248
+ created() {
1249
+ //导入表单JSON后需要重新加载自定义CSS样式!!!
1250
+ this.designer.handleEvent("form-json-imported", () => {
1251
+ this.formCssCode = this.formConfig.cssCode || "";
1252
+ insertCustomCssToHead(this.formCssCcssCodeode);
1253
+ this.extractCssClass();
1254
+ this.designer.emitEvent("form-css-updated", deepClone(this.cssClassList));
1255
+ });
1256
+ },
1257
+ computed: {
1258
+ // formDialog/formDrawer 底部操作按钮配置(存 formConfig,随模板保存)
1259
+ actionButtons() {
1260
+ return this.formConfig.actionButtons || [];
1261
+ },
1262
+ currentFormCode() {
1263
+ const reportTemplate =
1264
+ this.designer && this.designer.vueInstance
1265
+ ? this.designer.vueInstance.reportTemplate
1266
+ : null;
1267
+ return (reportTemplate && reportTemplate.formCode) || "";
1268
+ },
1269
+ },
1270
+ mounted() {
1271
+ /* SettingPanel和FormWidget为兄弟组件, 在FormWidget加载formConfig时,
1272
+ 此处SettingPanel可能无法获取到formConfig.cssCode, 故加个延时函数! */
1273
+ setTimeout(() => {
1274
+ this.formCssCode = this.formConfig.cssCode || "";
1275
+ insertCustomCssToHead(this.formCssCode);
1276
+ this.extractCssClass();
1277
+ this.designer.emitEvent("form-css-updated", deepClone(this.cssClassList));
1278
+ }, 1200);
1279
+ this.getListByObjTypeCode();
1280
+ },
1281
+ methods: {
1282
+ ensureActionButtons() {
1283
+ if (!Array.isArray(this.formConfig.actionButtons)) {
1284
+ this.$set(this.formConfig, "actionButtons", []);
1285
+ }
1286
+ return this.formConfig.actionButtons;
1287
+ },
1288
+ addActionButton() {
1289
+ this.currentActionButtonIndex = -1;
1290
+ this.currentActionButton = {
1291
+ code: "",
1292
+ label: "",
1293
+ type: "primary",
1294
+ plain: false,
1295
+ icon: "",
1296
+ authName: "",
1297
+ needValidate: false,
1298
+ closeAfter: true,
1299
+ visible: "",
1300
+ onClick: "",
1301
+ };
1302
+ this.showActionButtonDialog = true;
1303
+ },
1304
+ editActionButton(index) {
1305
+ this.currentActionButtonIndex = index;
1306
+ this.currentActionButton = deepClone(
1307
+ this.formConfig.actionButtons[index]
1308
+ );
1309
+ this.showActionButtonDialog = true;
1310
+ },
1311
+ removeActionButton(index) {
1312
+ this.formConfig.actionButtons.splice(index, 1);
1313
+ },
1314
+ confirmActionButton(btn) {
1315
+ const list = this.ensureActionButtons();
1316
+ if (this.currentActionButtonIndex > -1) {
1317
+ this.$set(list, this.currentActionButtonIndex, btn);
1318
+ } else {
1319
+ list.push(btn);
1320
+ }
1321
+ this.currentActionButton = null;
1322
+ this.currentActionButtonIndex = -1;
1323
+ },
1324
+ showEventCollapse() {
1325
+ if (this.designerConfig["eventCollapse"] === undefined) {
1326
+ return true;
1327
+ }
1328
+
1329
+ return !!this.designerConfig["eventCollapse"];
1330
+ },
1331
+
1332
+ editFormCss() {
1333
+ this.formCssCode = this.designer.formConfig.cssCode;
1334
+ this.showEditFormCssDialogFlag = true;
1335
+ },
1336
+
1337
+ extractCssClass() {
1338
+ let regExp = /\..*{/g;
1339
+ let result = this.formCssCode ? this.formCssCode.match(regExp) : [];
1340
+ let cssNameArray = [];
1341
+
1342
+ if (!!result && result.length > 0) {
1343
+ result.forEach((rItem) => {
1344
+ let classArray = rItem.split(","); //切分逗号分割的多个class
1345
+ if (classArray.length > 0) {
1346
+ classArray.forEach((cItem) => {
1347
+ let caItem = cItem.trim();
1348
+ if (caItem.indexOf(".", 1) !== -1) {
1349
+ //查找第二个.位置
1350
+ let newClass = caItem.substring(
1351
+ caItem.indexOf(".") + 1,
1352
+ caItem.indexOf(".", 1)
1353
+ ); //仅截取第一、二个.号之间的class
1354
+ if (!!newClass) {
1355
+ cssNameArray.push(newClass.trim());
1356
+ }
1357
+ } else if (caItem.indexOf(" ") !== -1) {
1358
+ //查找第一个空格位置
1359
+ let newClass = caItem.substring(
1360
+ caItem.indexOf(".") + 1,
1361
+ caItem.indexOf(" ")
1362
+ ); //仅截取第一、二个.号之间的class
1363
+ if (!!newClass) {
1364
+ cssNameArray.push(newClass.trim());
1365
+ }
1366
+ } else {
1367
+ if (caItem.indexOf("{") !== -1) {
1368
+ //查找第一个{位置
1369
+ let newClass = caItem.substring(
1370
+ caItem.indexOf(".") + 1,
1371
+ caItem.indexOf("{")
1372
+ );
1373
+ cssNameArray.push(newClass.trim());
1374
+ } else {
1375
+ let newClass = caItem.substring(caItem.indexOf(".") + 1);
1376
+ cssNameArray.push(newClass.trim());
1377
+ }
1378
+ }
1379
+ });
1380
+ }
1381
+ });
1382
+ }
1383
+
1384
+ //this.cssClassList.length = 0
1385
+ this.cssClassList.splice(0, this.cssClassList.length); //清除数组必须用splice,length=0不会响应式更新!!
1386
+ this.cssClassList = Array.from(new Set(cssNameArray)); //数组去重
1387
+ },
1388
+
1389
+ saveFormCss() {
1390
+ this.extractCssClass();
1391
+ this.designer.formConfig.cssCode = this.formCssCode;
1392
+ insertCustomCssToHead(this.formCssCode);
1393
+ this.showEditFormCssDialogFlag = false;
1394
+
1395
+ this.designer.emitEvent("form-css-updated", deepClone(this.cssClassList));
1396
+ },
1397
+
1398
+ editGlobalFunctions() {
1399
+ this.functionsCode = this.designer.formConfig.functions;
1400
+ this.showEditFunctionsDialogFlag = true;
1401
+ },
1402
+ editFormScriptParam() {
1403
+ this.formScriptParam = this.designer.formConfig.formScriptParam;
1404
+ this.showFormScriptParamDialog = true;
1405
+ },
1406
+
1407
+ saveGlobalFunctions() {
1408
+ const codeHints = this.$refs.gfEditor.getEditorAnnotations();
1409
+ let syntaxErrorFlag = false;
1410
+ if (!!codeHints && codeHints.length > 0) {
1411
+ codeHints.forEach((chItem) => {
1412
+ if (chItem.type === "error") {
1413
+ syntaxErrorFlag = true;
1414
+ }
1415
+ });
1416
+
1417
+ if (syntaxErrorFlag) {
1418
+ this.$message.error(
1419
+ this.i18nt("designer.setting.syntaxCheckWarning")
1420
+ );
1421
+ return;
1422
+ }
1423
+ }
1424
+
1425
+ this.designer.formConfig.functions = this.functionsCode;
1426
+ insertGlobalFunctionsToHtml(this.functionsCode);
1427
+ this.showEditFunctionsDialogFlag = false;
1428
+ },
1429
+
1430
+ editFormEventHandler(eventName, dialogTitle) {
1431
+ this.curEventName = eventName;
1432
+ this.formEventHandlerCode = this.formConfig[eventName];
1433
+ let customTitle =
1434
+ typeof dialogTitle === "string" && dialogTitle ? dialogTitle : null;
1435
+ let eventTitle =
1436
+ customTitle ||
1437
+ this.eventDialogTitleMap[eventName] ||
1438
+ (eventName ? eventName + " 配置" : "配置");
1439
+ this.formEventDialogTitle = this.i18nt(eventTitle);
1440
+ this.showFormEventDialogFlag = true;
1441
+ },
1442
+
1443
+ saveFormEventHandler() {
1444
+ const codeHints = this.$refs.ecEditor.getEditorAnnotations();
1445
+ let syntaxErrorFlag = false;
1446
+ if (!!codeHints && codeHints.length > 0) {
1447
+ codeHints.forEach((chItem) => {
1448
+ if (chItem.type === "error") {
1449
+ syntaxErrorFlag = true;
1450
+ }
1451
+ });
1452
+
1453
+ if (syntaxErrorFlag) {
1454
+ this.$message.error(
1455
+ this.i18nt("designer.setting.syntaxCheckWarning")
1456
+ );
1457
+ return;
1458
+ }
1459
+ }
1460
+
1461
+ this.formConfig[this.curEventName] = this.formEventHandlerCode;
1462
+ this.showFormEventDialogFlag = false;
1463
+ },
1464
+ openFormTemplate(flag) {
1465
+ this.formTemplateFlag = flag;
1466
+ this.showFormTemplateDialog = true;
1467
+ },
1468
+ confirmFormTemplate(rows) {
1469
+ if (rows.length) {
1470
+ let row = rows[0];
1471
+ if (this.formTemplateFlag == 1) {
1472
+ //新增
1473
+ this.$set(this.formConfig, "addFormCode", row.formCode);
1474
+ this.$set(this.formConfig, "addFormName", row.formName);
1475
+ } else {
1476
+ //查看
1477
+ this.$set(this.formConfig, "editFormCode", row.formCode);
1478
+ this.$set(this.formConfig, "editFormName", row.formName);
1479
+ }
1480
+ }
1481
+ },
1482
+ getEventButtonName(funStr) {
1483
+ let name = this.i18nt("designer.setting.addEventHandler");
1484
+ if (funStr) name = "已维护";
1485
+ return name;
1486
+ },
1487
+ saveFormScriptParam() {
1488
+ const codeHints = this.$refs.gfEditor.getEditorAnnotations();
1489
+ let syntaxErrorFlag = false;
1490
+ if (!!codeHints && codeHints.length > 0) {
1491
+ codeHints.forEach((chItem) => {
1492
+ if (chItem.type === "error") {
1493
+ syntaxErrorFlag = true;
1494
+ }
1495
+ });
1496
+
1497
+ if (syntaxErrorFlag) {
1498
+ this.$message.error(
1499
+ this.i18nt("designer.setting.syntaxCheckWarning")
1500
+ );
1501
+ return;
1502
+ }
1503
+ }
1504
+
1505
+ this.designer.formConfig.formScriptParam = this.formScriptParam;
1506
+ this.showFormScriptParamDialog = false;
1507
+ },
1508
+ editFormScriptSuccess() {
1509
+ this.formScriptSuccess = this.designer.formConfig.formScriptSuccess;
1510
+ this.showFormScriptSuccessDialog = true;
1511
+ },
1512
+ saveFormScriptSuccess() {
1513
+ const codeHints = this.$refs.gfEditor.getEditorAnnotations();
1514
+ let syntaxErrorFlag = false;
1515
+ if (!!codeHints && codeHints.length > 0) {
1516
+ codeHints.forEach((chItem) => {
1517
+ if (chItem.type === "error") {
1518
+ syntaxErrorFlag = true;
1519
+ }
1520
+ });
1521
+
1522
+ if (syntaxErrorFlag) {
1523
+ this.$message.error(
1524
+ this.i18nt("designer.setting.syntaxCheckWarning")
1525
+ );
1526
+ return;
1527
+ }
1528
+ }
1529
+
1530
+ this.designer.formConfig.formScriptSuccess = this.formScriptSuccess;
1531
+ this.showFormScriptSuccessDialog = false;
1532
+ },
1533
+ openWfObjConfigDialog() {
1534
+ this.showWfObjConfigDialog = true;
1535
+ },
1536
+ confirmWfObjConfigDialog(rows) {
1537
+ this.wfObjConfigs = rows || [];
1538
+ },
1539
+ getListByObjTypeCode() {
1540
+ let reportTemplate = this.designer.vueInstance.reportTemplate;
1541
+ this.$http({
1542
+ url: `/${reportTemplate.serviceName}/wf_obj_config/listByObjTypeCode`,
1543
+ method: `post`,
1544
+ data: {
1545
+ stringOne: reportTemplate.objTypeCode,
1546
+ },
1547
+ isLoading: true,
1548
+ success: (res) => {
1549
+ this.wfObjConfigs = res.objx || [];
1550
+ },
1551
+ });
1552
+ },
1553
+ changeWfEnabled(val) {
1554
+ this.designer.vueInstance.reportTemplate.objTypeName = null;
1555
+ this.designer.vueInstance.reportTemplate.fromWfFormCode = null;
1556
+ },
1557
+ openWfConfigDataDialog() {
1558
+ let wfConfigData = this.formConfig.wfConfigData || [];
1559
+ this.dialogVisible = true;
1560
+ this.wfConfigData = this.$baseLodash.cloneDeep(wfConfigData);
1561
+ },
1562
+ addItem() {
1563
+ let newItem = {
1564
+ type: null,
1565
+ serveType: null,
1566
+ serveName: null,
1567
+ modelKey: null,
1568
+ modelOrders: undefined,
1569
+ taskSteps: null,
1570
+ companyCodes: null,
1571
+ };
1572
+ this.wfConfigData.push(newItem);
1573
+ },
1574
+ confirmWfConfigDataDialog() {
1575
+ let tableData = this.wfConfigData;
1576
+ let map = {};
1577
+ for (let i = 0; i < tableData.length; i++) {
1578
+ let item = tableData[i];
1579
+ if (!item.serveName) {
1580
+ this.$message({
1581
+ type: "error",
1582
+ message: "服务名称不能为空",
1583
+ });
1584
+ return;
1585
+ }
1586
+ if (!item.companyCodes) {
1587
+ this.$message({
1588
+ type: "error",
1589
+ message: "组织编码不能为空",
1590
+ });
1591
+ return;
1592
+ }
1593
+ let modelOrders = item.modelOrders ?? "";
1594
+
1595
+ let serveName = item.serveName;
1596
+ let companyCodes = item.companyCodes;
1597
+ let key = serveName + "_" + companyCodes + "_" + modelOrders;
1598
+ if (!map[key]) {
1599
+ map[key] = true;
1600
+ } else {
1601
+ this.$message({
1602
+ type: "error",
1603
+ message: "[服务+组织+流程模板序号]不能重复",
1604
+ });
1605
+ return;
1606
+ }
1607
+ }
1608
+
1609
+ this.dialogVisible = !1;
1610
+ this.formConfig.wfConfigData = this.wfConfigData;
1611
+ },
1612
+
1613
+ openWfConfigDataDialog2() {
1614
+ let wfAgreeConfigData = this.formConfig.wfAgreeConfigData || [];
1615
+ this.dialogVisible2 = true;
1616
+ this.wfAgreeConfigData = this.$baseLodash.cloneDeep(wfAgreeConfigData);
1617
+ },
1618
+ addItem2() {
1619
+ let newItem = {
1620
+ type: null,
1621
+ serveType: null,
1622
+ serveName: null,
1623
+ modelKey: null,
1624
+ modelOrders: undefined,
1625
+ taskSteps: null,
1626
+ companyCodes: null,
1627
+ };
1628
+ this.wfAgreeConfigData.push(newItem);
1629
+ },
1630
+ confirmWfConfigDataDialog2() {
1631
+ let tableData = this.wfAgreeConfigData;
1632
+
1633
+ let map = {};
1634
+ for (let i = 0; i < tableData.length; i++) {
1635
+ let item = tableData[i];
1636
+ if (!item.serveName) {
1637
+ this.$message({
1638
+ type: "error",
1639
+ message: "服务名称不能为空",
1640
+ });
1641
+ return;
1642
+ }
1643
+ if (!item.companyCodes) {
1644
+ this.$message({
1645
+ type: "error",
1646
+ message: "组织编码不能为空",
1647
+ });
1648
+ return;
1649
+ }
1650
+ let modelOrders = item.modelOrders ?? "";
1651
+
1652
+ let serveName = item.serveName;
1653
+ let companyCodes = item.companyCodes;
1654
+ let key = serveName + "_" + companyCodes + "_" + modelOrders;
1655
+ if (!map[key]) {
1656
+ map[key] = true;
1657
+ } else {
1658
+ this.$message({
1659
+ type: "error",
1660
+ message: "[服务+组织+流程模板序号]不能重复",
1661
+ });
1662
+ return;
1663
+ }
1664
+ }
1665
+ this.dialogVisible2 = !1;
1666
+ this.formConfig.wfAgreeConfigData = this.wfAgreeConfigData;
1667
+ },
1668
+
1669
+ clearBdCompanyEnv1(row) {
1670
+ row.serveName = null;
1671
+ row.companyCodes = null;
1672
+ },
1673
+ openBdCompanyEnvDialog1(rowIndex) {
1674
+ this.operateIndex = rowIndex;
1675
+ this.showBdCompanyEnvDialog1 = true;
1676
+ },
1677
+ confirmBdCompanyEnvDialog1(rows) {
1678
+ if (rows.length) {
1679
+ let row = rows[0];
1680
+ let item = this.wfConfigData[this.operateIndex];
1681
+ item.serveName = row.bdService;
1682
+ item.companyCodes = row.bdCompanyCode;
1683
+ }
1684
+ },
1685
+
1686
+ clearBdCompanyEnv2(row) {
1687
+ row.serveName = null;
1688
+ row.companyCodes = null;
1689
+ },
1690
+ openBdCompanyEnvDialog2(rowIndex) {
1691
+ this.operateIndex = rowIndex;
1692
+ this.showBdCompanyEnvDialog2 = true;
1693
+ },
1694
+ confirmBdCompanyEnvDialog2(rows) {
1695
+ if (rows.length) {
1696
+ let row = rows[0];
1697
+ let item = this.wfAgreeConfigData[this.operateIndex];
1698
+ item.serveName = row.bdService;
1699
+ item.companyCodes = row.bdCompanyCode;
1700
+ }
1701
+ },
1702
+ addOtherTab() {
1703
+ if (!this.formConfig.otherTabList) {
1704
+ this.$set(this.formConfig, "otherTabList", []);
1705
+ }
1706
+ this.formConfig.otherTabList.push({
1707
+ label: null,
1708
+ formCode: null,
1709
+ });
1710
+ },
1711
+ },
1712
+ };
1713
+ </script>
1714
+
1715
+ <style lang="scss" scoped>
1716
+ .setting-form {
1717
+ ::v-deep .el-form-item{
1718
+ .el-form-item__label {
1719
+ font-size: 13px;
1720
+ //text-overflow: ellipsis;
1721
+ overflow: hidden;
1722
+ white-space: nowrap;
1723
+ }
1724
+ &.el-form-item--mini.el-form-item {
1725
+ margin-bottom: 6px;
1726
+ }
1727
+ &.el-form-item-second{
1728
+ .el-form-item__label{
1729
+ padding-left:4px;
1730
+ &:before{content:"";width:5px;height:2px;background:#FF4D4F;display:inline-block;margin-right:4px;}
1731
+ span{flex:1}
1434
1732
  }
1435
- this.formConfig.otherTabList.push({
1436
- label: null,
1437
- formCode: null,
1438
- });
1439
- },
1440
- },
1441
- };
1442
- </script>
1443
-
1444
- <style lang="scss" scoped>
1445
- .setting-form {
1446
- ::v-deep .el-form-item__label {
1447
- font-size: 13px;
1448
- //text-overflow: ellipsis;
1449
- overflow: hidden;
1450
- white-space: nowrap;
1451
- }
1452
-
1453
- ::v-deep .el-form-item--mini.el-form-item {
1454
- margin-bottom: 6px;
1455
- }
1456
-
1457
- .radio-group-custom {
1458
- ::v-deep .el-radio-button__inner {
1459
- padding-left: 12px;
1460
- padding-right: 12px;
1461
1733
  }
1734
+ }
1735
+
1736
+ .radio-group-custom {
1737
+ ::v-deep .el-radio-button__inner {
1738
+ padding-left: 12px;
1739
+ padding-right: 12px;
1740
+ }
1741
+ }
1742
+
1743
+ .custom-divider.el-divider--horizontal {
1744
+ margin: 10px 0;
1745
+ }
1746
+ }
1747
+
1748
+ .setting-collapse {
1749
+ ::v-deep .el-collapse-item__content {
1750
+ padding-bottom: 6px;
1751
+ }
1752
+
1753
+ ::v-deep .el-collapse-item__header {
1754
+ font-weight: bold;
1755
+ }
1756
+ }
1757
+
1758
+ /* 折叠组内部的二级分组标题,用于把长配置组切成几段(如「流程信息」) */
1759
+ ::v-deep .wf-group-title {
1760
+ margin: 16px 0 8px;
1761
+ padding-left: 8px;
1762
+ //border-left: 3px solid #0073E5;
1763
+ color: rgba(0,0,0,.65);
1764
+ font-size: 13px;
1765
+ font-weight: 600;
1766
+ line-height: 1.3;
1767
+ background: rgba(0,0,0,0.04);
1768
+ padding: 4px 0 4px 8px;
1769
+ &:first-child {
1770
+ margin-top: 0;
1462
1771
  }
1463
-
1464
- .custom-divider.el-divider--horizontal {
1465
- margin: 10px 0;
1466
- }
1467
- }
1468
-
1469
- .setting-collapse {
1470
- ::v-deep .el-collapse-item__content {
1471
- padding-bottom: 6px;
1472
- }
1473
-
1474
- ::v-deep .el-collapse-item__header {
1475
- font-weight: bold;
1476
- }
1477
- }
1478
-
1479
- .small-padding-dialog {
1480
- ::v-deep .el-dialog__body {
1481
- padding: 6px 15px 12px 15px;
1482
- }
1483
- }
1484
- ::v-deep .el-textarea .el-textarea__inner {
1485
- word-break: break-all;
1486
- }
1487
- </style>
1772
+ ~ .el-form-item{
1773
+ .el-form-item__label{
1774
+ padding-left:4px;
1775
+ &:before{content:"";width:5px;height:2px;background:#0073e5;display:inline-block;margin-right:4px;}
1776
+ span{flex:1}
1777
+ }
1778
+ &.form-item-label-red{
1779
+ .el-form-item__label:before{
1780
+ background:#FF4D4F
1781
+ }
1782
+ }
1783
+ }
1784
+ }
1785
+
1786
+ .small-padding-dialog {
1787
+ ::v-deep .el-dialog__body {
1788
+ padding: 6px 15px 12px 15px;
1789
+ }
1790
+ }
1791
+ ::v-deep .el-textarea .el-textarea__inner {
1792
+ word-break: break-all;
1793
+ }
1794
+ </style>