cloud-web-corejs 1.0.276 → 1.0.277

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 (305) hide show
  1. package/package.json +28 -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/luckysheet/dialog.vue +1 -1
  7. package/src/components/micro-view-host/contract.js +66 -0
  8. package/src/components/micro-view-host/index.vue +148 -0
  9. package/src/components/table/tableForm.vue +16 -5
  10. package/src/components/table/tableFormMixin.js +35 -7
  11. package/src/components/vb-tabs/x-tabs.vue +167 -143
  12. package/src/components/wf/content.vue +14 -0
  13. package/src/components/wf/content2.vue +4 -2
  14. package/src/components/wf/wf.js +74 -23
  15. package/src/components/wf/wfActionDropdown.vue +85 -0
  16. package/src/components/wf/wfActionItems.js +136 -0
  17. package/src/components/wf/wfAutoConfirm.js +55 -0
  18. package/src/components/wf/wfButtonName.js +60 -0
  19. package/src/components/wf/wfUserRange.js +53 -0
  20. package/src/components/wf/wfUtil.js +373 -295
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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
  28. package/src/components/xform/form-designer/designer.js +2085 -2025
  29. package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +9 -11
  30. package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +76 -75
  31. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +10 -4
  32. package/src/components/xform/form-designer/form-widget/container-widget/detail-plain-widget.vue +76 -0
  33. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +59 -5
  34. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +38 -17
  35. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +138 -13
  36. package/src/components/xform/form-designer/form-widget/dialog/formFieldDialog.vue +1 -1
  37. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1774 -1772
  38. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +2 -3
  39. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +1 -1
  40. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +66 -53
  41. package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +287 -214
  42. package/src/components/xform/form-designer/form-widget/field-widget/button-widget.vue +76 -66
  43. package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +208 -124
  44. package/src/components/xform/form-designer/form-widget/field-widget/census-widget.vue +3 -9
  45. package/src/components/xform/form-designer/form-widget/field-widget/copy_button-widget.vue +11 -2
  46. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +7 -6
  47. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +43 -19
  48. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +680 -372
  49. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +879 -763
  50. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +17 -2
  51. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +3 -9
  52. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +3 -9
  53. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js +3 -9
  54. package/src/components/xform/form-designer/form-widget/field-widget/mixins/relative-default-mixin.js +107 -0
  55. package/src/components/xform/form-designer/form-widget/field-widget/mixins/relativeDateUtil.js +321 -0
  56. package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -0
  57. package/src/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin.js +13 -0
  58. package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +13 -8
  59. package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +4 -9
  60. package/src/components/xform/form-designer/form-widget/field-widget/save_submit_wf_button-widget.vue +3 -0
  61. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +120 -120
  62. package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +4 -0
  63. package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +11 -0
  64. package/src/components/xform/form-designer/form-widget/field-widget/switch-widget.vue +9 -1
  65. package/src/components/xform/form-designer/form-widget/field-widget/tempStorage-widget.vue +1 -1
  66. package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +7 -3
  67. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +4 -2
  68. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +36 -5
  69. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +338 -374
  70. package/src/components/xform/form-designer/form-widget/index.vue +6 -1
  71. package/src/components/xform/form-designer/form-widget/indexMixin.js +29 -25
  72. package/src/components/xform/form-designer/index.vue +194 -191
  73. package/src/components/xform/form-designer/indexMixin.js +860 -847
  74. package/src/components/xform/form-designer/setting-panel/dataSource-setting.vue +397 -397
  75. package/src/components/xform/form-designer/setting-panel/form-dynamicField-setting.vue +602 -601
  76. package/src/components/xform/form-designer/setting-panel/form-setting.vue +1790 -1483
  77. package/src/components/xform/form-designer/setting-panel/index.vue +2 -7
  78. package/src/components/xform/form-designer/setting-panel/indexMixin.js +370 -335
  79. package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +585 -544
  80. package/src/components/xform/form-designer/setting-panel/property-editor/a-link-editor.vue +1 -1
  81. package/src/components/xform/form-designer/setting-panel/property-editor/a-text-editor.vue +1 -1
  82. package/src/components/xform/form-designer/setting-panel/property-editor/alignType-editor.vue +1 -1
  83. package/src/components/xform/form-designer/setting-panel/property-editor/buttonIcon-editor.vue +14 -15
  84. package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +1 -1
  85. package/src/components/xform/form-designer/setting-panel/property-editor/colorClass-editor.vue +1 -1
  86. package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +3 -3
  87. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +124 -125
  88. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +1151 -957
  89. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +96 -74
  90. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-plain/detail-plain-editor.vue +75 -0
  91. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/colHeight-editor.vue +1 -1
  92. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +14 -13
  93. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-height-editor.vue +1 -1
  94. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
  95. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
  96. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
  97. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-span-editor.vue +4 -4
  98. package/src/components/xform/form-designer/setting-panel/property-editor/container-h5-card/h5-card-editor.vue +124 -124
  99. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +26 -31
  100. package/src/components/xform/form-designer/setting-panel/property-editor/container-panel/height-editor.vue +1 -1
  101. package/src/components/xform/form-designer/setting-panel/property-editor/container-panel/width-editor.vue +1 -1
  102. package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tab-customClass-editor.vue +119 -119
  103. package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tabClass-editor.vue +45 -45
  104. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +340 -342
  105. package/src/components/xform/form-designer/setting-panel/property-editor/container-table-cell/cellHeight-editor.vue +1 -1
  106. package/src/components/xform/form-designer/setting-panel/property-editor/container-table-cell/cellWidth-editor.vue +1 -1
  107. package/src/components/xform/form-designer/setting-panel/property-editor/container-tree/tree-customClass-editor.vue +2 -2
  108. package/src/components/xform/form-designer/setting-panel/property-editor/container-tree-pane/tree-pane-editor.vue +1 -1
  109. package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/cancelButtonLabel-editor.vue +1 -1
  110. package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/okButtonLabel-editor.vue +1 -1
  111. package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/title-editor.vue +1 -1
  112. package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/width-editor.vue +1 -1
  113. package/src/components/xform/form-designer/setting-panel/property-editor/containerClass-editor.vue +1 -1
  114. package/src/components/xform/form-designer/setting-panel/property-editor/customClass-editor.vue +1 -1
  115. package/src/components/xform/form-designer/setting-panel/property-editor/defaultValue-editor.vue +1 -1
  116. package/src/components/xform/form-designer/setting-panel/property-editor/descriptionsItems-editor.vue +4 -4
  117. package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +3 -3
  118. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +6 -2
  119. package/src/components/xform/form-designer/setting-panel/property-editor/dsName-editor.vue +1 -1
  120. package/src/components/xform/form-designer/setting-panel/property-editor/echartHeight-editor.vue +1 -1
  121. package/src/components/xform/form-designer/setting-panel/property-editor/endPlaceholder-editor.vue +1 -1
  122. package/src/components/xform/form-designer/setting-panel/property-editor/field-accessUrl/accessUrl-editor.vue +2 -2
  123. package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaDataType-editor.vue +1 -1
  124. package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaMinLevel-editor.vue +50 -50
  125. package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaName-editor.vue +1 -1
  126. package/src/components/xform/form-designer/setting-panel/property-editor/field-autocomplete/autocomplete-vabSearchName-editor.vue +7 -7
  127. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/addTableData-event-editor.vue +84 -85
  128. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/button-type-editor.vue +1 -1
  129. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindActions.js +262 -0
  130. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindEvent-editor.vue +97 -88
  131. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/form-host-event-editor.vue +188 -0
  132. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/icon-editor.vue +14 -15
  133. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +27 -10
  134. package/src/components/xform/form-designer/setting-panel/property-editor/field-cascader/checkStrictly-editor.vue +11 -13
  135. package/src/components/xform/form-designer/setting-panel/property-editor/field-common/keyName-editor.vue +74 -67
  136. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-dateLimit-editor.vue +27 -5
  137. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +35 -18
  138. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-format-editor.vue +1 -1
  139. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-type-editor.vue +1 -1
  140. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-valueFormat-editor.vue +1 -1
  141. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +1 -1
  142. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +35 -18
  143. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-format-editor.vue +1 -1
  144. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-type-editor.vue +1 -1
  145. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-valueFormat-editor.vue +1 -1
  146. package/src/components/xform/form-designer/setting-panel/property-editor/field-divider/contentPosition-editor.vue +1 -1
  147. package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -59
  148. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +11 -11
  149. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +10 -10
  150. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +12 -12
  151. package/src/components/xform/form-designer/setting-panel/property-editor/field-file-upload/file-upload-fileTypes-editor.vue +44 -44
  152. package/src/components/xform/form-designer/setting-panel/property-editor/field-html-text/htmlContent-editor.vue +29 -29
  153. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +6 -6
  154. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +4 -4
  155. package/src/components/xform/form-designer/setting-panel/property-editor/field-number/controlsPosition-editor.vue +1 -1
  156. package/src/components/xform/form-designer/setting-panel/property-editor/field-picture-upload/picture-upload-fileTypes-editor.vue +44 -44
  157. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +115 -115
  158. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +115 -115
  159. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/highThreshold-editor.vue +1 -1
  160. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/lowThreshold-editor.vue +1 -1
  161. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
  162. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-max-editor.vue +1 -1
  163. package/src/components/xform/form-designer/setting-panel/property-editor/field-script/script-editor.vue +4 -4
  164. package/src/components/xform/form-designer/setting-panel/property-editor/field-script-input/script-input-editor.vue +4 -4
  165. package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/fontSize-editor.vue +1 -1
  166. package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/textContent-editor.vue +1 -1
  167. package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +3 -3
  168. package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/activeText-editor.vue +1 -1
  169. package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/inactiveText-editor.vue +1 -1
  170. package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/switchWidth-editor.vue +1 -1
  171. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-button-editor.vue +2 -2
  172. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +74 -74
  173. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +3 -3
  174. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +34 -18
  175. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-format-editor.vue +1 -1
  176. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-timeLimit-editor.vue +53 -0
  177. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +35 -18
  178. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-format-editor.vue +1 -1
  179. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchField-editor.vue +2 -2
  180. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +2 -2
  181. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +1 -1
  182. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +1 -1
  183. package/src/components/xform/form-designer/setting-panel/property-editor/field-vue-page/vue-page-editor.vue +2 -2
  184. package/src/components/xform/form-designer/setting-panel/property-editor/fileMaxSize-editor.vue +1 -1
  185. package/src/components/xform/form-designer/setting-panel/property-editor/fileTypesSelect.vue +176 -176
  186. package/src/components/xform/form-designer/setting-panel/property-editor/fixedQuery-editor.vue +39 -0
  187. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +41 -6
  188. package/src/components/xform/form-designer/setting-panel/property-editor/formatType-editor.vue +2 -2
  189. package/src/components/xform/form-designer/setting-panel/property-editor/formula-editor.vue +972 -972
  190. package/src/components/xform/form-designer/setting-panel/property-editor/iconClass-editor.vue +1 -1
  191. package/src/components/xform/form-designer/setting-panel/property-editor/label-editor.vue +1 -1
  192. package/src/components/xform/form-designer/setting-panel/property-editor/labelAlign-editor.vue +1 -1
  193. package/src/components/xform/form-designer/setting-panel/property-editor/labelColor-editor.vue +1 -1
  194. package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +1 -1
  195. package/src/components/xform/form-designer/setting-panel/property-editor/labelWidth-editor.vue +1 -1
  196. package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
  197. package/src/components/xform/form-designer/setting-panel/property-editor/max-editor.vue +1 -1
  198. package/src/components/xform/form-designer/setting-panel/property-editor/maxLength-editor.vue +1 -1
  199. package/src/components/xform/form-designer/setting-panel/property-editor/min-editor.vue +1 -1
  200. package/src/components/xform/form-designer/setting-panel/property-editor/minLength-editor.vue +1 -1
  201. package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
  202. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +15 -4
  203. package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +3 -3
  204. package/src/components/xform/form-designer/setting-panel/property-editor/placeholder-editor.vue +1 -1
  205. package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +1 -1
  206. package/src/components/xform/form-designer/setting-panel/property-editor/prefixIcon-editor.vue +14 -15
  207. package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +6 -6
  208. package/src/components/xform/form-designer/setting-panel/property-editor/relative-default-block.vue +369 -0
  209. package/src/components/xform/form-designer/setting-panel/property-editor/requiredHint-editor.vue +1 -1
  210. package/src/components/xform/form-designer/setting-panel/property-editor/rows-editor.vue +1 -1
  211. package/src/components/xform/form-designer/setting-panel/property-editor/space-editor-editor.vue +1 -1
  212. package/src/components/xform/form-designer/setting-panel/property-editor/startPlaceholder-editor.vue +1 -1
  213. package/src/components/xform/form-designer/setting-panel/property-editor/step-editor.vue +1 -1
  214. package/src/components/xform/form-designer/setting-panel/property-editor/styleTableClass-editor.vue +1 -1
  215. package/src/components/xform/form-designer/setting-panel/property-editor/styleTitClass-editor.vue +1 -1
  216. package/src/components/xform/form-designer/setting-panel/property-editor/suffixIcon-editor.vue +14 -15
  217. package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue +1 -1
  218. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +2 -3
  219. package/src/components/xform/form-designer/setting-panel/property-editor/type-editor.vue +1 -1
  220. package/src/components/xform/form-designer/setting-panel/property-editor/uploadTip-editor.vue +1 -1
  221. package/src/components/xform/form-designer/setting-panel/property-editor/uploadURL-editor.vue +1 -1
  222. package/src/components/xform/form-designer/setting-panel/property-editor/urlValueEnabled-editor.vue +91 -0
  223. package/src/components/xform/form-designer/setting-panel/property-editor/validation-editor.vue +1 -1
  224. package/src/components/xform/form-designer/setting-panel/property-editor/validationHint-editor.vue +1 -1
  225. package/src/components/xform/form-designer/setting-panel/property-editor/widgetWidth-editor.vue +1 -1
  226. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +374 -351
  227. package/src/components/xform/form-designer/toolbar-panel/index.vue +266 -103
  228. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +655 -589
  229. package/src/components/xform/form-designer/widget-panel/index.vue +391 -341
  230. package/src/components/xform/form-designer/widget-panel/indexMixin.js +351 -308
  231. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +4642 -4028
  232. package/src/components/xform/form-render/container-item/containerItemMixin.js +76 -61
  233. package/src/components/xform/form-render/container-item/data-table-item.vue +24 -13
  234. package/src/components/xform/form-render/container-item/data-table-mixin.js +5927 -3400
  235. package/src/components/xform/form-render/container-item/detail-h5-item.vue +173 -173
  236. package/src/components/xform/form-render/container-item/detail-item.vue +446 -224
  237. package/src/components/xform/form-render/container-item/detail-plain-item.vue +92 -0
  238. package/src/components/xform/form-render/container-item/list-h5-item.vue +1186 -411
  239. package/src/components/xform/form-render/container-item/tab-item.vue +129 -125
  240. package/src/components/xform/form-render/container-item/table-item.vue +0 -3
  241. package/src/components/xform/form-render/container-item/table2-item.vue +18 -10
  242. package/src/components/xform/form-render/dynamicDialogRender.js +140 -99
  243. package/src/components/xform/form-render/index.vue +8 -8
  244. package/src/components/xform/form-render/indexMixin.js +5299 -3766
  245. package/src/components/xform/form-render/refMixin.js +14 -11
  246. package/src/components/xform/lang/en-US.js +473 -438
  247. package/src/components/xform/lang/en-US_extension.js +4 -0
  248. package/src/components/xform/lang/zh-CN.js +646 -620
  249. package/src/components/xform/mixins/defaultHandle.js +363 -26
  250. package/src/components/xform/mixins/scriptHttp.js +54 -51
  251. package/src/components/xform/utils/attachmentValueUtil.js +239 -0
  252. package/src/components/xform/utils/fixedQueryUtil.js +93 -0
  253. package/src/components/xform/utils/format.js +195 -169
  254. package/src/components/xform/utils/queryParamUtil.js +84 -0
  255. package/src/components/xform/utils/tableColumnHelper.js +7 -8
  256. package/src/components/xform/utils/util.js +1663 -1551
  257. package/src/components/xform/utils/validators.js +100 -48
  258. package/src/index.js +403 -89
  259. package/src/layout/components/AppMain.vue +147 -119
  260. package/src/layout/components/Sidebar/default.vue +109 -59
  261. package/src/layout/components/TagsView/index.vue +1 -1
  262. package/src/layout/components/extractedCode/queryDialog.vue +33 -26
  263. package/src/layout/components/extractedCode/viewDialog.vue +207 -193
  264. package/src/layout/components/langTool.vue +128 -123
  265. package/src/layout/defaultLayout.vue +170 -158
  266. package/src/mixins/wf/index.js +40 -38
  267. package/src/public-path.js +38 -0
  268. package/src/router/modules/system.js +4 -0
  269. package/src/store/config/index.js +945 -669
  270. package/src/utils/pdfUtil.js +428 -70
  271. package/src/views/bd/setting/bd_company_env/dialog.vue +1 -1
  272. package/src/views/bd/setting/formVersion/button.vue +5 -0
  273. package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +21 -10
  274. package/src/views/bd/setting/formVersion/link.vue +5 -0
  275. package/src/views/bd/setting/form_script/edit.vue +1 -0
  276. package/src/views/bd/setting/form_script/edit1.vue +1 -0
  277. package/src/views/bd/setting/form_script/form_list.vue +1 -0
  278. package/src/views/bd/setting/form_script/list.vue +1 -0
  279. package/src/views/bd/setting/form_script/list1.vue +2 -0
  280. package/src/views/bd/setting/form_template/edit.vue +1 -0
  281. package/src/views/bd/setting/form_template/list.vue +2 -0
  282. package/src/views/bd/setting/form_template/mixins/edit.js +77 -74
  283. package/src/views/bd/setting/table_model/edit.vue +16 -29
  284. package/src/views/bd/setting/table_model/list.vue +1 -0
  285. package/src/views/bd/setting/table_model/mixins/edit.js +295 -149
  286. package/src/views/bd/setting/table_model/mixins/zdDialog.js +32 -0
  287. package/src/views/support/export_template/list.vue +1 -1
  288. package/src/views/user/company_info/edit.vue +149 -88
  289. package/src/views/user/form/form_template/dialog.vue +1 -1
  290. package/src/views/user/form/form_template/itemList.vue +1 -1
  291. package/src/views/user/form/form_template/list.vue +1 -1
  292. package/src/views/user/form/form_template_field/dialog.vue +1 -1
  293. package/src/views/user/form/form_type/dialog.vue +1 -1
  294. package/src/views/user/form/form_type/list.vue +1 -1
  295. package/src/views/user/form/report_requestaccess/dialog.vue +1 -1
  296. package/src/views/user/form/report_requestaccess/list.vue +1 -1
  297. package/src/views/user/form/vform/designer.vue +51 -22
  298. package/src/views/user/form/vform/render.vue +21 -23
  299. package/src/views/user/form/view/list.vue +134 -37
  300. package/src/views/user/wf/wfReport/index.vue +24 -1
  301. package/src/views/user/wf/wf_manage/list.vue +8 -4
  302. package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +0 -209
  303. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin - /345/211/257/346/234/254.js" +0 -1639
  304. package/src/views/bd/setting/table_model/mixins/edit copy.js +0 -903
  305. package/src/views/user/menu/voc_list.vue +0 -686
@@ -1,763 +1,879 @@
1
- <!--
2
- /**
3
- * author: vformAdmin
4
- * email: vdpadmin@163.com
5
- * website: https://www.vform666.com
6
- * date: 2021.08.18
7
- * remark: 如果要分发VForm源码,需在本文件顶部保留此文件头信息!!
8
- */
9
- -->
10
-
11
- <template>
12
- <div
13
- class="field-wrapper"
14
- :class="{ 'design-time-bottom-margin': !!this.designer }"
15
- v-show="!field.options.hidden || designState === true"
16
- >
17
- <div>
18
- <template v-if="formItemProp === 'false'">
19
- <template v-if="!field.options.hidden">
20
- <template v-if="isShowWidget()">
21
- <slot></slot>
22
- </template>
23
- <template
24
- v-else-if="
25
- field.options.widgetTextFlag === 3 &&
26
- field.options.widgetTextLinkConfig
27
- "
28
- >
29
- <div class="ellipsis">
30
- <a
31
- class="a-link"
32
- :class="getWidgetClass()"
33
- @click.native="handleClick"
34
- >
35
- <span>
36
- <i
37
- :class="
38
- field.options.widgetTextLinkConfig.options.prefixIcon
39
- "
40
- v-if="
41
- !!field.options.widgetTextLinkConfig.options.prefixIcon
42
- "
43
- ></i>
44
- <span>{{ getWidgetValue() }}</span>
45
- <i
46
- :class="
47
- field.options.widgetTextLinkConfig.options.suffixIcon
48
- "
49
- v-if="
50
- !!field.options.widgetTextLinkConfig.options.suffixIcon
51
- "
52
- ></i>
53
- </span>
54
- </a>
55
- </div>
56
- </template>
57
- <template v-else>
58
- <span>{{ getShowValue() }}</span>
59
- </template>
60
- </template>
61
- </template>
62
- <template v-else>
63
- <el-form-item
64
- v-if="
65
- !!field.formItemFlag &&
66
- (!field.options.hidden || designState === true)
67
- "
68
- :label="label"
69
- :label-width="labelWidth"
70
- :rules="getRules()"
71
- :prop="getPropName()"
72
- :class="[
73
- selected ? 'selected' : '',
74
- labelAlign,
75
- customClass,
76
- field.options.required ? 'required' : '',
77
- ]"
78
- @click.native.stop="selectField(field)"
79
- >
80
- <span
81
- v-if="!!field.options.labelIconClass"
82
- slot="label"
83
- class="custom-label"
84
- >
85
- <template v-if="field.options.labelIconPosition === 'front'">
86
- <template v-if="!!field.options.labelTooltip">
87
- <el-tooltip
88
- :content="field.options.labelTooltip"
89
- effect="dark"
90
- popper-class="label-tooltip-pre-line"
91
- >
92
- <i :class="field.options.labelIconClass"></i></el-tooltip
93
- ><span :style="{ color: field.options.labelColor }">{{
94
- label
95
- }}</span></template
96
- >
97
- <template v-else>
98
- <i :class="field.options.labelIconClass"></i
99
- ><span :style="{ color: field.options.labelColor }">{{
100
- label
101
- }}</span></template
102
- >
103
- </template>
104
- <template v-else-if="field.options.labelIconPosition === 'rear'">
105
- <template v-if="!!field.options.labelTooltip">
106
- <span :style="{ color: field.options.labelColor }">{{
107
- label
108
- }}</span
109
- ><el-tooltip
110
- :content="field.options.labelTooltip"
111
- effect="dark"
112
- popper-class="label-tooltip-pre-line"
113
- >
114
- <i :class="field.options.labelIconClass"></i></el-tooltip
115
- ></template>
116
- <template v-else>
117
- <span :style="{ color: field.options.labelColor }">{{
118
- label
119
- }}</span
120
- ><i :class="field.options.labelIconClass"></i
121
- ></template>
122
- </template>
123
- </span>
124
- <span
125
- v-else-if="!!field.options.labelColor"
126
- slot="label"
127
- :style="{ color: field.options.labelColor }"
128
- >
129
- {{ label }}
130
- </span>
131
- <template v-if="isShowWidget()">
132
- <slot></slot>
133
- </template>
134
- <template
135
- v-else-if="
136
- field.options.widgetTextFlag === 3 &&
137
- field.options.widgetTextLinkConfig
138
- "
139
- >
140
- <div class="ellipsis">
141
- <a class="a-link" :class="getWidgetClass()" @click="handleClick">
142
- <span>
143
- <i
144
- :class="
145
- field.options.widgetTextLinkConfig.options.prefixIcon
146
- "
147
- v-if="
148
- !!field.options.widgetTextLinkConfig.options.prefixIcon
149
- "
150
- ></i>
151
- <span>{{ getWidgetValue() }}</span>
152
- <i
153
- :class="
154
- field.options.widgetTextLinkConfig.options.suffixIcon
155
- "
156
- v-if="
157
- !!field.options.widgetTextLinkConfig.options.suffixIcon
158
- "
159
- ></i>
160
- </span>
161
- </a>
162
- </div>
163
- </template>
164
- <template v-else>
165
- <span>{{ getShowValue() }}</span>
166
- </template>
167
- </el-form-item>
168
- </template>
169
- </div>
170
- <template v-if="!!this.designer">
171
- <div class="field-action" v-if="designer.selectedId === field.id">
172
- <i
173
- class="el-icon-back"
174
- :title="i18nt('designer.hint.selectParentWidget')"
175
- @click.stop="selectParentWidget(field)"
176
- ></i>
177
- <i
178
- class="el-icon-top"
179
- v-if="!!parentList && parentList.length > 1"
180
- :title="i18nt('designer.hint.moveUpWidget')"
181
- @click.stop="moveUpWidget(field)"
182
- ></i>
183
- <i
184
- class="el-icon-bottom"
185
- v-if="!!parentList && parentList.length > 1"
186
- :title="i18nt('designer.hint.moveDownWidget')"
187
- @click.stop="moveDownWidget(field)"
188
- ></i>
189
- <i
190
- class="el-icon-delete"
191
- :title="i18nt('designer.hint.remove')"
192
- @click.stop="removeFieldWidget"
193
- ></i>
194
- </div>
195
-
196
- <div
197
- class="drag-handler background-opacity"
198
- v-if="designer.selectedId === field.id"
199
- >
200
- <i class="el-icon-rank" :title="i18nt('designer.hint.dragHandler')"></i>
201
- <i>{{
202
- i18n2t(
203
- `designer.widgetLabel.${field.type}`,
204
- `extension.widgetLabel.${field.type}`
205
- )
206
- }}</i>
207
- <i v-if="field.options.hidden === true" class="iconfont icon-hide"></i>
208
- </div>
209
- </template>
210
- </div>
211
- </template>
212
-
213
- <script>
214
- import i18n from "../../../../../components/xform/utils/i18n";
215
- import {
216
- getSubFormNameByFieldId,
217
- isVabsearchMultiWidget,
218
- } from "../../../../../components/xform/utils/util";
219
- import {
220
- compareToList,
221
- resolveTextMaskFlag,
222
- } from "../../../../../components/xform/utils/textMaskUtil";
223
-
224
- export default {
225
- name: "form-item-wrapper",
226
- mixins: [i18n],
227
- props: {
228
- field: Object,
229
- designer: Object,
230
- parentWidget: Object,
231
- parentList: Array,
232
- indexOfParentList: Number,
233
-
234
- designState: {
235
- type: Boolean,
236
- default: false,
237
- },
238
- subFormRowIndex: {
239
- /* 子表单组件行索引,从0开始计数 */ type: Number,
240
- default: -1,
241
- },
242
- subFormColIndex: {
243
- /* 子表单组件列索引,从0开始计数 */ type: Number,
244
- default: -1,
245
- },
246
- subFormRowId: {
247
- /* 子表单组件行Id,唯一id且不可变 */ type: String,
248
- default: "",
249
- },
250
-
251
- rules: Array,
252
- },
253
- inject: [
254
- "getFormConfig",
255
- "getSubFormFieldFlag",
256
- "getSubFormName",
257
- "tableParam",
258
- "formItemProp",
259
- "getObjectFieldFlag",
260
- "getObjectName",
261
- ],
262
- data() {
263
- return {
264
- encryptFormula: null,
265
- };
266
- },
267
- computed: {
268
- formConfig: function () {
269
- return this.getFormConfig();
270
- },
271
- selected() {
272
- return !!this.designer && this.field.id === this.designer.selectedId;
273
- },
274
-
275
- label() {
276
- if (this.shouldHideFieldLabel()) {
277
- return "";
278
- }
279
- return this.getI18nLabel(this.field.options.label);
280
- // let label = this.field.options.label
281
- // return label ? this.$t2(label) : label;
282
- },
283
-
284
- labelWidth() {
285
- if (this.shouldHideFieldLabel()) {
286
- return (!!this.designState ? 5 : 0) + "px"; //设计期间标签最小宽度5像素,以便于鼠标点击可选中组件!!
287
- }
288
-
289
- if (!!this.field.options.labelWidth) {
290
- return this.field.options.labelWidth + "px !important";
291
- }
292
-
293
- if (!!this.designer) {
294
- return this.designer.formConfig.labelWidth + "px";
295
- } else {
296
- return this.formConfig.labelWidth + "px";
297
- }
298
- },
299
-
300
- labelAlign() {
301
- if (!this?.field?.options?.labelAlign) {
302
- return "";
303
- }
304
- if (!!this.field.options.labelAlign) {
305
- return this.field.options.labelAlign;
306
- }
307
-
308
- if (!!this.designer) {
309
- return this.designer.formConfig.labelAlign || "label-left-align";
310
- } else {
311
- return this.formConfig.labelAlign || "label-left-align";
312
- }
313
- },
314
-
315
- customClass() {
316
- return !!this.field.options.customClass
317
- ? this.field.options.customClass.join(" ")
318
- : "";
319
- },
320
-
321
- subFormName() {
322
- return !!this.parentWidget ? this.parentWidget.options.name : "";
323
- },
324
-
325
- subFormItemFlag() {
326
- return (
327
- this.isSubFormItem() ||
328
- (!!this.parentWidget ? this.parentWidget.type === "sub-form" : false)
329
- );
330
- },
331
- },
332
- created() {
333
- //
334
- this.initShowType();
335
- },
336
- methods: {
337
- shouldHideFieldLabel() {
338
- if (!!this.field.options.labelHidden) {
339
- return true;
340
- }
341
- // 仅 VXE 数据表格列内字段隐藏标签(表头已展示列名);table2/table 等仍显示标签
342
- return this.isDataTableColumnItem();
343
- },
344
- isDataTableColumnItem() {
345
- return !!this.tableParam?.$table?.$parent?.$parent;
346
- },
347
- isSubFormItem() {
348
- return !!this.tableParam;
349
- },
350
- selectField(field) {
351
- if (!!this.designer) {
352
- this.designer.setSelected(field);
353
- this.designer.emitEvent("field-selected", this.parentWidget); //发送选中组件的父组件对象
354
- }
355
- },
356
-
357
- selectParentWidget() {
358
- if (this.parentWidget) {
359
- this.designer.setSelected(this.parentWidget);
360
- } else {
361
- this.designer.clearSelected();
362
- }
363
- },
364
-
365
- moveUpWidget() {
366
- this.designer.moveUpWidget(this.parentList, this.indexOfParentList);
367
- this.designer.emitHistoryChange();
368
- },
369
-
370
- moveDownWidget() {
371
- this.designer.moveDownWidget(this.parentList, this.indexOfParentList);
372
- this.designer.emitHistoryChange();
373
- },
374
-
375
- removeFieldWidget() {
376
- if (!!this.parentList) {
377
- const selectedWidgetName = this.designer.selectedWidgetName;
378
- let selectedId = this.designer.selectedId;
379
- let nextSelected = null;
380
- if (this.parentList.length === 1) {
381
- if (!!this.parentWidget) {
382
- nextSelected = this.parentWidget;
383
- }
384
- } else if (this.parentList.length === 1 + this.indexOfParentList) {
385
- nextSelected = this.parentList[this.indexOfParentList - 1];
386
- } else {
387
- nextSelected = this.parentList[this.indexOfParentList + 1];
388
- }
389
-
390
- this.$nextTick(() => {
391
- const l = getSubFormNameByFieldId(
392
- this.designer.widgetList,
393
- selectedId
394
- );
395
- this.parentList.splice(this.indexOfParentList, 1);
396
- //if (!!nextSelected) {
397
- this.designer.setSelected(nextSelected);
398
- //}
399
- this.designer.formWidget.deleteWidgetRef(selectedWidgetName, l);
400
- this.designer.emitHistoryChange();
401
- this.designer.emitEvent("canvas-remove-field", selectedWidgetName);
402
- });
403
- }
404
- },
405
- getRules() {
406
- return this.rules;
407
- },
408
- getPropName() {
409
- if (this.formItemProp === "false") {
410
- return null;
411
- }
412
- // if (this.formItemProp) {
413
- // return this.formItemProp;
414
- // }
415
- if (this.tableParam && !this.tableParam.$table?.$parent?.$parent) {
416
- if (this.formItemProp) {
417
- return this.formItemProp;
418
- }
419
- return null;
420
- }
421
- if (this.tableParam && !!this.tableParam.$table?.$parent?.$parent) {
422
- return this.getColumnProp(this.field, this.tableParam);
423
- }
424
- let o = this.field.options.name;
425
- let propName =
426
- ((o =
427
- (this.field.options.keyNameEnabled && this.field.options.keyName) ||
428
- o),
429
- this.subFormItemFlag && !this.designState
430
- ? this.subFormName + "." + this.subFormRowIndex + "." + o
431
- : this.getObjectFieldFlag() && !this.designState
432
- ? this.getObjectName() + "." + o
433
- : o);
434
-
435
- return propName;
436
- },
437
- getFieldKeyName(widget) {
438
- let o = widget.options.name;
439
- return (widget.options.keyNameEnabled && widget.options.keyName) || o;
440
- },
441
- isVabsearchFlagWidget(widget) {
442
- let type = widget?.type;
443
- return (
444
- type === "vabsearch" ||
445
- type === "singerSearch" ||
446
- type === "multiSearch"
447
- );
448
- },
449
- getColumnProp(rowWidget, obj) {
450
- let required = rowWidget.options.required || false;
451
-
452
- let tableRef = obj.$table.$parent.$parent;
453
- let tableWidget = tableRef.widget;
454
- let fieldKeyName = this.getFieldKeyName(tableWidget);
455
- let property = this.getFieldKeyName(rowWidget);
456
- if (
457
- this.isVabsearchFlagWidget(rowWidget) &&
458
- !isVabsearchMultiWidget(rowWidget)
459
- ) {
460
- property = rowWidget.options.vabSearchName || property;
461
- }
462
- let rowIndex = Math.max(obj.rowIndex, 0);
463
-
464
- let isTreeTable = tableWidget.options.isTreeTable || false;
465
- if (isTreeTable) {
466
- rowIndex = tableRef
467
- .getValue()
468
- .findIndex((item) => item._X_ROW_KEY === obj.row._X_ROW_KEY);
469
- if (rowIndex < 0) {
470
- return "false";
471
- }
472
- }
473
-
474
- let propName = fieldKeyName + "." + rowIndex + "." + property;
475
- if (!required) {
476
- propName = "false";
477
- }
478
- return propName;
479
- },
480
- getI18nLabel(label, path, param) {
481
- return !this.designState && label ? this.$t2(label, path, param) : label;
482
- },
483
- getProcessText(text, pattern) {
484
- if (pattern == "" || pattern === null || pattern === undefined) {
485
- return text;
486
- }
487
-
488
- let result = "";
489
-
490
- // 处理固定模式
491
- if (pattern === "-") {
492
- result = "-";
493
- } else if (pattern === "*") {
494
- result = "*****";
495
- }
496
- // 处理自定义模式
497
- else if (pattern.includes("*")) {
498
- text = text ?? "";
499
- const parts = pattern.split("*");
500
-
501
- // 处理 A*B 模式
502
- if (parts.length === 2 && parts[0] && parts[1]) {
503
- const a = parseInt(parts[0]);
504
- const b = parseInt(parts[1]);
505
-
506
- if (!isNaN(a) && !isNaN(b) && a >= 0 && b >= 0) {
507
- if (text.length >= a + b) {
508
- const prefix = text.substring(0, a);
509
- const suffix = text.substring(text.length - b);
510
- const stars = "*".repeat(text.length - a - b);
511
- result = prefix + stars + suffix;
512
- } else {
513
- result = "*****";
514
- }
515
- } else {
516
- // result = '无效模式:A和B必须是数字';
517
- result = text;
518
- }
519
- }
520
- // 处理 A* 模式
521
- else if (parts.length === 2 && parts[0] && !parts[1]) {
522
- const a = parseInt(parts[0]);
523
-
524
- if (!isNaN(a) && a >= 0) {
525
- if (text.length >= a) {
526
- const prefix = text.substring(0, a);
527
- const stars = "*".repeat(text.length - a);
528
- result = prefix + stars;
529
- } else {
530
- result = "*****";
531
- }
532
- } else {
533
- // result = '无效模式:A必须是数字';
534
- result = text;
535
- }
536
- }
537
- // 处理 *B 模式
538
- else if (parts.length === 2 && !parts[0] && parts[1]) {
539
- const b = parseInt(parts[1]);
540
-
541
- if (!isNaN(b) && b >= 0) {
542
- if (text.length >= b) {
543
- const suffix = text.substring(text.length - b);
544
- const stars = "*".repeat(text.length - b);
545
- result = stars + suffix;
546
- } else {
547
- result = "*****";
548
- }
549
- } else {
550
- // result = '无效模式:B必须是数字';
551
- result = text;
552
- }
553
- }
554
- // 处理无效模式
555
- else {
556
- result = "*****";
557
- }
558
- }
559
- // 处理其他无效模式
560
- else {
561
- result = "*****";
562
- }
563
-
564
- return result;
565
- },
566
- initShowType() {
567
- if (!!this.designer) return;
568
- let that = this.$parent;
569
- let formRef = that.getFormRef ? that.getFormRef() : that;
570
-
571
- if (!formRef) return;
572
- //详情页,新增页面不加密
573
- let fJson = formRef.formJson;
574
- let formConfig = fJson.formConfig;
575
- if (formConfig.isLoadEntity && !formRef.dataId) return;
576
-
577
- let userRoleDTOs = formRef.userRoleDTOs || [];
578
- // 判定逻辑与导出侧(数据表格按列剔除)共用 textMaskUtil,
579
- // 否则会出现界面打码、导出放行两套结论
580
- let { masked, encryptFormula } = resolveTextMaskFlag(this.field.options, {
581
- bdService: formRef.bdService,
582
- companyCode: this.$store.getters.companyCode,
583
- roleCodeList: userRoleDTOs.map((item) => item.roleCode),
584
- });
585
-
586
- this.encryptFormula = encryptFormula;
587
- //0 原本组件,1明文文本,2密文文本
588
- this.field.options.widgetTextFlag = masked ? 2 : 0;
589
- },
590
- /* 实现已移入 textMaskUtil,此处保留方法名供下游调用(同名的是导入的模块函数) */
591
- compareToList(list1, list2) {
592
- return compareToList(list1, list2);
593
- },
594
- isShowWidget() {
595
- let widgetTextFlag = this.field.options.widgetTextFlag;
596
- return (
597
- widgetTextFlag === undefined ||
598
- widgetTextFlag === null ||
599
- widgetTextFlag === 0
600
- );
601
- },
602
- getShowValue() {
603
- let widgetTextFlag = this.field.options.widgetTextFlag;
604
- let fieldModel = this.$parent.fieldModel;
605
- if (this.$parent.fieldModelLabel)
606
- fieldModel = this.$parent.fieldModelLabel();
607
- let showValue = fieldModel;
608
- if (widgetTextFlag == 2) {
609
- showValue = this.getProcessText(showValue, this.encryptFormula);
610
- }
611
-
612
- return showValue;
613
- },
614
- getWidgetClass() {
615
- let list = [];
616
- let optionModel = this.field.options.widgetTextLinkConfig?.options || {};
617
- if (optionModel.colorClass) list.push(optionModel.colorClass);
618
- if (optionModel.underline) list.push("underLine");
619
- if (this.field.options.disabled) list.push("is-disabled");
620
- return list;
621
- },
622
- handleClick(event) {
623
- if (this.field.options.disabled) return;
624
- this.$parent.handleButtonWidgetClick(event, true);
625
- if (
626
- !this.designState &&
627
- this.field.options.widgetTextLinkConfig?.options.href
628
- ) {
629
- window.open(this.field.options.widgetTextLinkConfig?.options.href);
630
- }
631
- },
632
- getWidgetValue() {
633
- let fieldModel = this.$parent.fieldModel;
634
- if (this.$parent.fieldModelLabel)
635
- fieldModel = this.$parent.fieldModelLabel();
636
- return fieldModel;
637
- },
638
- },
639
- };
640
- </script>
641
-
642
- <style lang="scss" scoped>
643
- @import "~@/styles/global.scss";
644
-
645
- .design-time-bottom-margin {
646
- margin-bottom: 5px;
647
- }
648
-
649
- .field-wrapper {
650
- position: relative;
651
-
652
- .field-action {
653
- position: absolute;
654
- //bottom: -24px;
655
- bottom: 0;
656
- right: -1px;
657
- height: 22px;
658
- line-height: 22px;
659
- background: $--color-primary;
660
- z-index: 9;
661
-
662
- i {
663
- font-size: 14px;
664
- color: #fff;
665
- margin: 0 5px;
666
- cursor: pointer;
667
- }
668
- }
669
-
670
- .drag-handler {
671
- position: absolute;
672
- top: 0;
673
- //bottom: -22px; /* 拖拽手柄位于组件下方,有时无法正常拖动,原因未明?? */
674
- left: -1px;
675
- height: 20px;
676
- line-height: 18px;
677
- //background: $--color-primary;
678
- z-index: 9;
679
-
680
- i {
681
- font-size: 12px;
682
- font-style: normal;
683
- color: #fff;
684
- margin: 4px;
685
- cursor: move;
686
- }
687
-
688
- &:hover {
689
- //opacity: 1;
690
- background: $--color-primary;
691
- }
692
- }
693
- }
694
-
695
- .el-form-item {
696
- //margin-bottom: 0 !important;
697
- //margin-bottom: 6px;
698
-
699
- //margin-top: 2px;
700
- position: relative;
701
-
702
- ::v-deep .el-form-item__label {
703
- white-space: nowrap;
704
- text-overflow: ellipsis;
705
- }
706
-
707
- ::v-deep .el-form-item__content {
708
- //position: unset; /* TODO: 忘了这个样式设置是为了解决什么问题?? */
709
- }
710
-
711
- span.custom-label i {
712
- margin: 0 3px;
713
- }
714
-
715
- /* 隐藏Chrome浏览器中el-input数字输入框右侧的上下调整小箭头 */
716
- ::v-deep .hide-spin-button input::-webkit-outer-spin-button,
717
- ::v-deep .hide-spin-button input::-webkit-inner-spin-button {
718
- -webkit-appearance: none !important;
719
- }
720
-
721
- /* 隐藏Firefox浏览器中el-input数字输入框右侧的上下调整小箭头 */
722
- ::v-deep .hide-spin-button input[type="number"] {
723
- -moz-appearance: textfield;
724
- }
725
- }
726
-
727
- .required ::v-deep .el-form-item__label::before {
728
- content: "*";
729
- color: #f56c6c;
730
- margin-right: 4px;
731
- }
732
-
733
- .static-content-item {
734
- min-height: 20px;
735
- display: flex; /* 垂直居中 */
736
- align-items: center; /* 垂直居中 */
737
-
738
- ::v-deep .el-divider--horizontal {
739
- margin: 0;
740
- }
741
- }
742
-
743
- .el-form-item.selected,
744
- .static-content-item.selected {
745
- outline: 2px solid $--color-primary;
746
- }
747
-
748
- ::v-deep .label-left-align .el-form-item__label {
749
- text-align: left;
750
- }
751
-
752
- ::v-deep .label-center-align .el-form-item__label {
753
- text-align: center;
754
- }
755
-
756
- ::v-deep .label-right-align .el-form-item__label {
757
- text-align: right;
758
- }
759
-
760
- .a-link.is-disabled {
761
- cursor: no-drop;
762
- }
763
- </style>
1
+ <!--
2
+ /**
3
+ * author: vformAdmin
4
+ * email: vdpadmin@163.com
5
+ * website: https://www.vform666.com
6
+ * date: 2021.08.18
7
+ * remark: 如果要分发VForm源码,需在本文件顶部保留此文件头信息!!
8
+ */
9
+ -->
10
+
11
+ <template>
12
+ <div
13
+ class="field-wrapper"
14
+ :class="{ 'design-time-bottom-margin': !!this.designer }"
15
+ v-show="!field.options.hidden || designState === true"
16
+ >
17
+ <div>
18
+ <template v-if="formItemProp === 'false'">
19
+ <template v-if="!field.options.hidden">
20
+ <template v-if="isShowWidget()">
21
+ <compareView
22
+ v-if="isCompareOn"
23
+ :isCompare="isCompareOn"
24
+ :isDiff="compareIsDiff"
25
+ :oldVal="compareOldDisplay"
26
+ :newVal="getShowValue()"
27
+ >
28
+ <slot></slot>
29
+ </compareView>
30
+ <slot v-else></slot>
31
+ </template>
32
+ <template
33
+ v-else-if="
34
+ field.options.widgetTextFlag === 3 &&
35
+ field.options.widgetTextLinkConfig
36
+ "
37
+ >
38
+ <div class="ellipsis">
39
+ <a
40
+ class="a-link"
41
+ :class="getWidgetClass()"
42
+ @click.native="handleClick"
43
+ >
44
+ <span>
45
+ <i
46
+ :class="
47
+ field.options.widgetTextLinkConfig.options.prefixIcon
48
+ "
49
+ v-if="
50
+ !!field.options.widgetTextLinkConfig.options.prefixIcon
51
+ "
52
+ ></i>
53
+ <span>{{ getWidgetValue() }}</span>
54
+ <i
55
+ :class="
56
+ field.options.widgetTextLinkConfig.options.suffixIcon
57
+ "
58
+ v-if="
59
+ !!field.options.widgetTextLinkConfig.options.suffixIcon
60
+ "
61
+ ></i>
62
+ </span>
63
+ </a>
64
+ </div>
65
+ </template>
66
+ <template v-else>
67
+ <compareView
68
+ v-if="isCompareOn"
69
+ :isCompare="isCompareOn"
70
+ :isDiff="compareIsDiff"
71
+ :oldVal="compareOldDisplay"
72
+ :newVal="getShowValue()"
73
+ >
74
+ <span>{{ getShowValue() }}</span>
75
+ </compareView>
76
+ <span v-else>{{ getShowValue() }}</span>
77
+ </template>
78
+ </template>
79
+ </template>
80
+ <template v-else>
81
+ <el-form-item
82
+ v-if="
83
+ !!field.formItemFlag &&
84
+ (!field.options.hidden || designState === true)
85
+ "
86
+ :label="label"
87
+ :label-width="labelWidth"
88
+ :rules="getRules()"
89
+ :prop="getPropName()"
90
+ :class="[
91
+ selected ? 'selected' : '',
92
+ labelAlign,
93
+ customClass,
94
+ field.options.required ? 'required' : '',
95
+ ]"
96
+ @click.native.stop="selectField(field)"
97
+ >
98
+ <span
99
+ v-if="!!field.options.labelIconClass"
100
+ slot="label"
101
+ class="custom-label"
102
+ >
103
+ <template v-if="field.options.labelIconPosition === 'front'">
104
+ <template v-if="!!field.options.labelTooltip">
105
+ <el-tooltip
106
+ :content="field.options.labelTooltip"
107
+ effect="dark"
108
+ popper-class="label-tooltip-pre-line"
109
+ >
110
+ <i :class="field.options.labelIconClass"></i></el-tooltip
111
+ ><span :style="{ color: field.options.labelColor }">{{
112
+ label
113
+ }}</span></template
114
+ >
115
+ <template v-else>
116
+ <i :class="field.options.labelIconClass"></i
117
+ ><span :style="{ color: field.options.labelColor }">{{
118
+ label
119
+ }}</span></template
120
+ >
121
+ </template>
122
+ <template v-else-if="field.options.labelIconPosition === 'rear'">
123
+ <template v-if="!!field.options.labelTooltip">
124
+ <span :style="{ color: field.options.labelColor }">{{
125
+ label
126
+ }}</span
127
+ ><el-tooltip
128
+ :content="field.options.labelTooltip"
129
+ effect="dark"
130
+ popper-class="label-tooltip-pre-line"
131
+ >
132
+ <i :class="field.options.labelIconClass"></i></el-tooltip
133
+ ></template>
134
+ <template v-else>
135
+ <span :style="{ color: field.options.labelColor }">{{
136
+ label
137
+ }}</span
138
+ ><i :class="field.options.labelIconClass"></i
139
+ ></template>
140
+ </template>
141
+ </span>
142
+ <span
143
+ v-else-if="!!field.options.labelColor"
144
+ slot="label"
145
+ :style="{ color: field.options.labelColor }"
146
+ >
147
+ {{ label }}
148
+ </span>
149
+ <template v-if="isShowWidget()">
150
+ <compareView
151
+ v-if="isCompareOn"
152
+ :isCompare="isCompareOn"
153
+ :isDiff="compareIsDiff"
154
+ :oldVal="compareOldDisplay"
155
+ :newVal="getShowValue()"
156
+ >
157
+ <slot></slot>
158
+ </compareView>
159
+ <slot v-else></slot>
160
+ </template>
161
+ <template
162
+ v-else-if="
163
+ field.options.widgetTextFlag === 3 &&
164
+ field.options.widgetTextLinkConfig
165
+ "
166
+ >
167
+ <div class="ellipsis">
168
+ <a class="a-link" :class="getWidgetClass()" @click="handleClick">
169
+ <span>
170
+ <i
171
+ :class="
172
+ field.options.widgetTextLinkConfig.options.prefixIcon
173
+ "
174
+ v-if="
175
+ !!field.options.widgetTextLinkConfig.options.prefixIcon
176
+ "
177
+ ></i>
178
+ <span>{{ getWidgetValue() }}</span>
179
+ <i
180
+ :class="
181
+ field.options.widgetTextLinkConfig.options.suffixIcon
182
+ "
183
+ v-if="
184
+ !!field.options.widgetTextLinkConfig.options.suffixIcon
185
+ "
186
+ ></i>
187
+ </span>
188
+ </a>
189
+ </div>
190
+ </template>
191
+ <template v-else>
192
+ <compareView
193
+ v-if="isCompareOn"
194
+ :isCompare="isCompareOn"
195
+ :isDiff="compareIsDiff"
196
+ :oldVal="compareOldDisplay"
197
+ :newVal="getShowValue()"
198
+ >
199
+ <span>{{ getShowValue() }}</span>
200
+ </compareView>
201
+ <span v-else>{{ getShowValue() }}</span>
202
+ </template>
203
+ </el-form-item>
204
+ </template>
205
+ </div>
206
+ <template v-if="!!this.designer">
207
+ <div class="field-action" v-if="designer.selectedId === field.id">
208
+ <i
209
+ class="el-icon-back"
210
+ :title="i18nt('designer.hint.selectParentWidget')"
211
+ @click.stop="selectParentWidget(field)"
212
+ ></i>
213
+ <i
214
+ class="el-icon-top"
215
+ v-if="!!parentList && parentList.length > 1"
216
+ :title="i18nt('designer.hint.moveUpWidget')"
217
+ @click.stop="moveUpWidget(field)"
218
+ ></i>
219
+ <i
220
+ class="el-icon-bottom"
221
+ v-if="!!parentList && parentList.length > 1"
222
+ :title="i18nt('designer.hint.moveDownWidget')"
223
+ @click.stop="moveDownWidget(field)"
224
+ ></i>
225
+ <i
226
+ class="el-icon-delete"
227
+ :title="i18nt('designer.hint.remove')"
228
+ @click.stop="removeFieldWidget"
229
+ ></i>
230
+ </div>
231
+
232
+ <div
233
+ class="drag-handler background-opacity"
234
+ v-if="designer.selectedId === field.id"
235
+ >
236
+ <i class="el-icon-rank" :title="i18nt('designer.hint.dragHandler')"></i>
237
+ <i>{{
238
+ i18n2t(
239
+ `designer.widgetLabel.${field.type}`,
240
+ `extension.widgetLabel.${field.type}`
241
+ )
242
+ }}</i>
243
+ <i v-if="field.options.hidden === true" class="iconfont icon-hide"></i>
244
+ </div>
245
+ </template>
246
+ </div>
247
+ </template>
248
+
249
+ <script>
250
+ import i18n from "../../../../../components/xform/utils/i18n";
251
+ import {
252
+ getSubFormNameByFieldId,
253
+ isVabsearchMultiWidget,
254
+ } from "../../../../../components/xform/utils/util";
255
+ import compareView from "../../../../../components/xform/form-render/compareView.vue";
256
+ import {
257
+ compareToList,
258
+ resolveTextMaskFlag,
259
+ } from "../../../../../components/xform/utils/textMaskUtil";
260
+
261
+ export default {
262
+ name: "form-item-wrapper",
263
+ mixins: [i18n],
264
+ components: { compareView },
265
+ props: {
266
+ field: Object,
267
+ designer: Object,
268
+ parentWidget: Object,
269
+ parentList: Array,
270
+ indexOfParentList: Number,
271
+
272
+ designState: {
273
+ type: Boolean,
274
+ default: false,
275
+ },
276
+ subFormRowIndex: {
277
+ /* 子表单组件行索引,从0开始计数 */ type: Number,
278
+ default: -1,
279
+ },
280
+ subFormColIndex: {
281
+ /* 子表单组件列索引,从0开始计数 */ type: Number,
282
+ default: -1,
283
+ },
284
+ subFormRowId: {
285
+ /* 子表单组件行Id,唯一id且不可变 */ type: String,
286
+ default: "",
287
+ },
288
+
289
+ rules: Array,
290
+ },
291
+ inject: {
292
+ getFormConfig: { default: () => () => ({}) },
293
+ getSubFormFieldFlag: { default: () => () => false },
294
+ getSubFormName: { default: () => () => "" },
295
+ tableParam: { default: null },
296
+ formItemProp: { default: null },
297
+ getObjectFieldFlag: { default: () => () => false },
298
+ getObjectName: { default: () => () => "" },
299
+ // 表单对比:非对比渲染场景(如设计器)给默认值,避免注入警告
300
+ getIsCompare: { default: () => () => false },
301
+ getOldFormData: { default: () => () => ({}) },
302
+ getCompareRowKey: { default: () => () => "uuid" },
303
+ getCompareExcludeTypes: { default: () => () => [] },
304
+ isCompareExcludeField: { default: () => () => false },
305
+ },
306
+ data() {
307
+ return {
308
+ encryptFormula: null,
309
+ };
310
+ },
311
+ computed: {
312
+ formConfig: function () {
313
+ return this.getFormConfig();
314
+ },
315
+ selected() {
316
+ return !!this.designer && this.field.id === this.designer.selectedId;
317
+ },
318
+
319
+ label() {
320
+ if (this.shouldHideFieldLabel()) {
321
+ return "";
322
+ }
323
+ return this.getI18nLabel(this.field.options.label);
324
+ // let label = this.field.options.label
325
+ // return label ? this.$t2(label) : label;
326
+ },
327
+
328
+ labelWidth() {
329
+ if (this.shouldHideFieldLabel()) {
330
+ return (!!this.designState ? 5 : 0) + "px"; //设计期间标签最小宽度5像素,以便于鼠标点击可选中组件!!
331
+ }
332
+
333
+ if (!!this.field.options.labelWidth) {
334
+ return this.field.options.labelWidth + "px !important";
335
+ }
336
+
337
+ if (!!this.designer) {
338
+ return this.designer.formConfig.labelWidth + "px";
339
+ } else {
340
+ return this.formConfig.labelWidth + "px";
341
+ }
342
+ },
343
+
344
+ labelAlign() {
345
+ if (!this?.field?.options?.labelAlign) {
346
+ return "";
347
+ }
348
+ if (!!this.field.options.labelAlign) {
349
+ return this.field.options.labelAlign;
350
+ }
351
+
352
+ if (!!this.designer) {
353
+ return this.designer.formConfig.labelAlign || "label-left-align";
354
+ } else {
355
+ return this.formConfig.labelAlign || "label-left-align";
356
+ }
357
+ },
358
+
359
+ customClass() {
360
+ return !!this.field.options.customClass
361
+ ? this.field.options.customClass.join(" ")
362
+ : "";
363
+ },
364
+
365
+ subFormName() {
366
+ return !!this.parentWidget ? this.parentWidget.options.name : "";
367
+ },
368
+
369
+ subFormItemFlag() {
370
+ return (
371
+ this.isSubFormItem() ||
372
+ (!!this.parentWidget ? this.parentWidget.type === "sub-form" : false)
373
+ );
374
+ },
375
+
376
+ // ===================== 表单对比 =====================
377
+ // 所在明细表的属性名(keyName);主表字段为空。用于按表取黑/白名单
378
+ compareSubName() {
379
+ if (!this.tableParam || !this.tableParam.row) return "";
380
+ let opts = this.parentWidget && this.parentWidget.options;
381
+ if (!opts) return "";
382
+ return (opts.keyNameEnabled && opts.keyName) || opts.name || "";
383
+ },
384
+ compareExcluded() {
385
+ // 按类型排除。附件类天然不参与对比,但开了「值存为URL」的附件字段存的是主表
386
+ // 普通列上的 URL 字符串,与普通字段无异,应照常参与对比
387
+ let types = this.getCompareExcludeTypes() || [];
388
+ if (
389
+ types.indexOf(this.field.type) !== -1 &&
390
+ !this.field.options.urlValueEnabled
391
+ ) {
392
+ return true;
393
+ }
394
+ // 按字段名排除(系统字段 + 主表黑白名单 + 所在明细表的黑白名单)
395
+ let fieldKeyName =
396
+ (this.field.options.keyNameEnabled && this.field.options.keyName) ||
397
+ this.field.options.name;
398
+ return !!this.isCompareExcludeField(fieldKeyName, this.compareSubName);
399
+ },
400
+ isCompareOn() {
401
+ return !this.designer && !this.compareExcluded && !!this.getIsCompare();
402
+ },
403
+ // 原单的行/主表对象(供关联类组件取伴随 label 字段)
404
+ compareOldRow() {
405
+ // 表格/子表单行内字段:取该行 hData 快照
406
+ if (this.tableParam && this.tableParam.row) {
407
+ return this.tableParam.row.hData || null;
408
+ }
409
+ // 主表字段
410
+ return this.getOldFormData() || null;
411
+ },
412
+ compareOldRaw() {
413
+ let property =
414
+ (this.field.options.keyNameEnabled && this.field.options.keyName) ||
415
+ this.field.options.name;
416
+ let row = this.compareOldRow;
417
+ return row ? row[property] : null;
418
+ },
419
+ compareNewRaw() {
420
+ return this.$parent ? this.$parent.fieldModel : null;
421
+ },
422
+ // 表格新增行(无原单匹配,hData 为空或缺失):整行标识,不逐单元格显示感叹号
423
+ compareRowIsNew() {
424
+ if (!this.tableParam || !this.tableParam.row) return false;
425
+ let hData = this.tableParam.row.hData;
426
+ return !hData || Object.keys(hData).length === 0;
427
+ },
428
+ compareIsDiff() {
429
+ if (!this.isCompareOn) return false;
430
+ if (this.compareRowIsNew) return false;
431
+ let eq =
432
+ this.$parent && this.$parent.compareEquals
433
+ ? this.$parent.compareEquals(this.compareOldRaw, this.compareNewRaw)
434
+ : this.compareOldRaw === this.compareNewRaw;
435
+ return !eq;
436
+ },
437
+ compareOldDisplay() {
438
+ // 优先用 resolveCompareOldDisplay(可从 oldRow 取关联类的伴随 label 字段)
439
+ if (this.$parent && this.$parent.resolveCompareOldDisplay) {
440
+ return this.$parent.resolveCompareOldDisplay(this.compareOldRow);
441
+ }
442
+ if (this.$parent && this.$parent.resolveDisplayValue) {
443
+ return this.$parent.resolveDisplayValue(this.compareOldRaw);
444
+ }
445
+ return this.compareOldRaw;
446
+ },
447
+ },
448
+ created() {
449
+ //
450
+ this.initShowType();
451
+ },
452
+ methods: {
453
+ shouldHideFieldLabel() {
454
+ if (!!this.field.options.labelHidden) {
455
+ return true;
456
+ }
457
+ // 仅 VXE 数据表格列内字段隐藏标签(表头已展示列名);table2/table 等仍显示标签
458
+ return this.isDataTableColumnItem();
459
+ },
460
+ isDataTableColumnItem() {
461
+ return !!this.tableParam?.$table?.$parent?.$parent;
462
+ },
463
+ isSubFormItem() {
464
+ return !!this.tableParam;
465
+ },
466
+ selectField(field) {
467
+ if (!!this.designer) {
468
+ this.designer.setSelected(field);
469
+ this.designer.emitEvent("field-selected", this.parentWidget); //发送选中组件的父组件对象
470
+ }
471
+ },
472
+
473
+ selectParentWidget() {
474
+ if (this.parentWidget) {
475
+ this.designer.setSelected(this.parentWidget);
476
+ } else {
477
+ this.designer.clearSelected();
478
+ }
479
+ },
480
+
481
+ moveUpWidget() {
482
+ this.designer.moveUpWidget(this.parentList, this.indexOfParentList);
483
+ this.designer.emitHistoryChange();
484
+ },
485
+
486
+ moveDownWidget() {
487
+ this.designer.moveDownWidget(this.parentList, this.indexOfParentList);
488
+ this.designer.emitHistoryChange();
489
+ },
490
+
491
+ removeFieldWidget() {
492
+ if (!!this.parentList) {
493
+ const selectedWidgetName = this.designer.selectedWidgetName;
494
+ let selectedId = this.designer.selectedId;
495
+ let nextSelected = null;
496
+ if (this.parentList.length === 1) {
497
+ if (!!this.parentWidget) {
498
+ nextSelected = this.parentWidget;
499
+ }
500
+ } else if (this.parentList.length === 1 + this.indexOfParentList) {
501
+ nextSelected = this.parentList[this.indexOfParentList - 1];
502
+ } else {
503
+ nextSelected = this.parentList[this.indexOfParentList + 1];
504
+ }
505
+
506
+ this.$nextTick(() => {
507
+ const l = getSubFormNameByFieldId(
508
+ this.designer.widgetList,
509
+ selectedId
510
+ );
511
+ this.parentList.splice(this.indexOfParentList, 1);
512
+ //if (!!nextSelected) {
513
+ this.designer.setSelected(nextSelected);
514
+ //}
515
+ this.designer.formWidget.deleteWidgetRef(selectedWidgetName, l);
516
+ this.designer.emitHistoryChange();
517
+ this.designer.emitEvent("canvas-remove-field", selectedWidgetName);
518
+ });
519
+ }
520
+ },
521
+ getRules() {
522
+ return this.rules;
523
+ },
524
+ getPropName() {
525
+ if (this.formItemProp === "false") {
526
+ return null;
527
+ }
528
+ // if (this.formItemProp) {
529
+ // return this.formItemProp;
530
+ // }
531
+ if (this.tableParam && !this.tableParam.$table?.$parent?.$parent) {
532
+ if (this.formItemProp) {
533
+ return this.formItemProp;
534
+ }
535
+ return null;
536
+ }
537
+ if (this.tableParam && !!this.tableParam.$table?.$parent?.$parent) {
538
+ return this.getColumnProp(this.field, this.tableParam);
539
+ }
540
+ let o = this.field.options.name;
541
+ let propName =
542
+ ((o =
543
+ (this.field.options.keyNameEnabled && this.field.options.keyName) ||
544
+ o),
545
+ this.subFormItemFlag && !this.designState
546
+ ? this.subFormName + "." + this.subFormRowIndex + "." + o
547
+ : this.getObjectFieldFlag() && !this.designState
548
+ ? this.getObjectName() + "." + o
549
+ : o);
550
+
551
+ return propName;
552
+ },
553
+ getFieldKeyName(widget) {
554
+ let o = widget.options.name;
555
+ return (widget.options.keyNameEnabled && widget.options.keyName) || o;
556
+ },
557
+ isVabsearchFlagWidget(widget) {
558
+ let type = widget?.type;
559
+ return (
560
+ type === "vabsearch" ||
561
+ type === "singerSearch" ||
562
+ type === "multiSearch"
563
+ );
564
+ },
565
+ getColumnProp(rowWidget, obj) {
566
+ let required = rowWidget.options.required || false;
567
+
568
+ let tableRef = obj.$table.$parent.$parent;
569
+ let tableWidget = tableRef.widget;
570
+ let fieldKeyName = this.getFieldKeyName(tableWidget);
571
+ let property = this.getFieldKeyName(rowWidget);
572
+ if (
573
+ this.isVabsearchFlagWidget(rowWidget) &&
574
+ !isVabsearchMultiWidget(rowWidget)
575
+ ) {
576
+ property = rowWidget.options.vabSearchName || property;
577
+ }
578
+ let rowIndex = Math.max(obj.rowIndex, 0);
579
+
580
+ let isTreeTable = tableWidget.options.isTreeTable || false;
581
+ if (isTreeTable) {
582
+ rowIndex = tableRef
583
+ .getValue()
584
+ .findIndex((item) => item._X_ROW_KEY === obj.row._X_ROW_KEY);
585
+ if (rowIndex < 0) {
586
+ return "false";
587
+ }
588
+ }
589
+
590
+ let propName = fieldKeyName + "." + rowIndex + "." + property;
591
+ if (!required) {
592
+ propName = "false";
593
+ }
594
+ return propName;
595
+ },
596
+ getI18nLabel(label, path, param) {
597
+ return !this.designState && label ? this.$t2(label, path, param) : label;
598
+ },
599
+ getProcessText(text, pattern) {
600
+ if (pattern == "" || pattern === null || pattern === undefined) {
601
+ return text;
602
+ }
603
+
604
+ let result = "";
605
+
606
+ // 处理固定模式
607
+ if (pattern === "-") {
608
+ result = "-";
609
+ } else if (pattern === "*") {
610
+ result = "*****";
611
+ }
612
+ // 处理自定义模式
613
+ else if (pattern.includes("*")) {
614
+ text = text ?? "";
615
+ const parts = pattern.split("*");
616
+
617
+ // 处理 A*B 模式
618
+ if (parts.length === 2 && parts[0] && parts[1]) {
619
+ const a = parseInt(parts[0]);
620
+ const b = parseInt(parts[1]);
621
+
622
+ if (!isNaN(a) && !isNaN(b) && a >= 0 && b >= 0) {
623
+ if (text.length >= a + b) {
624
+ const prefix = text.substring(0, a);
625
+ const suffix = text.substring(text.length - b);
626
+ const stars = "*".repeat(text.length - a - b);
627
+ result = prefix + stars + suffix;
628
+ } else {
629
+ result = "*****";
630
+ }
631
+ } else {
632
+ // result = '无效模式:A和B必须是数字';
633
+ result = text;
634
+ }
635
+ }
636
+ // 处理 A* 模式
637
+ else if (parts.length === 2 && parts[0] && !parts[1]) {
638
+ const a = parseInt(parts[0]);
639
+
640
+ if (!isNaN(a) && a >= 0) {
641
+ if (text.length >= a) {
642
+ const prefix = text.substring(0, a);
643
+ const stars = "*".repeat(text.length - a);
644
+ result = prefix + stars;
645
+ } else {
646
+ result = "*****";
647
+ }
648
+ } else {
649
+ // result = '无效模式:A必须是数字';
650
+ result = text;
651
+ }
652
+ }
653
+ // 处理 *B 模式
654
+ else if (parts.length === 2 && !parts[0] && parts[1]) {
655
+ const b = parseInt(parts[1]);
656
+
657
+ if (!isNaN(b) && b >= 0) {
658
+ if (text.length >= b) {
659
+ const suffix = text.substring(text.length - b);
660
+ const stars = "*".repeat(text.length - b);
661
+ result = stars + suffix;
662
+ } else {
663
+ result = "*****";
664
+ }
665
+ } else {
666
+ // result = '无效模式:B必须是数字';
667
+ result = text;
668
+ }
669
+ }
670
+ // 处理无效模式
671
+ else {
672
+ result = "*****";
673
+ }
674
+ }
675
+ // 处理其他无效模式
676
+ else {
677
+ result = "*****";
678
+ }
679
+
680
+ return result;
681
+ },
682
+ initShowType() {
683
+ if (!!this.designer) return;
684
+ let that = this.$parent;
685
+ let formRef = that.getFormRef ? that.getFormRef() : that;
686
+
687
+ if (!formRef) return;
688
+ //详情页,新增页面不加密
689
+ let fJson = formRef.formJson;
690
+ let formConfig = fJson.formConfig;
691
+ if (formConfig.isLoadEntity && !formRef.dataId) return;
692
+
693
+ let userRoleDTOs = formRef.userRoleDTOs || [];
694
+ // 判定逻辑与导出侧(数据表格按列剔除)共用 textMaskUtil,
695
+ // 否则会出现界面打码、导出放行两套结论
696
+ let { masked, encryptFormula } = resolveTextMaskFlag(this.field.options, {
697
+ bdService: formRef.bdService,
698
+ companyCode: this.$store.getters.companyCode,
699
+ roleCodeList: userRoleDTOs.map((item) => item.roleCode),
700
+ });
701
+
702
+ this.encryptFormula = encryptFormula;
703
+ //0 原本组件,1明文文本,2密文文本
704
+ this.field.options.widgetTextFlag = masked ? 2 : 0;
705
+ },
706
+ /* 实现已移入 textMaskUtil,此处保留方法名供下游调用(同名的是导入的模块函数) */
707
+ compareToList(list1, list2) {
708
+ return compareToList(list1, list2);
709
+ },
710
+ isShowWidget() {
711
+ let widgetTextFlag = this.field.options.widgetTextFlag;
712
+ return (
713
+ widgetTextFlag === undefined ||
714
+ widgetTextFlag === null ||
715
+ widgetTextFlag === 0
716
+ );
717
+ },
718
+ getShowValue() {
719
+ let widgetTextFlag = this.field.options.widgetTextFlag;
720
+ let fieldModel = this.$parent.fieldModel;
721
+ if (this.$parent.fieldModelLabel)
722
+ fieldModel = this.$parent.fieldModelLabel();
723
+ let showValue = fieldModel;
724
+ if (widgetTextFlag == 2) {
725
+ showValue = this.getProcessText(showValue, this.encryptFormula);
726
+ }
727
+
728
+ return showValue;
729
+ },
730
+ getWidgetClass() {
731
+ let list = [];
732
+ let optionModel = this.field.options.widgetTextLinkConfig?.options || {};
733
+ if (optionModel.colorClass) list.push(optionModel.colorClass);
734
+ if (optionModel.underline) list.push("underLine");
735
+ if (this.field.options.disabled) list.push("is-disabled");
736
+ return list;
737
+ },
738
+ handleClick(event) {
739
+ if (this.field.options.disabled) return;
740
+ this.$parent.handleButtonWidgetClick(event, true);
741
+ if (
742
+ !this.designState &&
743
+ this.field.options.widgetTextLinkConfig?.options.href
744
+ ) {
745
+ window.open(this.field.options.widgetTextLinkConfig?.options.href);
746
+ }
747
+ },
748
+ getWidgetValue() {
749
+ let fieldModel = this.$parent.fieldModel;
750
+ if (this.$parent.fieldModelLabel)
751
+ fieldModel = this.$parent.fieldModelLabel();
752
+ return fieldModel;
753
+ },
754
+ },
755
+ };
756
+ </script>
757
+
758
+ <style lang="scss" scoped>
759
+ @import "~@/styles/global.scss";
760
+
761
+ .design-time-bottom-margin {
762
+ margin-bottom: 5px;
763
+ }
764
+
765
+ .field-wrapper {
766
+ position: relative;
767
+
768
+ .field-action {
769
+ position: absolute;
770
+ //bottom: -24px;
771
+ bottom: 0;
772
+ right: -1px;
773
+ height: 22px;
774
+ line-height: 22px;
775
+ background: $--color-primary;
776
+ z-index: 9;
777
+
778
+ i {
779
+ font-size: 14px;
780
+ color: #fff;
781
+ margin: 0 5px;
782
+ cursor: pointer;
783
+ }
784
+ }
785
+
786
+ .drag-handler {
787
+ position: absolute;
788
+ top: 0;
789
+ //bottom: -22px; /* 拖拽手柄位于组件下方,有时无法正常拖动,原因未明?? */
790
+ left: -1px;
791
+ height: 20px;
792
+ line-height: 18px;
793
+ //background: $--color-primary;
794
+ z-index: 9;
795
+
796
+ i {
797
+ font-size: 12px;
798
+ font-style: normal;
799
+ color: #fff;
800
+ margin: 4px;
801
+ cursor: move;
802
+ }
803
+
804
+ &:hover {
805
+ //opacity: 1;
806
+ background: $--color-primary;
807
+ }
808
+ }
809
+ }
810
+
811
+ .el-form-item {
812
+ //margin-bottom: 0 !important;
813
+ //margin-bottom: 6px;
814
+
815
+ //margin-top: 2px;
816
+ position: relative;
817
+
818
+ ::v-deep .el-form-item__label {
819
+ white-space: nowrap;
820
+ text-overflow: ellipsis;
821
+ }
822
+
823
+ ::v-deep .el-form-item__content {
824
+ //position: unset; /* TODO: 忘了这个样式设置是为了解决什么问题?? */
825
+ }
826
+
827
+ span.custom-label i {
828
+ margin: 0 3px;
829
+ }
830
+
831
+ /* 隐藏Chrome浏览器中el-input数字输入框右侧的上下调整小箭头 */
832
+ ::v-deep .hide-spin-button input::-webkit-outer-spin-button,
833
+ ::v-deep .hide-spin-button input::-webkit-inner-spin-button {
834
+ -webkit-appearance: none !important;
835
+ }
836
+
837
+ /* 隐藏Firefox浏览器中el-input数字输入框右侧的上下调整小箭头 */
838
+ ::v-deep .hide-spin-button input[type="number"] {
839
+ -moz-appearance: textfield;
840
+ }
841
+ }
842
+
843
+ .required ::v-deep .el-form-item__label::before {
844
+ content: "*";
845
+ color: #f56c6c;
846
+ margin-right: 4px;
847
+ }
848
+
849
+ .static-content-item {
850
+ min-height: 20px;
851
+ display: flex; /* 垂直居中 */
852
+ align-items: center; /* 垂直居中 */
853
+
854
+ ::v-deep .el-divider--horizontal {
855
+ margin: 0;
856
+ }
857
+ }
858
+
859
+ .el-form-item.selected,
860
+ .static-content-item.selected {
861
+ outline: 2px solid $--color-primary;
862
+ }
863
+
864
+ ::v-deep .label-left-align .el-form-item__label {
865
+ text-align: left;
866
+ }
867
+
868
+ ::v-deep .label-center-align .el-form-item__label {
869
+ text-align: center;
870
+ }
871
+
872
+ ::v-deep .label-right-align .el-form-item__label {
873
+ text-align: right;
874
+ }
875
+
876
+ .a-link.is-disabled {
877
+ cursor: no-drop;
878
+ }
879
+ </style>