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,722 @@
1
+ <template>
2
+ <el-drawer
3
+ v-bind="drawerConfig"
4
+ :visible.sync="showWrap"
5
+ @close="handleClose"
6
+ @closed="handleClosed"
7
+ >
8
+ <div class="fd-wrap">
9
+ <div
10
+ class="fd-cont"
11
+ v-loading="xformLoading"
12
+ :class="{ 'fd-cont--plain': plain, 'fd-cont--fill': fillHeight }"
13
+ >
14
+ <!--
15
+ designer-view + #containt 是全站渲染态样式挂载的两个钩子
16
+ (style.scss 的 `#containt .detail-wrap{...}` 与 `.preview-dialog,.designer-view{...}` 两大块),
17
+ render.vue / xform formDialog 都套了这层。抽屉不套就会丢:
18
+ 详情头右侧按钮的 inline-block(会竖排换行)、.d-item 右侧 112px 的导航占位
19
+ (导航会盖住数据表格)、.detail-wrap 的 position:relative(导航挂到 el-drawer 上被裁掉)、
20
+ 模块边框内边距。
21
+ -->
22
+ <!-- host:"list" —— 承载列表宿主页(自带「常规(详情)/列表」页签),行点击进详情、
23
+ 多标签编辑等行为与整页一致。list.vue 根节点自带 #containt,此处只补 designer-view,
24
+ 避免与下面的包裹层撞 id。抽屉只作视口,不接管其按钮。 -->
25
+ <div class="designer-view fd-list-host" v-if="listHost">
26
+ <list-view-host
27
+ ref="listHostRef"
28
+ :formCode="listFormCode"
29
+ :param="drawerParam"
30
+ />
31
+ </div>
32
+ <div id="containt" class="designer-view" v-else>
33
+ <v-form-render
34
+ v-if="showRender"
35
+ ref="vFormRef"
36
+ :class="fillHeight ? 'data-table_height' : ''"
37
+ :form-json="formJson"
38
+ :form-data="formData"
39
+ :option-data="optionData"
40
+ :global-dsv="globalDsv"
41
+ :report-template="formTemplate"
42
+ :data-id="dataId"
43
+ :conditionParam.sync="conditionParam"
44
+ :param="drawerParam"
45
+ :dataTableOption="dataTableOption || undefined"
46
+ :plain-detail-mode="plain"
47
+ :parent-target="_self"
48
+ visible-key="showRender"
49
+ @reload="reload"
50
+ @hook:mounted="handleXformMounted"
51
+ />
52
+ </div>
53
+ </div>
54
+ <!-- select 多选:已选清单条 -->
55
+ <div class="fd-checked" v-if="selectMode && selectMulti && showRender">
56
+ <el-tooltip
57
+ :enterable="false"
58
+ effect="dark"
59
+ :content="$t1('全部删除')"
60
+ placement="top"
61
+ >
62
+ <a class="allDel icon-quanbushanchu" @click="clearChecked()"></a>
63
+ </el-tooltip>
64
+ <div class="list">
65
+ <div
66
+ class="item"
67
+ v-for="(checkRow, index) in checkRows"
68
+ :key="'c' + index"
69
+ >
70
+ <p>{{ checkRow[showFormField] }}</p>
71
+ <a class="el-icon-close" @click="clearTable1Select(index)"></a>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ <div class="fd-footer dialog-footer" v-if="showFooter">
76
+ <span class="fl tips" v-if="selectMode && !selectMulti">{{
77
+ $t1("注:双击确认选择(单选)")
78
+ }}</span>
79
+ <template v-if="readonly">
80
+ <el-button type="primary" class="button-sty" @click="showWrap = false"
81
+ ><i class="el-icon-close el-icon"></i
82
+ >{{ $t2("关 闭", "system.button.close2") }}</el-button
83
+ >
84
+ </template>
85
+ <!-- 自定义按钮(formConfig.actionButtons / options.buttons):固定取消 + 配置按钮 -->
86
+ <template v-else-if="visibleFooterButtons">
87
+ <el-button
88
+ type="primary"
89
+ plain
90
+ class="button-sty"
91
+ @click="showWrap = false"
92
+ ><i class="el-icon-close el-icon"></i
93
+ >{{ $t2("取 消", "system.button.cancel2") }}</el-button
94
+ >
95
+ <el-button
96
+ v-for="btn in visibleFooterButtons"
97
+ :key="btn.code"
98
+ :type="btn.type || 'primary'"
99
+ :plain="btn.plain === true"
100
+ class="button-sty"
101
+ :loading="!!btnLoadingMap[btn.code]"
102
+ @click="handleActionButton(btn)"
103
+ ><i v-if="btn.icon" :class="[btn.icon, 'el-icon']"></i
104
+ >{{ btnLabel(btn) }}</el-button
105
+ >
106
+ </template>
107
+ <template v-else>
108
+ <el-button
109
+ type="primary"
110
+ plain
111
+ class="button-sty"
112
+ @click="showWrap = false"
113
+ ><i class="el-icon-close el-icon"></i
114
+ >{{ $t2("取 消", "system.button.cancel2") }}</el-button
115
+ >
116
+ <el-button
117
+ type="primary"
118
+ class="button-sty"
119
+ :loading="confirmLoading"
120
+ @click="handleConfirm"
121
+ ><i class="el-icon-check el-icon"></i
122
+ >{{ $t2("确 定", "system.button.confirm2") }}</el-button
123
+ >
124
+ </template>
125
+ </div>
126
+ </div>
127
+ </el-drawer>
128
+ </template>
129
+
130
+ <script>
131
+ import {
132
+ resolveActionButtons,
133
+ hasButtonPermission,
134
+ isButtonVisible,
135
+ runActionButton,
136
+ } from "../formDialog/actionButtons";
137
+ import { traverseAllWidgetsNew } from "../xform/utils/util";
138
+
139
+ export default {
140
+ name: "formCodeDrawer",
141
+ components: {
142
+ // 列表宿主页(x-tabs:常规/列表/其他页签/多标签编辑),仅 host:"list" 时加载
143
+ ListViewHost: () =>
144
+ import(
145
+ /* webpackChunkName: "form-list-host" */ "@base/views/user/form/view/list.vue"
146
+ ),
147
+ // xform 渲染器按需加载(与 formDialog 共享同一 chunk),加载前先注册 xform 扩展控件
148
+ VFormRender: () =>
149
+ import("@base/components/xform/extension/extension-loader").then(
150
+ (ext) => {
151
+ ext.loadExtension();
152
+ return import("@base/components/xform/form-render/index.vue");
153
+ }
154
+ ),
155
+ },
156
+ data() {
157
+ return {
158
+ // open() 传入的完整 options(响应式,drawerConfig 等依赖它)
159
+ openOptions: {},
160
+ title: "",
161
+ showWrap: false,
162
+ showRender: false,
163
+ xformLoading: false,
164
+ confirmLoading: false,
165
+ readonly: false,
166
+ plain: false,
167
+ showFooter: true,
168
+ formJson: {},
169
+ formData: {},
170
+ optionData: {},
171
+ globalDsv: {},
172
+ formTemplate: {},
173
+ // 详情单据 id:xform 的 loadDefaultEntityData 依赖它(entity && dataId && scriptCode 才加载)
174
+ dataId: null,
175
+ conditionParam: null,
176
+ // select 模式(查询表格选择)
177
+ selectMode: false,
178
+ selectMulti: true,
179
+ checkRows: [],
180
+ fieldKey: "id",
181
+ showFormField: "_tt",
182
+ // 自定义按钮
183
+ customButtons: null,
184
+ btnLoadingMap: {},
185
+ formRefMounted: false,
186
+ // PC 专用(不支持 H5):选择行为 / 查询参数注入 data-table
187
+ dataTableOption: null,
188
+ $grid: null,
189
+ };
190
+ },
191
+ computed: {
192
+ drawerConfig() {
193
+ let customClass = "drawer-style list-drawer form-code-drawer";
194
+ const opt = this.openOptions || {};
195
+ if (this.plain) customClass += " form-code-drawer--plain";
196
+ if (opt.customClass) customClass += " " + opt.customClass;
197
+ const config = {
198
+ title: this.$t1 ? this.$t1(this.title) : this.title,
199
+ // 列表宿主页里还要能进详情,默认给宽一点
200
+ size: opt.size || (this.listHost ? "85%" : "62%"),
201
+ direction: opt.direction || "rtl",
202
+ appendToBody: true,
203
+ wrapperClosable: false,
204
+ ...opt.drawerConfig,
205
+ customClass,
206
+ };
207
+ return config;
208
+ },
209
+ drawerParam() {
210
+ return (this.openOptions && this.openOptions.param) || undefined;
211
+ },
212
+ // host:"list" —— 用列表宿主页承载(带「常规/列表」页签),而非直接渲染单个表单
213
+ listHost() {
214
+ return (this.openOptions || {}).host === "list";
215
+ },
216
+ listFormCode() {
217
+ return (this.openOptions || {}).formCode;
218
+ },
219
+ /**
220
+ * 列表型模板(顶层唯一控件是查询表格)时撑满抽屉高度。
221
+ * 查询表格的 vxe-grid 用 height="auto",是按父元素实测高度算的,
222
+ * 父链(渲染器根 div → el-form)没有确定高度就会塌成一小块。
223
+ * 弹框里靠全局 .dialog-style .el-dialog__body .data-table_height 兜住,
224
+ * 抽屉不在该选择器下,需要本组件自己给这条链补高度。
225
+ * options.fillHeight 可强制开/关。
226
+ */
227
+ fillHeight() {
228
+ const opt = this.openOptions || {};
229
+ if (typeof opt.fillHeight === "boolean") return opt.fillHeight;
230
+ // 列表宿主页(页签 + 内部表格)必须撑满,否则页签内容区塌陷
231
+ if (this.listHost) return true;
232
+ const list = (this.formJson && this.formJson.widgetList) || [];
233
+ return (
234
+ list.length === 1
235
+ && list[0].type === "data-table"
236
+ && (list[0].options || {}).isQueryTable === true
237
+ );
238
+ },
239
+ // 自定义按钮渲染列表:权限已在 initCustomButtons 过滤,此处按 visible 脚本过滤
240
+ visibleFooterButtons() {
241
+ if (!this.customButtons || !this.customButtons.length) return null;
242
+ this.formRefMounted; // eslint-disable-line no-unused-expressions
243
+ const buttons = this.customButtons.filter((btn) =>
244
+ isButtonVisible(btn, this.$refs.vFormRef)
245
+ );
246
+ return buttons.length ? buttons : null;
247
+ },
248
+ },
249
+ methods: {
250
+ /**
251
+ * 打开抽屉。options 见 formDialog/README.md「$formDrawer」一节。
252
+ * resolve:默认按钮下 select 模式返回选中行数组、表单模式返回表单数据;
253
+ * 自定义按钮返回 {action, data};取消/关闭返回 null。
254
+ */
255
+ open(options = {}) {
256
+ this.openOptions = options;
257
+ this.title = options.title || "";
258
+ this.readonly = options.readonly === true;
259
+ this.plain = options.plain === true;
260
+ // 列表宿主页自带按钮区,抽屉底部默认不占地方(显式传 showFooter:true 才出)
261
+ this.showFooter = this.listHost
262
+ ? options.showFooter === true
263
+ : options.showFooter !== false;
264
+ this.formData = options.model || options.formData || {};
265
+ this.dataId = options.dataId != null ? options.dataId : null;
266
+ this.optionData = options.optionData || {};
267
+ this.globalDsv = options.globalDsv || {};
268
+ this.conditionParam = options.conditionParam || {};
269
+ this._beforeConfirm = options.beforeConfirm;
270
+ this._onReady = options.onReady;
271
+ this._callerButtons = Array.isArray(options.buttons)
272
+ ? options.buttons
273
+ : null;
274
+ this._settled = false;
275
+
276
+ const select = options.select;
277
+ this.selectMode = !!select;
278
+ if (select) {
279
+ this.selectMulti = select.multiple !== false;
280
+ this.checkRows = this.$baseLodash.cloneDeep(select.rows || []);
281
+ if (select.fieldKey) this.fieldKey = select.fieldKey;
282
+ this._selectOption = select;
283
+ this.initDataTableOption(select);
284
+ } else if (options.queryParam) {
285
+ // 非选择模式的查询参数:强制合并进目标表单查询表格的请求参数
286
+ this.dataTableOption = { queryParam: options.queryParam };
287
+ }
288
+
289
+ this.showWrap = true;
290
+ if (this.listHost) {
291
+ // 列表宿主页自己会加载模板;这里只在未指定标题时补取一次模板名,避免重复请求
292
+ if (!this.title) this.loadTemplate(options.formCode, true);
293
+ } else {
294
+ this.loadTemplate(options.formCode);
295
+ }
296
+ return new Promise((resolve) => {
297
+ this._resolve = resolve;
298
+ });
299
+ },
300
+ // 选择行为注入 data-table(搬自 searchFormDialog,仅 PC 分支)
301
+ initDataTableOption(select) {
302
+ this.dataTableOption = {
303
+ class: "is-pointer",
304
+ queryFormDialog: true,
305
+ queryParam: select.queryParam || undefined,
306
+ onCheckboxChange: (param) => this.addDataTable(param),
307
+ onCheckboxAll: (param) => this.checkAll(param),
308
+ onCellDblclick: (param) => this.checkWithSubmit(param),
309
+ // 数据刷新后回勾已选行
310
+ callback: () => {
311
+ if (this.checkRows.length) {
312
+ const $grid = this.getGrid();
313
+ const datas = $grid.getTableData().tableData;
314
+ const fieldKey = this.fieldKey;
315
+ this.checkRows.forEach((checkRow) => {
316
+ const row = datas.find(
317
+ (item) => item[fieldKey] == checkRow[fieldKey]
318
+ );
319
+ if (row) $grid.setCheckboxRow(row, true);
320
+ });
321
+ }
322
+ },
323
+ otherConfig: {
324
+ onFilter: () => {
325
+ this.checkRows = [];
326
+ },
327
+ },
328
+ config: {
329
+ checkboxConfig: {
330
+ checkStrictly: true,
331
+ showHeader: this.selectMulti,
332
+ trigger: "row",
333
+ },
334
+ },
335
+ };
336
+ },
337
+ reload() {
338
+ this.showRender = false;
339
+ return this.loadTemplate(this.openOptions && this.openOptions.formCode);
340
+ },
341
+ /**
342
+ * 与 formDialog xform 模式同链路:formTemplate/getByFormCode 取模板 JSON。
343
+ * @param {Boolean} titleOnly host:"list" 时只借模板名做抽屉标题,
344
+ * 渲染与按钮都由列表宿主页自己负责,不在此处初始化。
345
+ */
346
+ loadTemplate(formCode, titleOnly) {
347
+ if (!formCode) {
348
+ this.$message.error("formCode 不能为空");
349
+ return;
350
+ }
351
+ this.xformLoading = true;
352
+ this.$http({
353
+ aes: true,
354
+ url: USER_PREFIX + "/formTemplate/getByFormCode",
355
+ method: "post",
356
+ data: { stringOne: formCode },
357
+ isLoading: false,
358
+ success: (res) => {
359
+ this.xformLoading = false;
360
+ const template = res.objx || {};
361
+ const formJson = template.formViewContent
362
+ ? JSON.parse(template.formViewContent)
363
+ : {};
364
+ if (!formJson || !formJson.formConfig) {
365
+ this.$message.error(
366
+ `${this.$t2(
367
+ "表单模板不存在或内容为空",
368
+ "system.message.formTemplateEmpty"
369
+ )}: ${formCode || ""}`
370
+ );
371
+ return;
372
+ }
373
+ this.formTemplate = template;
374
+ if (!this.title) {
375
+ this.title = template.formName || template.name || "";
376
+ }
377
+ if (titleOnly) return;
378
+ this.formJson = formJson;
379
+ const formConfig = formJson.formConfig;
380
+ if (this.selectMode && !this._selectOption.fieldKey) {
381
+ this.fieldKey = formConfig.searchDialogUniqueField || this.fieldKey;
382
+ }
383
+ if (this.selectMode) {
384
+ this.initShowFormField();
385
+ }
386
+ this.initCustomButtons(formConfig, formCode);
387
+ this.showRender = true;
388
+ },
389
+ });
390
+ },
391
+ // 自定义按钮:调用方 buttons 覆盖模板 actionButtons;权限(formCode:authName)一次性过滤
392
+ initCustomButtons(formConfig, formCode) {
393
+ const buttons = resolveActionButtons(this._callerButtons, formConfig);
394
+ this.customButtons = buttons
395
+ ? buttons.filter((btn) => hasButtonPermission(btn, formCode, this))
396
+ : null;
397
+ },
398
+ handleXformMounted() {
399
+ const formRef = this.$refs.vFormRef;
400
+ if (!formRef) return;
401
+ if (this.readonly) {
402
+ formRef.setReadMode(true);
403
+ }
404
+ this.formRefMounted = true;
405
+ if (typeof this._onReady === "function") {
406
+ this._onReady(formRef, this);
407
+ }
408
+ },
409
+ btnLabel(btn) {
410
+ return this.$t1 ? this.$t1(btn.label) : btn.label;
411
+ },
412
+ handleActionButton(btn) {
413
+ const formRef = this.$refs.vFormRef;
414
+ if (!formRef || this.btnLoadingMap[btn.code]) return;
415
+ this.$set(this.btnLoadingMap, btn.code, true);
416
+ const clearLoading = () => this.$set(this.btnLoadingMap, btn.code, false);
417
+ runActionButton(btn, {
418
+ formRef,
419
+ host: this,
420
+ getSelection: () => this.checkRows,
421
+ onSettle: (payload, close) => {
422
+ this.settle(payload);
423
+ if (close) this.showWrap = false;
424
+ },
425
+ }).then(clearLoading, clearLoading);
426
+ },
427
+ // 默认确定:select 模式返回选中行;表单模式走 xform 校验返回表单数据
428
+ handleConfirm() {
429
+ if (this.selectMode) {
430
+ const rows = this.checkRows;
431
+ const select = this._selectOption || {};
432
+ if (typeof select.onConfirm === "function") {
433
+ if (select.onConfirm(rows, this.$refs.vFormRef, this) === false) {
434
+ return;
435
+ }
436
+ }
437
+ this.settle(rows);
438
+ this.showWrap = false;
439
+ return;
440
+ }
441
+ const formRef = this.$refs.vFormRef;
442
+ if (!formRef) return;
443
+ formRef.validateForm((valid) => {
444
+ if (!valid) return;
445
+ this.confirmWithData(
446
+ this.$baseLodash.cloneDeep(formRef.getFormData(false))
447
+ );
448
+ });
449
+ },
450
+ confirmWithData(data) {
451
+ if (typeof this._beforeConfirm === "function") {
452
+ this.confirmLoading = true;
453
+ Promise.resolve()
454
+ .then(() => this._beforeConfirm(data))
455
+ .then(() => {
456
+ this.confirmLoading = false;
457
+ this.settle(data);
458
+ this.showWrap = false;
459
+ })
460
+ .catch(() => {
461
+ // beforeConfirm 失败时不关闭,由调用方自行提示错误
462
+ this.confirmLoading = false;
463
+ });
464
+ } else {
465
+ this.settle(data);
466
+ this.showWrap = false;
467
+ }
468
+ },
469
+ /* ------- select 模式表格操作(搬自 searchFormDialog,仅 PC) ------- */
470
+ getDataTableWidget() {
471
+ let result = null;
472
+ traverseAllWidgetsNew(this.formJson.widgetList, (widget) => {
473
+ if (!result && widget.type == "data-table") {
474
+ result = widget;
475
+ }
476
+ });
477
+ return result;
478
+ },
479
+ getGrid() {
480
+ if (!this.$grid) {
481
+ const dataTableWidget = this.getDataTableWidget();
482
+ this.$grid = this.$refs.vFormRef
483
+ .getWidgetRef(dataTableWidget.options.name)
484
+ .getGridTable();
485
+ }
486
+ return this.$grid;
487
+ },
488
+ initShowFormField() {
489
+ const showFormField
490
+ = this.formJson.formConfig.searchDialogNameField || null;
491
+ if (!showFormField) {
492
+ const dataTableWidget = this.getDataTableWidget();
493
+ if (dataTableWidget) {
494
+ const column = (dataTableWidget.options.tableColumns || []).find(
495
+ (col) => !!col.prop
496
+ );
497
+ if (column) this.showFormField = column.prop;
498
+ }
499
+ } else {
500
+ this.showFormField = showFormField;
501
+ }
502
+ },
503
+ addDataTable(obj) {
504
+ const fieldKey = this.fieldKey;
505
+ const row = obj.row;
506
+ const $table1 = obj.$table;
507
+ if (this.selectMulti) {
508
+ const rows = this.checkRows;
509
+ if (obj.checked) {
510
+ const flag = rows.some((item) => row[fieldKey] == item[fieldKey]);
511
+ if (!flag) rows.push(obj.row);
512
+ } else {
513
+ const rowid = obj.row[fieldKey];
514
+ const delIndex = rows.findIndex(
515
+ (item) => item[fieldKey] == rowid
516
+ );
517
+ if (delIndex > -1) rows.splice(delIndex, 1);
518
+ }
519
+ } else {
520
+ $table1.clearCheckboxRow();
521
+ $table1.setCheckboxRow(obj.row, true);
522
+ this.checkRows = [obj.row];
523
+ }
524
+ if (obj.checked) {
525
+ const aRows = $table1.getTableData().visibleData;
526
+ const cRows = $table1.getCheckboxRecords();
527
+ $table1.setAllCheckboxRow(aRows.length == cRows.length);
528
+ } else {
529
+ $table1.setAllCheckboxRow(false);
530
+ }
531
+ },
532
+ checkAll(res) {
533
+ const fieldKey = this.fieldKey;
534
+ const $grid = res.$grid;
535
+ const allRows = $grid.getTableData().visibleData;
536
+ $grid.setCheckboxRow(allRows, res.checked);
537
+ allRows.forEach((lineData) => {
538
+ const rowid = lineData[fieldKey];
539
+ const exist = this.checkRows.find((item) => item[fieldKey] == rowid);
540
+ if (res.checked) {
541
+ if (!exist) this.checkRows.push(lineData);
542
+ } else if (exist) {
543
+ const delIndex = this.checkRows.findIndex(
544
+ (item) => item[fieldKey] == rowid
545
+ );
546
+ if (delIndex > -1) this.checkRows.splice(delIndex, 1);
547
+ }
548
+ });
549
+ },
550
+ clearTable1Select(index) {
551
+ const fieldKey = this.fieldKey;
552
+ const row = this.checkRows[index];
553
+ const rowid = row[fieldKey];
554
+ const $grid1 = this.getGrid();
555
+ const rows = $grid1.getTableData().visibleData;
556
+ const row2 = this.findTreeRowById(rows, rowid);
557
+ if (this.selectMulti) {
558
+ if (row2) $grid1.setCheckboxRow(row2, false);
559
+ } else {
560
+ $grid1.clearCheckboxRow();
561
+ }
562
+ this.checkRows.splice(index, 1);
563
+ if (row2) $grid1.setAllCheckboxRow(false);
564
+ },
565
+ clearChecked() {
566
+ const $grid1 = this.getGrid();
567
+ $grid1.clearCheckboxRow();
568
+ this.checkRows = [];
569
+ },
570
+ findTreeRowById(rows, rowid) {
571
+ const fieldKey = this.fieldKey;
572
+ for (let i = 0; i < rows.length; i++) {
573
+ const row = rows[i];
574
+ if (row[fieldKey] == rowid) return row;
575
+ if (row.children) {
576
+ const mRow = this.findTreeRowById(row.children, rowid);
577
+ if (mRow) return mRow;
578
+ }
579
+ }
580
+ return null;
581
+ },
582
+ // 单选双击直接确认
583
+ checkWithSubmit(obj) {
584
+ if (this.selectMode && !this.selectMulti) {
585
+ const $grid1 = obj.$table || this.getGrid();
586
+ const rows = $grid1.getCheckboxRecords(true);
587
+ if (rows && rows.length) {
588
+ this.handleConfirm();
589
+ }
590
+ }
591
+ },
592
+ /* ------- 生命周期收口(同 formDialog) ------- */
593
+ settle(value) {
594
+ if (this._settled) return;
595
+ this._settled = true;
596
+ if (this._resolve) {
597
+ this._resolve(value);
598
+ }
599
+ },
600
+ handleClose() {
601
+ // 取消/右上角关闭:resolve(null);确认路径已先 settle,此处不生效
602
+ this.settle(null);
603
+ },
604
+ handleClosed() {
605
+ this.$destroy();
606
+ if (this.$el && this.$el.parentNode) {
607
+ this.$el.parentNode.removeChild(this.$el);
608
+ }
609
+ },
610
+ },
611
+ };
612
+ </script>
613
+
614
+ <style lang="scss" scoped>
615
+ .fd-wrap {
616
+ height: 100%;
617
+ display: flex;
618
+ flex-direction: column;
619
+ overflow: hidden;
620
+
621
+ .fd-cont {
622
+ flex: 1;
623
+ min-height: 0;
624
+ overflow: auto;
625
+ padding: 0 12px;
626
+
627
+ ::v-deep .grid-height {
628
+ height: 100% !important;
629
+ }
630
+
631
+ // 页面里靠 `#app #containt.designer-view` 抹掉这层白底投影,
632
+ // 抽屉是 appendToBody 挂在 #app 外面的,得自己抹
633
+ #containt.designer-view {
634
+ background: none;
635
+ box-shadow: none;
636
+ }
637
+
638
+ // 容器(detail-wrap/栅格/h5-card)的 1px dashed 是设计器里的辅助线,
639
+ // 渲染态不该出现。全局只在 .dialog-style 弹框体和 tabs 内容区里清掉了
640
+ // (style.scss 的两处 .designer-view .grid-container{outline:none}),
641
+ // 抽屉不在这两个上下文下,需要自己清。
642
+ ::v-deep .grid-container {
643
+ outline: none;
644
+ }
645
+
646
+ // 列表宿主页(host:"list"):把高度沿 designer-view → #containt(list.vue 根) 传下去。
647
+ // .tab-box 自身已是 height:100%,但父链没高度时页签内容区会塌成一条。
648
+ .fd-list-host {
649
+ height: 100%;
650
+
651
+ ::v-deep #containt {
652
+ height: 100%;
653
+ }
654
+ }
655
+
656
+ // 列表型模板:把确定高度一路传到 vxe-grid 的父元素,表格才能铺满抽屉
657
+ &.fd-cont--fill {
658
+ overflow: hidden;
659
+
660
+ ::v-deep .data-table_height {
661
+ height: 100%;
662
+
663
+ > .render-form {
664
+ height: 100%;
665
+ }
666
+ }
667
+ }
668
+ }
669
+
670
+ .fd-checked {
671
+ flex-shrink: 0;
672
+ display: flex;
673
+ align-items: center;
674
+ padding: 4px 12px;
675
+ border-top: 1px solid #ebeef5;
676
+ overflow: hidden;
677
+
678
+ .allDel {
679
+ flex-shrink: 0;
680
+ margin-right: 8px;
681
+ cursor: pointer;
682
+ }
683
+
684
+ .list {
685
+ flex: 1;
686
+ display: flex;
687
+ overflow-x: auto;
688
+ white-space: nowrap;
689
+
690
+ .item {
691
+ display: inline-flex;
692
+ align-items: center;
693
+ margin-right: 8px;
694
+ padding: 0 6px;
695
+ background: #f4f6fa;
696
+ border-radius: 2px;
697
+
698
+ p {
699
+ margin: 0 4px 0 0;
700
+ }
701
+
702
+ a {
703
+ cursor: pointer;
704
+ }
705
+ }
706
+ }
707
+ }
708
+
709
+ .fd-footer {
710
+ flex-shrink: 0;
711
+ text-align: right;
712
+ padding: 10px 16px;
713
+ border-top: 1px solid #ebeef5;
714
+
715
+ .tips {
716
+ line-height: 28px;
717
+ color: #909399;
718
+ font-size: 12px;
719
+ }
720
+ }
721
+ }
722
+ </style>