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
@@ -0,0 +1,262 @@
1
+ /**
2
+ * 「点击绑定事件」动作注册表。
3
+ *
4
+ * 设计器(clickBindEvent-editor.vue)与运行时(field-widget/fieldMixin.js)共用这一份,
5
+ * 因此**本文件不得 import 任何 .vue**——否则设计器的属性编辑器会被打进表单渲染包。
6
+ * 编辑器组件映射留在 clickBindEvent-editor.vue 自己的 components 里,这里只存 editorName 字符串。
7
+ *
8
+ * 方案见 docs/点击绑定事件重构与表单弹框抽屉动作方案.md
9
+ */
10
+
11
+ /**
12
+ * widgetsConfig 只在真正要造默认配置时才引。
13
+ * 它顶层就有 containers 提前引用 defaultWfConfig 的 TDZ 问题(见该文件头部注释),
14
+ * webpack 侧被 Babel 的 const→var 掩盖了,jest 侧会直接抛 —— 顶层 import 会让本模块
15
+ * 连同引它的运行时一起不可测。
16
+ */
17
+ function getDefaultSearchDialogConfig() {
18
+ return require("../../../widget-panel/widgetsConfig")
19
+ .defaultSearchDialogConfig;
20
+ }
21
+
22
+ export const CLICK_BIND = {
23
+ SEARCH_DIALOG: "1", // 打开选择弹框
24
+ ADD_TABLE_DATA: "2", // 列表添加数据
25
+ FORM_DIALOG: "3", // 打开表单弹框
26
+ FORM_DRAWER: "4", // 打开表单抽屉
27
+ };
28
+
29
+ // 有自身值的控件:dataId 缺省取控件值;按钮类没有值,缺省取当前表格行字段
30
+ const VALUE_WIDGET_TYPES = ["vabsearch", "singerSearch", "multiSearch"];
31
+
32
+ /**
33
+ * 「打开表单弹框 / 打开表单抽屉」共用配置。两个动作共用一个 configKey,
34
+ * 弹框/抽屉互切时配置不丢。
35
+ */
36
+ export function buildDefaultFormHostConfig(ctx = {}) {
37
+ let isValueWidget
38
+ = VALUE_WIDGET_TYPES.indexOf(ctx.widgetType) > -1
39
+ || ctx.widgetTextLinkFlag === true;
40
+ return {
41
+ // 目标表单
42
+ formCode: null,
43
+ formCodeScript: null,
44
+ host: null, // null=直接渲染该表单;"list"=用列表宿主页承载
45
+ title: null,
46
+ // 数据
47
+ openMode: "1", // 1=新增;2=详情
48
+ dataIdFrom: isValueWidget ? "1" : "3",
49
+ dataIdField: null,
50
+ dataIdScript: null,
51
+ paramScript: null,
52
+ queryParamScript: null,
53
+ // 呈现
54
+ readonly: false,
55
+ showFooter: true,
56
+ plain: false, // 仅抽屉
57
+ dialogWidth: null, // 仅弹框
58
+ fullscreen: false, // 仅弹框
59
+ drawerSize: null, // 仅抽屉,缺省 62%(host:"list" 时 85%)
60
+ drawerDirection: null, // 仅抽屉,缺省 rtl
61
+ // 收尾
62
+ onCloseScript: null,
63
+ };
64
+ }
65
+
66
+ export const clickBindActions = [
67
+ {
68
+ value: CLICK_BIND.SEARCH_DIALOG,
69
+ label: "打开选择弹框",
70
+ editorName: "searchDialogEventEditor",
71
+ configKey: "searchDialogConfig",
72
+ // vabsearch 的多选由控件自身的 multipleChoices 决定,这里缺省给 false(沿用存量判定)
73
+ defaultConfig: (ctx) => ({
74
+ ...getDefaultSearchDialogConfig(),
75
+ multipleChoices: !(ctx && ctx.widgetType === "vabsearch"),
76
+ }),
77
+ run: (ctx) => ctx.vm.openSearchDialog(ctx.tableParam, ctx.flag),
78
+ },
79
+ {
80
+ value: CLICK_BIND.ADD_TABLE_DATA,
81
+ label: "列表添加数据",
82
+ editorName: "addTableDataEventEditor",
83
+ configKey: "addTableDataConfig",
84
+ defaultConfig: () => ({
85
+ tableRef: null,
86
+ tableData: {},
87
+ }),
88
+ run: (ctx) => ctx.vm.handleAddTableDataEvent(ctx.flag),
89
+ },
90
+ {
91
+ value: CLICK_BIND.FORM_DIALOG,
92
+ label: "打开表单弹框",
93
+ editorName: "formHostEventEditor",
94
+ configKey: "formHostConfig",
95
+ defaultConfig: buildDefaultFormHostConfig,
96
+ run: (ctx) => openFormHost(ctx, "dialog"),
97
+ },
98
+ {
99
+ value: CLICK_BIND.FORM_DRAWER,
100
+ label: "打开表单抽屉",
101
+ editorName: "formHostEventEditor",
102
+ configKey: "formHostConfig",
103
+ defaultConfig: buildDefaultFormHostConfig,
104
+ run: (ctx) => openFormHost(ctx, "drawer"),
105
+ },
106
+ ];
107
+
108
+ export function getClickBindAction(value) {
109
+ if (!value) return null;
110
+ return clickBindActions.find((action) => action.value === value) || null;
111
+ }
112
+
113
+ /** 传给承载壳前剔除 undefined:两个壳都是 Object.assign({默认}, 配置),undefined 会把默认值覆盖成空 */
114
+ export function dropUndefined(obj) {
115
+ let result = {};
116
+ Object.keys(obj || {}).forEach((key) => {
117
+ if (obj[key] !== undefined) result[key] = obj[key];
118
+ });
119
+ return result;
120
+ }
121
+
122
+ /**
123
+ * 详情态单据 ID 求值。openMode="1"(新增)恒返回 null。
124
+ * 取不到时提示并返回 undefined,调用方据此中断——详情表单空开一张没有意义。
125
+ */
126
+ export function resolveDataId(ctx, cfg) {
127
+ if (!cfg || cfg.openMode !== "2") return null;
128
+
129
+ let dataId = null;
130
+ switch (cfg.dataIdFrom) {
131
+ case "2":
132
+ dataId = cfg.dataIdField
133
+ ? ctx.formRef && ctx.formRef.getFieldValue(cfg.dataIdField)
134
+ : null;
135
+ break;
136
+ case "3":
137
+ dataId
138
+ = cfg.dataIdField && ctx.rowData ? ctx.rowData[cfg.dataIdField] : null;
139
+ break;
140
+ case "4":
141
+ dataId = cfg.dataIdScript
142
+ ? ctx.vm.handleCustomEvent(cfg.dataIdScript, ["rowData"], [ctx.rowData])
143
+ : null;
144
+ break;
145
+ default:
146
+ // "1" 当前控件值
147
+ dataId = ctx.vm.getValue ? ctx.vm.getValue() : ctx.vm.fieldModel;
148
+ break;
149
+ }
150
+
151
+ if (dataId === null || dataId === undefined || dataId === "") {
152
+ ctx.vm.$message.warning("未取到单据ID");
153
+ return undefined;
154
+ }
155
+ return dataId;
156
+ }
157
+
158
+ /**
159
+ * 打开一张 formCode 表单。
160
+ * - 弹框走 xform 内部通道 getFormRef().openFormDialog(formConfig 可透传 VFormRender props)
161
+ * - 抽屉走全局 $formDrawer(能力最全:dataId/param/plain/readonly/host/fillHeight/报错处理)
162
+ * 不回填、不选行;结果只通过 onCloseScript 的 result 参数交给脚本。
163
+ */
164
+ export function openFormHost(ctx, mode) {
165
+ let cfg = (ctx.optionModel && ctx.optionModel.formHostConfig) || {};
166
+ let formCode = cfg.formCodeScript
167
+ ? ctx.vm.handleCustomEvent(cfg.formCodeScript, ["rowData"], [ctx.rowData])
168
+ : cfg.formCode;
169
+ if (!formCode) return;
170
+
171
+ let dataId = resolveDataId(ctx, cfg);
172
+ if (dataId === undefined) return; // 详情态取不到单据 ID,已提示
173
+
174
+ // param:透传 VFormRender 的 param prop,只给目标模板的脚本用,不参与请求
175
+ let param = cfg.paramScript
176
+ ? ctx.vm.handleCustomEvent(cfg.paramScript, ["rowData"], [ctx.rowData])
177
+ : undefined;
178
+ // queryParam:强制合并进目标表单查询表格的请求参数(两个壳都转成 dataTableOption.queryParam)。
179
+ // host:"list" 时不生效——列表宿主页自己加载模板,没有这条注入通道,编辑器里也已隐藏该项。
180
+ let queryParam = cfg.queryParamScript
181
+ ? ctx.vm.handleCustomEvent(cfg.queryParamScript, ["rowData"], [ctx.rowData])
182
+ : undefined;
183
+ let onClose = (formRef, result) => {
184
+ if (cfg.onCloseScript) {
185
+ ctx.vm.handleCustomEvent(
186
+ cfg.onCloseScript,
187
+ ["formRef", "result"],
188
+ [formRef, result]
189
+ );
190
+ }
191
+ };
192
+
193
+ if (mode === "drawer") {
194
+ // 全局抽屉每次新建实例,可叠开;连点两次会叠两层,这里挂标记防重
195
+ if (ctx.vm._formHostOpening) return;
196
+ ctx.vm._formHostOpening = true;
197
+ let clearFlag = () => {
198
+ ctx.vm._formHostOpening = false;
199
+ };
200
+ let openDrawer = ctx.vm.$formDrawer
201
+ ? ctx.vm.$formDrawer.bind(ctx.vm)
202
+ : (option) =>
203
+ import("../../../../../formDrawer").then((m) =>
204
+ m.default.open(option)
205
+ );
206
+ return openDrawer(
207
+ dropUndefined({
208
+ formCode: formCode,
209
+ host: cfg.host || undefined,
210
+ title: cfg.title || undefined,
211
+ param: param,
212
+ queryParam: queryParam,
213
+ dataId: dataId, // null=新增态
214
+ plain: !!cfg.plain,
215
+ readonly: !!cfg.readonly,
216
+ showFooter: cfg.showFooter !== false,
217
+ size: cfg.drawerSize || undefined,
218
+ direction: cfg.drawerDirection || undefined,
219
+ })
220
+ ).then(
221
+ (result) => {
222
+ clearFlag();
223
+ onClose(null, result);
224
+ },
225
+ (error) => {
226
+ clearFlag();
227
+ throw error;
228
+ }
229
+ );
230
+ }
231
+
232
+ // 内部壳是回调式:onAction(配置按钮)/ confirm(默认「确定」)先把结果存下,
233
+ // close 时一起交给脚本。注意内部弹框的默认「确定」不做表单校验。
234
+ let lastResult = null;
235
+ ctx.formRef.openFormDialog(
236
+ dropUndefined({
237
+ formCode: formCode,
238
+ host: cfg.host || undefined,
239
+ param: param,
240
+ queryParam: queryParam,
241
+ // v-bind 到 VFormRender 的 props,只放 props(禁止 param/formJson/formData)
242
+ formConfig: dropUndefined({
243
+ dataId: dataId,
244
+ disabledMode: !!cfg.readonly,
245
+ }),
246
+ showFooter: cfg.showFooter !== false,
247
+ dialogConfig: dropUndefined({
248
+ title: cfg.title || undefined,
249
+ width: cfg.dialogWidth || undefined,
250
+ fullscreen: !!cfg.fullscreen,
251
+ }),
252
+ onAction: (payload) => {
253
+ lastResult = payload;
254
+ },
255
+ confirm: (formRef) => {
256
+ lastResult
257
+ = formRef && formRef.getFormData ? formRef.getFormData(false) : true;
258
+ },
259
+ close: (formRef) => onClose(formRef, lastResult),
260
+ })
261
+ );
262
+ }
@@ -1,88 +1,97 @@
1
- <template>
2
- <div>
3
- <el-form-item label="点击绑定事件">
4
- <el-select v-model="optionModel.clickBindEvent" clearable>
5
- <el-option value="1" label="打开选择弹框"></el-option>
6
- <el-option value="2" label="列表添加数据"></el-option>
7
- </el-select>
8
- </el-form-item>
9
- <el-form-item label="点击前置事件" label-width="150px">
10
- <a href="javascript:void(0);" class="a-link link-oneLind"
11
- @click="editEventHandler('onBeforeClickButton', evnentParams)">
12
- <span>{{ optionModel.onBeforeClickButton }}</span>
13
- <i class="el-icon-edit"></i>
14
- </a>
15
- </el-form-item>
16
- <searchDialogEventEditor :designer="designer" :selectedWidget="selectedWidget" :optionModel.sync="optionModel"
17
- v-if="optionModel.clickBindEvent=='1'"></searchDialogEventEditor>
18
- <addTableDataEventEditor :designer="designer" :selectedWidget="selectedWidget" :optionModel.sync="optionModel"
19
- v-if="optionModel.clickBindEvent=='2'"></addTableDataEventEditor>
20
- </div>
21
- </template>
22
- <script>
23
- import searchDialogEventEditor from "./search-dialog-event-editor.vue";
24
- import addTableDataEventEditor from "./addTableData-event-editor.vue";
25
- import {defaultSearchDialogConfig} from "../../../../../../components/xform/form-designer/widget-panel/widgetsConfig";
26
-
27
- import i18n from "../../../../../../components/xform/utils/i18n";
28
- import eventMixin
29
- from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
30
-
31
- let clickBindEventConfig = {
32
- searchDialogConfig: {
33
- ...defaultSearchDialogConfig
34
- },
35
- addTableDataConfig: {
36
- tableRef: null,
37
- tableData: {}
38
- }
39
- }
40
-
41
- export default {
42
- name: "clickBindEvent-editor",
43
- mixins: [i18n, eventMixin],
44
- props: {
45
- designer: Object,
46
- selectedWidget: Object,
47
- optionModel: Object,
48
- },
49
- components: {
50
- searchDialogEventEditor,
51
- addTableDataEventEditor
52
- },
53
- provide() {
54
- return {
55
- defaultClickBindEventConfig: clickBindEventConfig
56
- }
57
- },
58
- data() {
59
- return {
60
- evnentParams: ["dataId", "formCode", "done"]
61
- }
62
- },
63
- created() {
64
- if (!this.optionModel.addTableDataConfig) {
65
- this.$set(this.optionModel, 'addTableDataConfig', this.$baseLodash.cloneDeep(clickBindEventConfig.addTableDataConfig));
66
- }
67
- if (!this.optionModel.searchDialogConfig) {
68
- this.$set(this.optionModel, 'searchDialogConfig', this.$baseLodash.cloneDeep(clickBindEventConfig.searchDialogConfig));
69
- }
70
- if (this.optionModel.searchDialogConfig.multipleChoices === void 0) {
71
- if (this.selectedWidget.type == 'vabsearch') {
72
- this.$set(this.optionModel.searchDialogConfig, 'multipleChoices', false);
73
- } else {
74
- this.$set(this.optionModel.searchDialogConfig, 'multipleChoices', true);
75
- }
76
- }
77
- },
78
- methods: {
79
- changeEventType(val) {
80
- // this.optionModel.clickBindEventConfig = clickBindEventConfig;
81
- // this.$set(this.optionModel, "clickBindEventConfig", clickBindEventConfig);
82
- }
83
- }
84
- }
85
- </script>
86
- <style scoped>
87
-
88
- </style>
1
+ <template>
2
+ <div>
3
+ <el-form-item class="form-item-label-top" label="点击绑定事件">
4
+ <el-select v-model="optionModel.clickBindEvent" clearable @change="onActionChange">
5
+ <el-option v-for="action in actions" :key="action.value"
6
+ :value="action.value" :label="action.label"></el-option>
7
+ </el-select>
8
+ </el-form-item>
9
+ <el-form-item label="点击前置事件" label-width="150px">
10
+ <a href="javascript:void(0);" class="a-link link-oneLind"
11
+ @click="editEventHandler('onBeforeClickButton', evnentParams)">
12
+ <span>{{ optionModel.onBeforeClickButton }}</span>
13
+ <i class="el-icon-edit"></i>
14
+ </a>
15
+ </el-form-item>
16
+ <!-- 子编辑器由注册表的 editorName 决定,新增动作不用再加 v-if 分支 -->
17
+ <component v-if="currentAction && currentAction.editorName"
18
+ :is="currentAction.editorName"
19
+ :designer="designer" :selectedWidget="selectedWidget"
20
+ :optionModel.sync="optionModel"
21
+ :actionValue="optionModel.clickBindEvent"></component>
22
+ </div>
23
+ </template>
24
+ <script>
25
+ import searchDialogEventEditor from "./search-dialog-event-editor.vue";
26
+ import addTableDataEventEditor from "./addTableData-event-editor.vue";
27
+ import formHostEventEditor from "./form-host-event-editor.vue";
28
+ import {
29
+ clickBindActions,
30
+ getClickBindAction,
31
+ } from "./clickBindActions";
32
+
33
+ import i18n from "../../../../../../components/xform/utils/i18n";
34
+ import eventMixin
35
+ from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
36
+
37
+ export default {
38
+ name: "clickBindEvent-editor",
39
+ mixins: [i18n, eventMixin],
40
+ props: {
41
+ designer: Object,
42
+ selectedWidget: Object,
43
+ optionModel: Object,
44
+ },
45
+ components: {
46
+ searchDialogEventEditor,
47
+ addTableDataEventEditor,
48
+ formHostEventEditor
49
+ },
50
+ data() {
51
+ return {
52
+ actions: clickBindActions,
53
+ evnentParams: ["dataId", "formCode", "done"]
54
+ }
55
+ },
56
+ computed: {
57
+ currentAction() {
58
+ return getClickBindAction(this.optionModel.clickBindEvent);
59
+ }
60
+ },
61
+ created() {
62
+ // 存量模板兜底:只补当前已选动作的配置块,不再无条件塞两份空壳
63
+ this.ensureActionConfig(this.optionModel.clickBindEvent);
64
+ },
65
+ methods: {
66
+ // 切换动作时惰性注入配置:已有则保留("3"↔"4" 共用 formHostConfig,互切不丢配置)
67
+ onActionChange(value) {
68
+ this.ensureActionConfig(value);
69
+ },
70
+ ensureActionConfig(value) {
71
+ let action = getClickBindAction(value);
72
+ if (!action || !action.configKey) return;
73
+ if (!this.optionModel[action.configKey]) {
74
+ this.$set(
75
+ this.optionModel,
76
+ action.configKey,
77
+ action.defaultConfig({widgetType: this.selectedWidget.type})
78
+ );
79
+ }
80
+ // 存量模板可能缺 multipleChoices,沿用原判定补上
81
+ if (
82
+ action.configKey === "searchDialogConfig"
83
+ && this.optionModel.searchDialogConfig.multipleChoices === void 0
84
+ ) {
85
+ this.$set(
86
+ this.optionModel.searchDialogConfig,
87
+ "multipleChoices",
88
+ this.selectedWidget.type !== "vabsearch"
89
+ );
90
+ }
91
+ }
92
+ }
93
+ }
94
+ </script>
95
+ <style scoped>
96
+
97
+ </style>
@@ -0,0 +1,188 @@
1
+ <template>
2
+ <div>
3
+ <el-form-item label-width="0">
4
+ <el-divider class="custom-divider">{{ drawerMode ? '表单抽屉配置' : '表单弹框配置' }}</el-divider>
5
+ </el-form-item>
6
+ <el-form-item class="form-item-label-top" label="表单编码">
7
+ <el-input type="text" v-model="eventConfig.formCode"></el-input>
8
+ </el-form-item>
9
+ <el-form-item label="表单编码脚本" label-width="150px">
10
+ <a href="javascript:void(0);" class="a-link link-oneLind"
11
+ @click="editEventHandler('formCodeScript', scriptParams, optionFormCode)">
12
+ <span>{{ eventConfig.formCodeScript }}</span>
13
+ <i class="el-icon-edit"></i>
14
+ </a>
15
+ </el-form-item>
16
+ <el-form-item label="以列表页承载">
17
+ <el-switch v-model="listHost"></el-switch>
18
+ <span class="tips">开启后按「常规/列表」页签的列表页打开</span>
19
+ </el-form-item>
20
+ <el-form-item class="form-item-label-top" label="标题">
21
+ <el-input type="text" v-model="eventConfig.title" placeholder="缺省取表单模板名称"></el-input>
22
+ </el-form-item>
23
+
24
+ <template v-if="!listHost">
25
+ <el-form-item class="form-item-label-top" label="打开方式">
26
+ <el-select v-model="eventConfig.openMode">
27
+ <el-option value="1" label="新增"></el-option>
28
+ <el-option value="2" label="详情"></el-option>
29
+ </el-select>
30
+ </el-form-item>
31
+ <template v-if="eventConfig.openMode === '2'">
32
+ <el-form-item class="form-item-label-top" label="单据ID来源">
33
+ <el-select v-model="eventConfig.dataIdFrom">
34
+ <el-option value="1" label="当前控件值"></el-option>
35
+ <el-option value="2" label="指定表单字段"></el-option>
36
+ <el-option value="3" label="当前表格行字段"></el-option>
37
+ <el-option value="4" label="脚本"></el-option>
38
+ </el-select>
39
+ </el-form-item>
40
+ <el-form-item class="form-item-label-top" label="来源字段名"
41
+ v-if="eventConfig.dataIdFrom === '2' || eventConfig.dataIdFrom === '3'">
42
+ <el-input type="text" v-model="eventConfig.dataIdField"></el-input>
43
+ </el-form-item>
44
+ <el-form-item label="单据ID脚本" label-width="150px" v-if="eventConfig.dataIdFrom === '4'">
45
+ <a href="javascript:void(0);" class="a-link link-oneLind"
46
+ @click="editEventHandler('dataIdScript', scriptParams, optionDataId)">
47
+ <span>{{ eventConfig.dataIdScript }}</span>
48
+ <i class="el-icon-edit"></i>
49
+ </a>
50
+ </el-form-item>
51
+ </template>
52
+ </template>
53
+
54
+ <el-form-item label="查询参数" label-width="150px" v-if="!listHost">
55
+ <a href="javascript:void(0);" class="a-link link-oneLind"
56
+ @click="editEventHandler('queryParamScript', scriptParams, optionQueryParam)">
57
+ <span>{{ eventConfig.queryParamScript }}</span>
58
+ <i class="el-icon-edit"></i>
59
+ </a>
60
+ <span class="tips">脚本返回对象合并进目标表单查询表格的请求参数;按业务字段过滤写
61
+ <code>return {'{'} condition: {'{'} status: 1 {'}'} {'}'}</code>(追加进查询区条件,同字段以脚本为准)</span>
62
+ </el-form-item>
63
+ <el-form-item label="自定义参数" label-width="150px">
64
+ <a href="javascript:void(0);" class="a-link link-oneLind"
65
+ @click="editEventHandler('paramScript', scriptParams, optionParam)">
66
+ <span>{{ eventConfig.paramScript }}</span>
67
+ <i class="el-icon-edit"></i>
68
+ </a>
69
+ <span class="tips">脚本返回对象 → 目标表单的 param,只给模板脚本用,不参与请求</span>
70
+ </el-form-item>
71
+ <el-form-item label="只读">
72
+ <el-switch v-model="eventConfig.readonly"></el-switch>
73
+ <span class="tips">{{ drawerMode ? '只读态渲染,底部仅保留「关闭」' : '整表禁用,底部按钮不变' }}</span>
74
+ </el-form-item>
75
+ <el-form-item label="显示底部按钮">
76
+ <el-switch v-model="eventConfig.showFooter"></el-switch>
77
+ <span class="tips">按钮由目标表单的「表单操作按钮」决定</span>
78
+ </el-form-item>
79
+
80
+ <!-- 形态字段:弹框/抽屉各一组 -->
81
+ <template v-if="drawerMode">
82
+ <el-form-item label="素身详情">
83
+ <el-switch v-model="eventConfig.plain"></el-switch>
84
+ <span class="tips">不渲染详情标题栏与模块导航</span>
85
+ </el-form-item>
86
+ <el-form-item class="form-item-label-top" label="抽屉尺寸">
87
+ <el-input type="text" v-model="eventConfig.drawerSize" placeholder="缺省 62%,列表页 85%"></el-input>
88
+ </el-form-item>
89
+ <el-form-item class="form-item-label-top" label="弹出方向">
90
+ <el-select v-model="eventConfig.drawerDirection" clearable placeholder="缺省 右侧滑出">
91
+ <el-option value="rtl" label="右侧滑出"></el-option>
92
+ <el-option value="ltr" label="左侧滑出"></el-option>
93
+ <el-option value="ttb" label="顶部滑出"></el-option>
94
+ <el-option value="btt" label="底部滑出"></el-option>
95
+ </el-select>
96
+ </el-form-item>
97
+ </template>
98
+ <template v-else>
99
+ <el-form-item class="form-item-label-top" label="弹框宽度">
100
+ <el-input type="text" v-model="eventConfig.dialogWidth" placeholder="缺省 1200px"></el-input>
101
+ </el-form-item>
102
+ <el-form-item label="全屏">
103
+ <el-switch v-model="eventConfig.fullscreen"></el-switch>
104
+ </el-form-item>
105
+ </template>
106
+
107
+ <el-form-item label="关闭后事件" label-width="150px">
108
+ <a href="javascript:void(0);" class="a-link link-oneLind"
109
+ @click="editEventHandler('onCloseScript', closeScriptParams, optionClose)">
110
+ <span>{{ eventConfig.onCloseScript }}</span>
111
+ <i class="el-icon-edit"></i>
112
+ </a>
113
+ </el-form-item>
114
+ </div>
115
+ </template>
116
+
117
+ <script>
118
+ import i18n from "../../../../../../components/xform/utils/i18n"
119
+ import eventMixin
120
+ from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin"
121
+ import {CLICK_BIND} from "./clickBindActions";
122
+
123
+ /**
124
+ * 「打开表单弹框 / 打开表单抽屉」共用配置编辑器(optionModel.formHostConfig)。
125
+ * 两个动作共用一份配置,形态字段按 actionValue 切换,弹框/抽屉互切时配置不丢。
126
+ */
127
+ export default {
128
+ mixins: [i18n, eventMixin],
129
+ props: {
130
+ designer: Object,
131
+ selectedWidget: Object,
132
+ optionModel: Object,
133
+ actionValue: String,
134
+ },
135
+ data() {
136
+ return {
137
+ optionFormCode: this.buildScriptOption("formCodeScript"),
138
+ optionDataId: this.buildScriptOption("dataIdScript"),
139
+ optionQueryParam: this.buildScriptOption("queryParamScript"),
140
+ optionParam: this.buildScriptOption("paramScript"),
141
+ optionClose: this.buildScriptOption("onCloseScript"),
142
+ // 脚本可用参数:dataId/formCode 由 getEventParam 统一注入,这里只列附加项
143
+ scriptParams: ["dataId", "formCode", "rowData"],
144
+ closeScriptParams: ["dataId", "formCode", "formRef", "result"],
145
+ }
146
+ },
147
+ computed: {
148
+ drawerMode() {
149
+ return this.actionValue === CLICK_BIND.FORM_DRAWER;
150
+ },
151
+ eventConfig() {
152
+ return this.optionModel.formHostConfig || {};
153
+ },
154
+ // 列表页承载时不需要新增/详情与素身设置,统一按开关处理
155
+ listHost: {
156
+ get() {
157
+ return this.eventConfig.host === "list";
158
+ },
159
+ set(val) {
160
+ this.eventConfig.host = val ? "list" : null;
161
+ }
162
+ }
163
+ },
164
+ methods: {
165
+ buildScriptOption(key) {
166
+ return {
167
+ customCode: () => {
168
+ return this.eventConfig[key];
169
+ },
170
+ callback: (code) => {
171
+ // $set 而非直接赋值:存量模板的 formHostConfig 没有后加的字段(如 queryParamScript),
172
+ // 直接赋值不会变成响应式,编辑器里改完不刷新
173
+ this.$set(this.eventConfig, key, code);
174
+ this.$forceUpdate();
175
+ }
176
+ };
177
+ }
178
+ }
179
+ }
180
+ </script>
181
+
182
+ <style scoped>
183
+ .tips {
184
+ margin-left: 8px;
185
+ color: #909399;
186
+ font-size: 12px;
187
+ }
188
+ </style>
@@ -1,23 +1,22 @@
1
1
  <template>
2
2
  <el-form-item :label="i18nt('designer.setting.buttonIcon')">
3
- <el-input type="text" v-model="optionModel.icon"></el-input>
3
+ <icon-picker v-model="optionModel.icon"></icon-picker>
4
4
  </el-form-item>
5
5
  </template>
6
6
 
7
7
  <script>
8
- import i18n from "../../../../../../components/xform/utils/i18n"
9
-
10
- export default {
11
- name: "icon-editor",
12
- mixins: [i18n],
13
- props: {
14
- designer: Object,
15
- selectedWidget: Object,
16
- optionModel: Object,
17
- },
18
- }
8
+ import i18n from "@base/components/xform/utils/i18n";
9
+ import IconPicker from "@base/components/xform/icon-picker/index.vue";
10
+ export default {
11
+ name: "icon-editor",
12
+ components: { IconPicker },
13
+ mixins: [i18n],
14
+ props: {
15
+ designer: Object,
16
+ selectedWidget: Object,
17
+ optionModel: Object,
18
+ },
19
+ };
19
20
  </script>
20
21
 
21
- <style scoped>
22
-
23
- </style>
22
+ <style scoped></style>