cloud-web-corejs 1.0.54-dev.66 → 1.0.54-dev.660

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 (511) hide show
  1. package/package.json +22 -14
  2. package/src/App.vue +30 -34
  3. package/src/api/user.js +64 -40
  4. package/src/components/Qrcode/fileParse.vue +0 -1
  5. package/src/components/Tinymce/index.vue +112 -71
  6. package/src/components/VabUpload/image-viewer.vue +2 -2
  7. package/src/components/VabUpload/index.js +49 -1
  8. package/src/components/VabUpload/mixins.js +1822 -2
  9. package/src/components/VabUpload/propertiesDialog.vue +1 -1
  10. package/src/components/VabUpload/view.vue +209 -120
  11. package/src/components/advancedSearchDialog/mixins.js +28 -1
  12. package/src/components/base-textarea/index.vue +104 -0
  13. package/src/components/baseAlert/index.js +44 -1
  14. package/src/components/baseAlert/index.vue +24 -20
  15. package/src/components/baseAlert/mixins.js +61 -1
  16. package/src/components/baseAttachment/index.vue +49 -40
  17. package/src/components/baseAttachment/install.js +21 -5
  18. package/src/components/baseAttachment/mixins.js +310 -1
  19. package/src/components/baseInputBatch/mixins.js +58 -1
  20. package/src/components/baseInputExport/index.vue +21 -14
  21. package/src/components/baseInputExport/mixins.js +391 -1
  22. package/src/components/baseTabs/index.vue +16 -8
  23. package/src/components/baseTabs/mixins.js +166 -1
  24. package/src/components/cnPrint/index.js +44 -1
  25. package/src/components/cnPrint/mixins.js +189 -1
  26. package/src/components/code-editor/index.vue +130 -62
  27. package/src/components/confirmDialog/index.js +41 -1
  28. package/src/components/confirmDialog/index.vue +24 -17
  29. package/src/components/confirmDialog/mixins.js +31 -1
  30. package/src/components/errorMsg/index.js +1 -1
  31. package/src/components/errorMsg/index.vue +78 -70
  32. package/src/components/errorMsg/mixins.js +6 -5
  33. package/src/components/excelExport/button.vue +86 -24
  34. package/src/components/excelExport/exportFieldDialog.vue +215 -81
  35. package/src/components/excelExport/index.js +6 -6
  36. package/src/components/excelExport/index.vue +108 -26
  37. package/src/components/excelExport/mixins.js +2 -2
  38. package/src/components/excelImport/index.js +13 -13
  39. package/src/components/excelImport/mixins.js +2 -1
  40. package/src/components/fileLibrary/fileObjAuthDialog.vue +179 -89
  41. package/src/components/fileLibrary/fileObjAuthEditDialog.vue +6 -0
  42. package/src/components/fileLibrary/filterDialog.vue +454 -0
  43. package/src/components/fileLibrary/index.vue +605 -262
  44. package/src/components/fileLibrary/mixins/categoryMoveDialogMixins.js +1 -1
  45. package/src/components/fileLibrary/mixins/fileCategoryDialogMixins.js +1 -1
  46. package/src/components/fileLibrary/mixins/fileHistoryDialogMixins.js +2 -2
  47. package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +339 -211
  48. package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +31 -27
  49. package/src/components/fileLibrary/mixins/fileObjAuthEditMixin.js +4 -4
  50. package/src/components/fileLibrary/mixins/indexMixins.js +220 -101
  51. package/src/components/fileLibrary/mixins/propertiesDialogMixins.js +64 -4
  52. package/src/components/fileLibrary/mixins/recycleBinDialogMixins.js +3 -3
  53. package/src/components/fileLibrary/propertiesDialog.vue +113 -74
  54. package/src/components/fileLibrary/shareDialog.vue +1 -1
  55. package/src/components/formOplog/mixins.js +85 -4
  56. package/src/components/hiprint/css/bootstrap.min.css +6 -0
  57. package/src/components/hiprint/fonts/glyphicons-halflings-regular.eot +0 -0
  58. package/src/components/hiprint/fonts/glyphicons-halflings-regular.svg +288 -0
  59. package/src/components/hiprint/fonts/glyphicons-halflings-regular.ttf +0 -0
  60. package/src/components/hiprint/fonts/glyphicons-halflings-regular.woff +0 -0
  61. package/src/components/hiprint/fonts/glyphicons-halflings-regular.woff2 +0 -0
  62. package/src/components/hiprint/hiprint.bundle.js +15 -3
  63. package/src/components/hiprint/view/design/index.vue +140 -47
  64. package/src/components/hiprint/view/design/mixins.js +611 -1
  65. package/src/components/hiprint/view/design/preview.vue +75 -52
  66. package/src/components/hiprint/view/json-view.vue +31 -31
  67. package/src/components/jdPrint/index.js +44 -1
  68. package/src/components/jdPrint/mixins.js +208 -1
  69. package/src/components/jsonImport/index.js +187 -17
  70. package/src/components/jsonImport/mixins.js +333 -1
  71. package/src/components/langImport/index.js +80 -1
  72. package/src/components/langImport/mixins.js +500 -16
  73. package/src/components/langTag/mixins/addButton.js +51 -5
  74. package/src/components/langTag/mixins/deleteButton.js +55 -5
  75. package/src/components/langTag/mixins/view.js +47 -5
  76. package/src/components/luckysheet/dialog.vue +159 -0
  77. package/src/components/luckysheet/export.js +595 -0
  78. package/src/components/luckysheet/fileUtils.js +147 -0
  79. package/src/components/luckysheet/index.js +72 -0
  80. package/src/components/luckysheet/templateJson.js +12078 -0
  81. package/src/components/luckysheet/view.vue +210 -0
  82. package/src/components/obsUpload/index.js +34 -0
  83. package/src/components/obsUpload/index.vue +231 -0
  84. package/src/components/obsUpload/mixins.js +1476 -0
  85. package/src/components/onlineTalk/index.vue +1 -1
  86. package/src/components/onlineTalk/mixins.js +852 -1
  87. package/src/components/onlineTalk/talkUserDialog.vue +280 -0
  88. package/src/components/oplogTable/mixins.js +83 -4
  89. package/src/components/pddPrint/index.js +44 -1
  90. package/src/components/pddPrint/mixins.js +252 -1
  91. package/src/components/projectTag/mixins/addButton.js +52 -1
  92. package/src/components/projectTag/mixins/deleteButton.js +52 -1
  93. package/src/components/projectTag/mixins/view.js +43 -1
  94. package/src/components/scriptDescription/button.vue +12 -4
  95. package/src/components/scriptDescription/mixins.js +30 -1
  96. package/src/components/scriptTest/mixins.js +90 -1
  97. package/src/components/statusTag/mixins.js +66 -1
  98. package/src/components/table/CellSlot.vue +1 -0
  99. package/src/components/table/config.js +1 -1
  100. package/src/components/table/index.js +12 -11
  101. package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js +11028 -0
  102. package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css +200 -0
  103. package/src/components/table/tableForm.vue +99 -63
  104. package/src/components/table/tableFormMixin.js +1 -1
  105. package/src/components/table/util/index.js +339 -0
  106. package/src/components/table/vxeFilter/index.js +2 -1
  107. package/src/components/table/vxeFilter/mixin.js +8 -6
  108. package/src/components/tempStorage/index.vue +76 -55
  109. package/src/components/tempStorage/tempStorageDialog.vue +179 -54
  110. package/src/components/vb-tabs/x-tabs.vue +56 -30
  111. package/src/components/vipPrint/index.js +44 -1
  112. package/src/components/vipPrint/mixins.js +268 -1
  113. package/src/components/wf/addOpinionButton.vue +57 -0
  114. package/src/components/wf/content.vue +834 -362
  115. package/src/components/wf/mixins/addOpinionButton.js +53 -0
  116. package/src/components/wf/mixins/setCandidateButton.js +161 -0
  117. package/src/components/wf/mixins/setCandidateDialog.js +213 -1
  118. package/src/components/wf/mixins/setCandidateDialog2.js +252 -0
  119. package/src/components/wf/mixins/wfFlowEleScriptDialog.js +131 -0
  120. package/src/components/wf/mixins/wfTaskUserRangeDialog.js +69 -0
  121. package/src/components/wf/setCandidateButton.vue +40 -0
  122. package/src/components/wf/setCandidateDialog.vue +10 -0
  123. package/src/components/wf/setCandidateDialog2.vue +105 -0
  124. package/src/components/wf/wf.js +2156 -1
  125. package/src/components/wf/wfFlowEleScriptDialog.vue +89 -0
  126. package/src/components/wf/wfStartDialog.vue +66 -42
  127. package/src/components/wf/wfTaskUserRangeDialog.vue +65 -0
  128. package/src/components/wf/wfUtil.js +279 -1
  129. package/src/components/xform/form-designer/designer.js +1995 -9
  130. package/src/components/xform/form-designer/form-widget/components/gantt/index.vue +434 -0
  131. package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +1 -1
  132. package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +9 -8
  133. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +4 -1
  134. package/src/components/xform/form-designer/form-widget/container-widget/detail-pane-widget.vue +3 -2
  135. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +3 -3
  136. package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog copy.vue +971 -0
  137. package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog.vue +971 -0
  138. package/src/components/xform/form-designer/form-widget/dialog/exportDialog.vue +13 -0
  139. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +301 -0
  140. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +85 -48
  141. package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +5 -1
  142. package/src/components/xform/form-designer/form-widget/dialog/formulaDialog.vue +799 -0
  143. package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +30 -7
  144. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1762 -9
  145. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +222 -75
  146. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +2 -2
  147. package/src/components/xform/form-designer/form-widget/field-widget/a-text-widget.vue +1 -1
  148. package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +32 -4
  149. package/src/components/xform/form-designer/form-widget/field-widget/button-widget.vue +1 -1
  150. package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +19 -1
  151. package/src/components/xform/form-designer/form-widget/field-widget/census-widget.vue +40 -28
  152. package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +18 -7
  153. package/src/components/xform/form-designer/form-widget/field-widget/color-widget.vue +4 -1
  154. package/src/components/xform/form-designer/form-widget/field-widget/copy_button-widget.vue +95 -0
  155. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +14 -3
  156. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +48 -5
  157. package/src/components/xform/form-designer/form-widget/field-widget/download-button-widget.vue +133 -0
  158. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-item-widget.vue +86 -0
  159. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-widget.vue +170 -0
  160. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1654 -16
  161. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +805 -379
  162. package/src/components/xform/form-designer/form-widget/field-widget/gantt-widget.vue +964 -0
  163. package/src/components/xform/form-designer/form-widget/field-widget/html-text-widget.vue +6 -2
  164. package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +22 -11
  165. package/src/components/xform/form-designer/form-widget/field-widget/import2-button-widget.vue +90 -0
  166. package/src/components/xform/form-designer/form-widget/field-widget/input-widget.vue +7 -2
  167. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +157 -0
  168. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +2 -1
  169. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +2 -1
  170. package/src/components/xform/form-designer/form-widget/field-widget/mixins/utc-transform-mixin.js +75 -0
  171. package/src/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin.js +179 -0
  172. package/src/components/xform/form-designer/form-widget/field-widget/multiSearch-widget.vue +53 -0
  173. package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +114 -81
  174. package/src/components/xform/form-designer/form-widget/field-widget/oplog-widget.vue +186 -0
  175. package/src/components/xform/form-designer/form-widget/field-widget/print-button-widget.vue +55 -28
  176. package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +119 -0
  177. package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +154 -47
  178. package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +26 -6
  179. package/src/components/xform/form-designer/form-widget/field-widget/search_button-widget.vue +2 -2
  180. package/src/components/xform/form-designer/form-widget/field-widget/select-export-button-widget.vue +86 -0
  181. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +92 -0
  182. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +24 -9
  183. package/src/components/xform/form-designer/form-widget/field-widget/singerSearch-widget.vue +53 -0
  184. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +145 -0
  185. package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +12 -1
  186. package/src/components/xform/form-designer/form-widget/field-widget/static-text-widget.vue +8 -3
  187. package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +82 -49
  188. package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +38 -38
  189. package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +99 -0
  190. package/src/components/xform/form-designer/form-widget/field-widget/tempStorage-widget.vue +147 -0
  191. package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +111 -34
  192. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +4 -3
  193. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +2 -1
  194. package/src/components/xform/form-designer/form-widget/field-widget/vabSearch-widget.vue +3 -171
  195. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +191 -66
  196. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +753 -0
  197. package/src/components/xform/form-designer/form-widget/indexMixin.js +1 -1
  198. package/src/components/xform/form-designer/indexMixin.js +3 -2
  199. package/src/components/xform/form-designer/refMixinDesign.js +1 -28
  200. package/src/components/xform/form-designer/setting-panel/form-setting.vue +981 -172
  201. package/src/components/xform/form-designer/setting-panel/index.vue +41 -32
  202. package/src/components/xform/form-designer/setting-panel/indexMixin.js +1 -1
  203. package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +537 -302
  204. package/src/components/xform/form-designer/setting-panel/property-editor/a-link-editor.vue +4 -4
  205. package/src/components/xform/form-designer/setting-panel/property-editor/a-text-editor.vue +3 -3
  206. package/src/components/xform/form-designer/setting-panel/property-editor/autoValueEnabled-editor.vue +38 -0
  207. package/src/components/xform/form-designer/setting-panel/property-editor/buttonIcon-editor.vue +14 -15
  208. package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +6 -0
  209. package/src/components/xform/form-designer/setting-panel/property-editor/colorClass-editor.vue +28 -0
  210. package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +41 -0
  211. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +125 -0
  212. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +998 -1042
  213. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/edit-tree-button-group-config-dialog.vue +281 -0
  214. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +432 -0
  215. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/onCheckboxChange-editor.vue +1 -1
  216. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +1404 -533
  217. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +3 -3
  218. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-pane/detail-pane-editor.vue +3 -3
  219. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
  220. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
  221. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
  222. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +0 -8
  223. package/src/components/xform/form-designer/setting-panel/property-editor/container-tree/tree-customClass-editor.vue +31 -2
  224. package/src/components/xform/form-designer/setting-panel/property-editor/copyButton-editor.vue +36 -0
  225. package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +32 -0
  226. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +133 -0
  227. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin.js +2 -2
  228. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onAfterConfirmFile-editor.vue +5 -3
  229. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +23 -8
  230. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindEvent-editor.vue +35 -20
  231. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/icon-editor.vue +14 -15
  232. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +64 -5
  233. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-dateLimit-editor.vue +157 -0
  234. package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-item-editor.vue +21 -0
  235. package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -0
  236. package/src/components/xform/form-designer/setting-panel/property-editor/field-gantt/gantt-editor.vue +36 -0
  237. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +77 -20
  238. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -0
  239. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +44 -15
  240. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +115 -0
  241. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
  242. package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/preWrap-editor.vue +23 -0
  243. package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/textContent-editor.vue +1 -1
  244. package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +67 -41
  245. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-button-editor.vue +56 -0
  246. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +71 -0
  247. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +13 -1
  248. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +33 -1
  249. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +66 -0
  250. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +89 -19
  251. package/src/components/xform/form-designer/setting-panel/property-editor/formatType-editor.vue +137 -0
  252. package/src/components/xform/form-designer/setting-panel/property-editor/formula-editor.vue +721 -466
  253. package/src/components/xform/form-designer/setting-panel/property-editor/labelColor-editor.vue +20 -11
  254. package/src/components/xform/form-designer/setting-panel/property-editor/labelIconClass-editor.vue +17 -16
  255. package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +25 -25
  256. package/src/components/xform/form-designer/setting-panel/property-editor/labelTooltip-editor.vue +11 -13
  257. package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
  258. package/src/components/xform/form-designer/setting-panel/property-editor/multiple-editor.vue +19 -14
  259. package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
  260. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +126 -50
  261. package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +31 -0
  262. package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +1 -1
  263. package/src/components/xform/form-designer/setting-panel/property-editor/prefixIcon-editor.vue +14 -15
  264. package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +349 -0
  265. package/src/components/xform/form-designer/setting-panel/property-editor/required-editor.vue +10 -6
  266. package/src/components/xform/form-designer/setting-panel/property-editor/requiredHint-editor.vue +3 -3
  267. package/src/components/xform/form-designer/setting-panel/property-editor/suffixIcon-editor.vue +14 -15
  268. package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue +42 -0
  269. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +305 -19
  270. package/src/components/xform/form-designer/setting-panel/property-editor/utcTransformEnabled-editor.vue +19 -0
  271. package/src/components/xform/form-designer/setting-panel/property-editor/validation-editor.vue +2 -2
  272. package/src/components/xform/form-designer/setting-panel/property-editor/validationHint-editor.vue +2 -2
  273. package/src/components/xform/form-designer/setting-panel/property-editor/wfFlag-editor.vue +372 -50
  274. package/src/components/xform/form-designer/setting-panel/property-editor/widgetShowRuleFlag-editor.vue +263 -0
  275. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +224 -187
  276. package/src/components/xform/form-designer/setting-panel/widgetPropertyDialogMixin.js +173 -0
  277. package/src/components/xform/form-designer/toolbar-panel/index.vue +267 -103
  278. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +1 -1
  279. package/src/components/xform/form-designer/widget-panel/index.vue +21 -1
  280. package/src/components/xform/form-designer/widget-panel/indexMixin.js +19 -18
  281. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1743 -950
  282. package/src/components/xform/form-render/container-item/containerItemMixin.js +1237 -11
  283. package/src/components/xform/form-render/container-item/data-table-item.vue +209 -196
  284. package/src/components/xform/form-render/container-item/data-table-mixin.js +3478 -18
  285. package/src/components/xform/form-render/container-item/detail-item.vue +72 -48
  286. package/src/components/xform/form-render/container-item/detail-pane-item.vue +17 -3
  287. package/src/components/xform/form-render/container-item/grid-col-item.vue +10 -3
  288. package/src/components/xform/form-render/container-item/grid-item.vue +1 -1
  289. package/src/components/xform/form-render/container-item/list-h5-item.vue +1178 -419
  290. package/src/components/xform/form-render/container-item/tab-item.vue +62 -25
  291. package/src/components/xform/form-render/container-item/table-cell-item.vue +38 -32
  292. package/src/components/xform/form-render/container-item/table-item.vue +4 -2
  293. package/src/components/xform/form-render/container-item/table2-cell-item.vue +53 -34
  294. package/src/components/xform/form-render/container-item/table2-item.vue +182 -91
  295. package/src/components/xform/form-render/container-item/tree-item.vue +32 -11
  296. package/src/components/xform/form-render/dynamicDialogRender.js +1 -1
  297. package/src/components/xform/form-render/index.vue +77 -20
  298. package/src/components/xform/form-render/indexMixin.js +3719 -12
  299. package/src/components/xform/form-render/refMixin.js +3 -3
  300. package/src/components/xform/icon-picker/icons.json +284 -0
  301. package/src/components/xform/icon-picker/index.vue +145 -0
  302. package/src/components/xform/lang/zh-CN.js +29 -4
  303. package/src/components/xform/mixins/defaultHandle.js +367 -2
  304. package/src/components/xform/mixins/scriptHttp.js +3 -1
  305. package/src/components/xform/utils/emitter.js +4 -4
  306. package/src/components/xform/utils/formHttp.js +162 -0
  307. package/src/components/xform/utils/format.js +41 -34
  308. package/src/components/xform/utils/formula-util.js +969 -0
  309. package/src/components/xform/utils/smart-vue-i18n/index.js +2 -1
  310. package/src/components/xform/utils/util.js +1406 -1
  311. package/src/components/xform/utils/validators.js +2 -5
  312. package/src/components/xform/utils/vue2js-generator.js +2 -2
  313. package/src/components/xhsPrint/index.js +44 -1
  314. package/src/components/xhsPrint/mixins.js +269 -1
  315. package/src/directive/LimitNumber/index.js +125 -1
  316. package/src/directive/el-dialog-center/index.js +34 -1
  317. package/src/directive/el-drag-dialog/drag.js +86 -1
  318. package/src/directive/el-readonly/index.js +15 -1
  319. package/src/directive/permission/hasPermi.js +34 -1
  320. package/src/index.js +215 -190
  321. package/src/lang/index.js +56 -51
  322. package/src/lang/locale/en/login.js +27 -0
  323. package/src/lang/locale/zh/login.js +26 -0
  324. package/src/layout/components/AppMain.vue +8 -1
  325. package/src/layout/components/Sidebar/default.vue +1604 -1222
  326. package/src/layout/components/Sidebar/index.vue +6 -1
  327. package/src/layout/components/TagsView/index.vue +43 -12
  328. package/src/layout/components/createCompany/createCompanyDialog.vue +157 -0
  329. package/src/layout/components/extractedCode/createDialog.vue +92 -0
  330. package/src/layout/components/extractedCode/queryDialog.vue +103 -0
  331. package/src/layout/components/extractedCode/viewDialog.vue +207 -0
  332. package/src/layout/components/langTool.vue +33 -30
  333. package/src/layout/components/watermark/index.vue +83 -0
  334. package/src/layout/defaultLayout.vue +17 -9
  335. package/src/mixins/selectDialog/index.js +266 -1
  336. package/src/mixins/tableTree/index.js +199 -4
  337. package/src/mixins/wf/index.js +33 -1
  338. package/src/permission.js +135 -18
  339. package/src/resources/js/base/common.js +109 -109
  340. package/src/router/index.js +4 -7
  341. package/src/router/modules/customer.js +12 -18
  342. package/src/router/modules/system.js +4 -0
  343. package/src/store/config/index.js +83 -14
  344. package/src/store/getters.js +4 -1
  345. package/src/store/modules/permission.js +46 -41
  346. package/src/store/modules/settings.js +1 -1
  347. package/src/store/modules/tagsView.js +5 -8
  348. package/src/store/modules/user.js +367 -16
  349. package/src/utils/aes.js +2 -1
  350. package/src/utils/auth.js +1 -1
  351. package/src/utils/global.js +1 -1
  352. package/src/utils/index.js +2 -3
  353. package/src/utils/keepAlive.js +1 -1
  354. package/src/utils/pddLog.js +92 -0
  355. package/src/utils/pdfUtil.js +71 -0
  356. package/src/utils/request.js +1 -1
  357. package/src/utils/vab.js +1283 -27
  358. package/src/utils/validate.js +1 -1
  359. package/src/utils/wf.js +4 -4
  360. package/src/views/bd/setting/bd_attach_setting/edit.vue +5 -5
  361. package/src/views/bd/setting/bd_attach_setting/list.vue +28 -55
  362. package/src/views/bd/setting/bd_attach_setting/mixins/dialog.js +84 -1
  363. package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +116 -5
  364. package/src/views/bd/setting/bd_attach_setting/mixins/list.js +239 -1
  365. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -0
  366. package/src/views/bd/setting/bd_company_env/edit.vue +193 -0
  367. package/src/views/bd/setting/bd_company_env/list.vue +175 -0
  368. package/src/views/bd/setting/config_manage/list.vue +83 -0
  369. package/src/views/bd/setting/formVersion/button.vue +55 -0
  370. package/src/views/bd/setting/formVersion/compareBasicSection.vue +120 -0
  371. package/src/views/bd/setting/formVersion/compareCodeSection.vue +518 -0
  372. package/src/views/bd/setting/formVersion/compareContMixin.scss +55 -0
  373. package/src/views/bd/setting/formVersion/compareContent.vue +63 -0
  374. package/src/views/bd/setting/formVersion/compareDialog.vue +88 -0
  375. package/src/views/bd/setting/formVersion/compareMixin.js +93 -0
  376. package/src/views/bd/setting/formVersion/fieldCompare.vue +54 -0
  377. package/src/views/bd/setting/formVersion/formScriptCompareView.vue +94 -0
  378. package/src/views/bd/setting/formVersion/formTemplateCompareView.vue +74 -0
  379. package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +400 -0
  380. package/src/views/bd/setting/formVersion/link.vue +58 -0
  381. package/src/views/bd/setting/formVersion/preformDialog.vue +87 -0
  382. package/src/views/bd/setting/formVersion/reverButton.vue +82 -0
  383. package/src/views/bd/setting/formVersion/tableDetailDiff.js +78 -0
  384. package/src/views/bd/setting/formVersion/tableModelCompareView.vue +440 -0
  385. package/src/views/bd/setting/formVersion/textDiff.js +102 -0
  386. package/src/views/bd/setting/form_import_log/edit.vue +130 -0
  387. package/src/views/bd/setting/form_import_log/list.vue +211 -0
  388. package/src/views/bd/setting/form_script/edit.vue +196 -74
  389. package/src/views/bd/setting/form_script/edit1.vue +410 -187
  390. package/src/views/bd/setting/form_script/form_list.vue +118 -37
  391. package/src/views/bd/setting/form_script/list.vue +90 -21
  392. package/src/views/bd/setting/form_script/list1.vue +200 -118
  393. package/src/views/bd/setting/form_script/mixins/dialog.js +130 -1
  394. package/src/views/bd/setting/form_script/mixins/edit.js +265 -7
  395. package/src/views/bd/setting/form_script/mixins/edit1.js +259 -9
  396. package/src/views/bd/setting/form_script/mixins/form_list.js +322 -14
  397. package/src/views/bd/setting/form_script/mixins/list.js +278 -4
  398. package/src/views/bd/setting/form_script/mixins/list1.js +480 -14
  399. package/src/views/bd/setting/form_script/mixins/list2.js +10 -1
  400. package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +194 -0
  401. package/src/views/bd/setting/form_script/mixins/preformDialog.js +34 -1
  402. package/src/views/bd/setting/form_script/otherAuthDialog.vue +83 -0
  403. package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +3 -3
  404. package/src/views/bd/setting/form_template/edit.vue +355 -184
  405. package/src/views/bd/setting/form_template/formDesignerDialog.vue +171 -0
  406. package/src/views/bd/setting/form_template/list.vue +296 -214
  407. package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +279 -1
  408. package/src/views/bd/setting/form_template/mixins/dialog.js +103 -1
  409. package/src/views/bd/setting/form_template/mixins/edit.js +277 -9
  410. package/src/views/bd/setting/form_template/mixins/editWfObjConfigDialog.js +92 -1
  411. package/src/views/bd/setting/form_template/mixins/ftHistoryDialog.js +91 -1
  412. package/src/views/bd/setting/form_template/mixins/itemEdit.js +104 -1
  413. package/src/views/bd/setting/form_template/mixins/itemList.js +234 -1
  414. package/src/views/bd/setting/form_template/mixins/list.js +672 -22
  415. package/src/views/bd/setting/form_template/mixins/list2.js +411 -0
  416. package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +193 -0
  417. package/src/views/bd/setting/form_template/mixins/preformDialog.js +28 -3
  418. package/src/views/bd/setting/form_template/mixins/wf_list.js +421 -3
  419. package/src/views/bd/setting/form_template/otherAuthDialog.vue +83 -0
  420. package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +2 -2
  421. package/src/views/bd/setting/form_template/wf_list.vue +161 -127
  422. package/src/views/bd/setting/logic_param/edit.vue +146 -0
  423. package/src/views/bd/setting/logic_param/edit1.vue +106 -0
  424. package/src/views/bd/setting/logic_param/edit2.vue +139 -0
  425. package/src/views/bd/setting/logic_param/list.vue +74 -0
  426. package/src/views/bd/setting/logic_param/list1.vue +12 -0
  427. package/src/views/bd/setting/logic_param/list2.vue +12 -0
  428. package/src/views/bd/setting/logic_param/mixins/edit.js +93 -0
  429. package/src/views/bd/setting/logic_param/mixins/list.js +376 -0
  430. package/src/views/bd/setting/menu_kind/list.vue +172 -83
  431. package/src/views/bd/setting/menu_kind/mixins/authDialog.js +300 -7
  432. package/src/views/bd/setting/menu_kind/mixins/dialog.js +139 -1
  433. package/src/views/bd/setting/menu_kind/mixins/list.js +201 -1
  434. package/src/views/bd/setting/push_data/edit.vue +139 -0
  435. package/src/views/bd/setting/push_data/list.vue +283 -0
  436. package/src/views/bd/setting/push_data_h/edit.vue +153 -0
  437. package/src/views/bd/setting/push_data_h/list.vue +293 -0
  438. package/src/views/bd/setting/request_async_setting/edit.vue +320 -0
  439. package/src/views/bd/setting/request_async_setting/list.vue +372 -0
  440. package/src/views/bd/setting/request_setting/edit.vue +300 -0
  441. package/src/views/bd/setting/request_setting/list.vue +301 -0
  442. package/src/views/bd/setting/table_model/edit.vue +1079 -426
  443. package/src/views/bd/setting/table_model/list.vue +213 -128
  444. package/src/views/bd/setting/table_model/mixins/dialog.js +71 -1
  445. package/src/views/bd/setting/table_model/mixins/edit.js +1309 -13
  446. package/src/views/bd/setting/table_model/mixins/list.js +429 -2
  447. package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +201 -0
  448. package/src/views/bd/setting/table_model/mixins/zdDialog.js +114 -3
  449. package/src/views/bd/setting/table_model/otherAuthDialog.vue +83 -0
  450. package/src/views/bd/setting/utils/index.js +60 -1
  451. package/src/views/user/access_log/list.vue +418 -349
  452. package/src/views/user/area/dialog.vue +223 -117
  453. package/src/views/user/area/list.vue +318 -0
  454. package/src/views/user/common_attribute/list.vue +4 -1
  455. package/src/views/user/company_info/dialog.vue +195 -163
  456. package/src/views/user/extend_datasource/dialog.vue +3 -0
  457. package/src/views/user/extend_datasource/edit.vue +2 -1
  458. package/src/views/user/extend_datasource/list.vue +3 -0
  459. package/src/views/user/fieldTranslation/editDialog.vue +8 -8
  460. package/src/views/user/fieldTranslation/list.vue +33 -33
  461. package/src/views/user/form/vform/designer.vue +790 -749
  462. package/src/views/user/form/vform/out_render.vue +1 -1
  463. package/src/views/user/form/vform/render.vue +67 -37
  464. package/src/views/user/form/view/edit.vue +38 -37
  465. package/src/views/user/form/view/list.vue +287 -49
  466. package/src/views/user/home/default.vue +1117 -979
  467. package/src/views/user/home/dev.vue +29 -0
  468. package/src/views/user/home/index.vue +18 -7
  469. package/src/views/user/login/default.vue +165 -36
  470. package/src/views/user/login/index.vue +4 -6
  471. package/src/views/user/login/indexMixin.js +329 -118
  472. package/src/views/user/menu/list.vue +27 -1
  473. package/src/views/user/notify_message/dialog.vue +44 -22
  474. package/src/views/user/notify_template/edit.vue +188 -187
  475. package/src/views/user/notify_template/edit2.vue +176 -0
  476. package/src/views/user/notify_template/list.vue +4 -1
  477. package/src/views/user/notify_template/list2.vue +190 -0
  478. package/src/views/user/outLink/form_view.vue +211 -211
  479. package/src/views/user/outLink/index.vue +67 -11
  480. package/src/views/user/position/list.vue +112 -72
  481. package/src/views/user/project_tag/dialog.vue +9 -4
  482. package/src/views/user/project_tag/edit.vue +2 -2
  483. package/src/views/user/project_tag/list.vue +9 -4
  484. package/src/views/user/request_setting/edit.vue +258 -0
  485. package/src/views/user/request_setting/list.vue +248 -0
  486. package/src/views/user/role/authConfig.vue +89 -0
  487. package/src/views/user/role/dialog.vue +70 -48
  488. package/src/views/user/role/edit.vue +609 -429
  489. package/src/views/user/role/list.vue +4 -4
  490. package/src/views/user/sale_org/dialog.vue +1 -1
  491. package/src/views/user/sale_org/list.vue +4 -1
  492. package/src/views/user/system_notice/infoDialog.vue +2 -1
  493. package/src/views/user/user/dialog.vue +46 -23
  494. package/src/views/user/user/edit.vue +1391 -1021
  495. package/src/views/user/user/form_dialog.vue +158 -0
  496. package/src/views/user/user/form_info.vue +210 -0
  497. package/src/views/user/user/info.vue +253 -140
  498. package/src/views/user/user/list.vue +652 -563
  499. package/src/views/user/user/modifyPasswordDialog.vue +64 -53
  500. package/src/views/user/wf/wfReport/index.vue +619 -0
  501. package/src/views/user/wf/wf_auto_submit_data/list.vue +2 -0
  502. package/src/views/user/wf/wf_manage/list.vue +379 -250
  503. package/src/views/user/wf/wf_manage/list2.vue +854 -0
  504. package/src/views/user/wf/wf_manage/wfContentDialog.vue +25 -22
  505. package/src/views/user/wf/wf_obj_config/importItemDialog.vue +109 -0
  506. package/src/views/user/wf/wf_obj_config/itemEdit.vue +25 -1
  507. package/src/views/user/wf/wf_obj_config/list.vue +114 -9
  508. package/src/views/user/wf/wf_transfer_setting/edit.vue +282 -0
  509. package/src/views/user/wf/wf_transfer_setting/list.vue +319 -0
  510. package/src/views/user/workbench_menu/list.vue +555 -0
  511. package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1347
@@ -1,214 +1,302 @@
1
1
  <template>
2
- <div>
3
- <el-dialog
4
- custom-class="dialog-style list-dialog"
5
- :title="i18nt('designer.setting.tableColEdit')"
6
- :visible.sync="showDialog"
7
- :modal="false"
8
- :show-close="!0"
9
- :close-on-click-modal="!1"
10
- :close-on-press-escape="!1"
11
- :destroy-on-close="!0"
12
- top="5vh"
13
- width="1220px"
14
- v-dialog-drag
15
- @closed="closeHandle"
2
+ <el-dialog
3
+ custom-class="dialog-style list-dialog table-column-config-dialog"
4
+ :title="i18nt('designer.setting.tableColEdit')"
5
+ :visible.sync="showDialog"
6
+ :modal="false"
7
+ :show-close="!0"
8
+ :close-on-click-modal="!1"
9
+ :close-on-press-escape="!1"
10
+ :destroy-on-close="false"
11
+ top="5vh"
12
+ width="1220px"
13
+ v-dialog-drag
14
+ :before-close="closeHandle"
15
+ >
16
+ <div
17
+ class="cont table-column-dialog-cont"
18
+ v-loading="!tableReady"
19
+ element-loading-background="rgba(0, 0, 0, 0)"
20
+ element-loading-text="数据正在加载中"
21
+ element-loading-spinner="el-icon-loading"
16
22
  >
17
- <div class="cont">
18
- <el-table
19
- ref="singleTable"
20
- width="100%"
21
- :data="tableData"
22
- height="500"
23
- border=""
24
- row-key="columnId"
25
- stripe=""
26
- :tree-props="{ children: 'children' }"
27
- default-expand-all
23
+ <el-table
24
+ v-if="tableReady"
25
+ ref="singleTable"
26
+ width="100%"
27
+ :data="tableData"
28
+ height="500"
29
+ border=""
30
+ row-key="columnId"
31
+ stripe=""
32
+ :tree-props="{ children: 'children' }"
33
+ :default-expand-all="shouldExpandAllTable"
34
+ >
35
+ <el-table-column label="" width="80" fixed="left">
36
+ <template #default="scope">
37
+ <span>{{ scope.$index + 1 }}</span>
38
+ </template>
39
+ </el-table-column>
40
+ <el-table-column label="" width="35" fixed="left"
41
+ ><i class="el-icon-s-operation drag-option"></i>
42
+ </el-table-column>
43
+ <el-table-column
44
+ :label="i18nt('designer.setting.columnLabel')"
45
+ width="150"
46
+ prop="label"
47
+ fixed="left"
28
48
  >
29
- <el-table-column label="" min-width="80" fixed="left">
30
- <template slot-scope="scope">
31
- <span>{{ scope.$index + 1 }}</span>
32
- </template>
33
- </el-table-column>
34
- <el-table-column label="" width="35" fixed="left"><i class="el-icon-s-operation drag-option"></i>
35
- </el-table-column>
36
- <el-table-column :label="i18nt('designer.setting.columnLabel')" width="150" prop="label" fixed="left">
37
- <template slot-scope="scope">
38
- <el-input v-model="scope.row.label"></el-input>
39
- </template>
40
- </el-table-column>
41
- <el-table-column :label="i18nt('designer.setting.columnName')" width="150" prop="prop">
42
- <template slot-scope="scope">
43
- <el-input v-model="scope.row.prop" :disabled="'editAttachment' == scope.row.formatS"></el-input>
44
- </template>
45
- </el-table-column>
46
- <el-table-column :label="i18nt('designer.setting.columnWidth')" width="100" prop="width">
47
- <template slot-scope="scope">
48
- <el-input v-model="scope.row.width"></el-input>
49
- </template>
50
- </el-table-column>
51
- <el-table-column :label="i18nt('designer.setting.visibleColumn')" width="70" prop="show">
52
- <template slot-scope="scope">
53
- <el-switch v-model="scope.row.show"></el-switch>
54
- </template>
55
- </el-table-column>
56
- <el-table-column :label="i18nt('必填')" width="70" prop="required">
57
- <template slot-scope="scope">
58
- <el-switch v-model="scope.row.required"></el-switch>
59
- </template>
60
- </el-table-column>
61
- <el-table-column :label="i18nt('designer.setting.sortableColumn')" width="70" prop="sortable">
62
- <template slot-scope="scope">
63
- <el-switch v-model="scope.row.sortable"></el-switch>
64
- </template>
65
- </el-table-column>
66
- <el-table-column :label="i18nt('designer.setting.fixedColumn')" width="100" prop="fixed">
67
- <template slot-scope="scope">
68
- <el-select v-model="scope.row.fixed" clearable>
69
- <el-option value="left">left</el-option>
70
- <el-option value="right">right</el-option>
71
- </el-select>
72
- </template>
73
- </el-table-column>
74
- <!-- <el-table-column :label="i18nt('designer.setting.alignTypeOfColumn')" width="100" prop="align">
75
- <template slot-scope="scope">
76
- <el-select v-model="scope.row.align">
77
- <el-option v-for="(e,index) in alignOptions" :key="index" :value="e.value" :label="e.label"></el-option>
78
- </el-select>
79
- </template>
80
- </el-table-column>-->
81
- <el-table-column :label="i18nt('designer.setting.formatOfColumn')" width="200" prop="formatS">
82
- <template slot-scope="scope">
83
- <el-select v-model="scope.row.formatS" @change="changeFormatS(scope.row)" clearable>
84
- <el-option-group :label="i18nt('designer.setting.customRenderGroup')">
85
- <el-option value="render" label="render"></el-option>
86
- </el-option-group>
87
- <el-option-group v-for="t in op" :key="t.label" :label="t.label">
88
- <el-option v-for="e in t.options" :key="e.value" :value="e.value" :label="e.label"></el-option>
89
- </el-option-group>
90
- </el-select>
91
- </template>
92
- </el-table-column>
93
- <el-table-column :label="i18nt('自定义表格列配置')" width="150">
94
- <template slot-scope="scope">
95
- <a href="javascript:void(0);" class="a-link link-oneLind"
96
- @click="openTableColumnConfigDialog(scope.row,scope.$index)">
97
- <span>{{ scope.row.tableColumnConfig }}</span>
98
- <i class="el-icon-edit"></i>
99
- </a>
100
- </template>
101
- </el-table-column>
102
- <el-table-column :label="i18nt('编辑下拉列')" width="70" prop="sortable">
103
- <template slot-scope="scope">
104
- <el-switch v-model="scope.row.treeNode"></el-switch>
105
- </template>
106
- </el-table-column>
107
- <el-table-column :label="i18nt('编辑插槽类型')" width="200" prop="editFormatS">
108
- <template slot-scope="scope">
109
- <el-select v-model="scope.row.editFormatS" @change="changeFormatS(scope.row)" clearable>
110
- <el-option v-for="e in editOp" :key="e.value" :value="e.value" :label="e.label"></el-option>
111
- </el-select>
112
- </template>
113
- </el-table-column>
114
- <el-table-column label="编辑插槽配置" width="70" align="center">
115
- <template slot-scope="scope">
116
- <el-button size="mini" plain="" round="" icon="el-icon-edit"
117
- @click="openEditFormatConfigDialog(scope.row,scope.$index)"
118
- :disabled="!scope.row.editFormatS"></el-button>
119
- </template>
120
- </el-table-column>
121
- <el-table-column :label="i18nt('导出类型')" width="200" prop="formatS">
122
- <template slot-scope="scope">
123
- <el-select v-model="scope.row.exportType" clearable>
124
- <el-option value="Image2" label="图片"></el-option>
125
- <el-option value="Number" label="数值"></el-option>
126
- </el-select>
127
- </template>
128
- </el-table-column>
129
- <el-table-column label="格式化配置" width="90" fixed="right" align="center">
130
- <template slot-scope="scope">
131
- <el-button size="mini" plain="" round="" icon="el-icon-edit"
132
- @click="openFormatConfigDialog(scope.row,scope.$index)"
133
- :disabled="!columnFormatMap[scope.row.formatS]"></el-button>
134
- </template>
135
- </el-table-column>
136
- <el-table-column :label="i18nt('designer.setting.renderFunction')" width="70" fixed="right" align="center">
137
- <template slot-scope="scope">
138
- <el-button :disabled="'render' !== scope.row.formatS" size="mini" plain="" round="" icon="el-icon-edit"
139
- @click="showRenderDialog(scope.row)"></el-button>
140
- </template>
141
- </el-table-column>
142
- <el-table-column label="操作" width="150" fixed="right">
143
- <template slot="header">
144
- <el-tooltip
145
- :hide-after="500"
146
- class="item"
147
- effect="dark"
148
- content="添加根节点"
149
- placement="top"
150
- >
151
- <el-button
152
- size="mini" type="" circle=""
153
- icon="el-icon-plus"
154
- @click="onAddRoot"
155
- />
156
- </el-tooltip>
157
- </template>
158
- <template #default="{ row, $index }">
159
- <el-tooltip
160
- :hide-after="hideAfter"
161
- :open-delay="openDelay"
162
- effect="dark"
163
- content="添加兄弟节点"
164
- placement="top"
165
- >
166
- <el-button
167
- size="mini" type="" circle=""
168
- icon="el-icon-plus"
169
- @click="onAddSibling(row, $index)"
170
- />
171
- </el-tooltip>
49
+ <template #default="scope">
50
+ <el-input
51
+ v-model="scope.row.label"
52
+ @change="changeRowLabel(scope.row)"
53
+ ></el-input>
54
+ </template>
55
+ </el-table-column>
56
+ <el-table-column
57
+ :label="i18nt('designer.setting.columnName')"
58
+ width="150"
59
+ prop="prop"
60
+ >
61
+ <template #default="scope">
62
+ <el-input
63
+ v-model="scope.row.prop"
64
+ @change="changeRowProp(scope.row)"
65
+ :disabled="'editAttachment' == scope.row.formatS"
66
+ ></el-input>
67
+ </template>
68
+ </el-table-column>
69
+ <el-table-column
70
+ :label="i18nt('designer.setting.columnWidth')"
71
+ width="100"
72
+ prop="width"
73
+ >
74
+ <template #default="scope">
75
+ <el-input v-model="scope.row.width"></el-input>
76
+ </template>
77
+ </el-table-column>
172
78
 
173
- <el-tooltip
174
- :hide-after="hideAfter"
175
- :open-delay="openDelay"
176
- effect="dark"
177
- content="添加子节点"
178
- placement="top"
179
- >
180
- <el-button
181
- size="mini" type="" circle=""
182
- icon="el-icon-circle-plus-outline"
183
- @click="onAddChild(row, $index)"
184
- />
185
- </el-tooltip>
186
- <el-tooltip
187
- :hide-after="hideAfter"
188
- :open-delay="openDelay"
189
- effect="dark"
190
- content="删除"
191
- placement="top"
79
+ <el-table-column :label="i18nt('必填')" width="70" prop="required">
80
+ <template #default="scope">
81
+ <el-switch
82
+ v-model="scope.row.required"
83
+ @change="changeRowRequired(scope.row)"
84
+ ></el-switch>
85
+ </template>
86
+ </el-table-column>
87
+ <el-table-column
88
+ :label="i18nt('designer.setting.fixedColumn')"
89
+ width="100"
90
+ prop="fixed"
91
+ >
92
+ <template #default="scope">
93
+ <el-select v-model="scope.row.fixed" clearable>
94
+ <el-option value="left">left</el-option>
95
+ <el-option value="right">right</el-option>
96
+ </el-select>
97
+ </template>
98
+ </el-table-column>
99
+ <el-table-column
100
+ :label="i18nt('designer.setting.formatOfColumn')"
101
+ width="200"
102
+ prop="formatS"
103
+ >
104
+ <template #default="scope">
105
+ <el-select
106
+ v-model="scope.row.formatS"
107
+ @change="changeFormatS(scope.row, false)"
108
+ clearable
109
+ >
110
+ <el-option-group
111
+ :label="i18nt('designer.setting.customRenderGroup')"
192
112
  >
193
- <el-button
194
- size="mini" type="" circle=""
195
- icon="el-icon-delete"
196
- @click="onDelete(row, $index)"
197
- />
198
- </el-tooltip>
199
- </template>
200
- </el-table-column>
201
- </el-table>
202
- </div>
203
- <div class="dialog-footer" slot="footer">
204
- <el-button @click="closeHandle" class="button-sty" icon="el-icon-close">
205
- {{ i18nt('designer.hint.cancel') }}
206
- </el-button>
207
- <el-button type="primary" @click="colSubmit" class="button-sty" icon="el-icon-check">
208
- {{ i18nt('designer.hint.confirm') }}
209
- </el-button>
210
- </div>
211
- </el-dialog>
113
+ <el-option value="render" label="render"></el-option>
114
+ </el-option-group>
115
+ <el-option-group v-for="t in op" :key="t.label" :label="t.label">
116
+ <el-option
117
+ v-for="e in t.options"
118
+ :key="e.value"
119
+ :value="e.value"
120
+ :label="e.label"
121
+ ></el-option>
122
+ </el-option-group>
123
+ </el-select>
124
+ </template>
125
+ </el-table-column>
126
+ <el-table-column label="格式化配置" width="90" align="center">
127
+ <template #default="scope">
128
+ <el-button
129
+ size="mini"
130
+ plain=""
131
+ round=""
132
+ icon="el-icon-edit"
133
+ @click="openFormatConfigDialog(scope.row, scope.$index)"
134
+ :disabled="
135
+ !columnFormatMap[scope.row.formatS] &&
136
+ 'widgetRender' !== scope.row.formatS &&
137
+ 'editTreeButtonGroup' !== scope.row.formatS
138
+ "
139
+ ></el-button>
140
+ </template>
141
+ </el-table-column>
142
+ <el-table-column
143
+ :label="i18nt('designer.setting.renderFunction')"
144
+ width="70"
145
+ align="center"
146
+ >
147
+ <template #default="scope">
148
+ <el-button
149
+ :disabled="'render' !== scope.row.formatS"
150
+ size="mini"
151
+ plain=""
152
+ round=""
153
+ icon="el-icon-edit"
154
+ @click="showRenderDialog(scope.row)"
155
+ ></el-button>
156
+ </template>
157
+ </el-table-column>
158
+ <el-table-column
159
+ :label="i18nt('designer.setting.visibleColumn')"
160
+ width="70"
161
+ prop="show"
162
+ >
163
+ <template #default="scope">
164
+ <el-switch v-model="scope.row.show"></el-switch>
165
+ </template>
166
+ </el-table-column>
167
+ <el-table-column
168
+ :label="i18nt('designer.setting.sortableColumn')"
169
+ width="70"
170
+ prop="sortable"
171
+ >
172
+ <template #default="scope">
173
+ <el-switch v-model="scope.row.sortable"></el-switch>
174
+ </template>
175
+ </el-table-column>
176
+ <el-table-column label="显示筛选" width="70" prop="filterable">
177
+ <template #default="scope">
178
+ <el-switch v-model="scope.row.filterable"></el-switch>
179
+ </template>
180
+ </el-table-column>
181
+ <el-table-column label="UTC时差转换" width="90" align="center">
182
+ <template #default="scope">
183
+ <el-switch
184
+ v-if="isUtcTransformColumn(scope.row)"
185
+ v-model="scope.row.utcTransformEnabled"
186
+ ></el-switch>
187
+ </template>
188
+ </el-table-column>
189
+ <el-table-column
190
+ label="编辑更多属性"
191
+ width="100"
192
+ align="center"
193
+ fixed="right"
194
+ >
195
+ <template #default="scope">
196
+ <el-button
197
+ size="mini"
198
+ plain=""
199
+ round=""
200
+ icon="el-icon-edit"
201
+ @click="openRowEditDialog(scope.row, scope.$index)"
202
+ ></el-button>
203
+ </template>
204
+ </el-table-column>
205
+ <el-table-column label="操作" width="150" fixed="right">
206
+ <template slot="header">
207
+ <el-tooltip
208
+ :hide-after="500"
209
+ class="item"
210
+ effect="dark"
211
+ content="添加根节点"
212
+ placement="top"
213
+ >
214
+ <el-button
215
+ size="mini"
216
+ type=""
217
+ circle=""
218
+ icon="el-icon-plus"
219
+ @click="onAddRoot"
220
+ />
221
+ </el-tooltip>
222
+ </template>
223
+ <template #default="{ row, $index }">
224
+ <el-tooltip
225
+ :hide-after="hideAfter"
226
+ :open-delay="openDelay"
227
+ effect="dark"
228
+ content="添加兄弟节点"
229
+ placement="top"
230
+ >
231
+ <el-button
232
+ size="mini"
233
+ type=""
234
+ circle=""
235
+ icon="el-icon-plus"
236
+ @click="onAddSibling(row, $index)"
237
+ />
238
+ </el-tooltip>
239
+
240
+ <el-tooltip
241
+ :hide-after="hideAfter"
242
+ :open-delay="openDelay"
243
+ effect="dark"
244
+ content="添加子节点"
245
+ placement="top"
246
+ >
247
+ <el-button
248
+ size="mini"
249
+ type=""
250
+ circle=""
251
+ icon="el-icon-circle-plus-outline"
252
+ @click="onAddChild(row, $index)"
253
+ />
254
+ </el-tooltip>
255
+ <el-tooltip
256
+ :hide-after="hideAfter"
257
+ :open-delay="openDelay"
258
+ effect="dark"
259
+ content="删除"
260
+ placement="top"
261
+ >
262
+ <el-button
263
+ size="mini"
264
+ type=""
265
+ circle=""
266
+ icon="el-icon-delete"
267
+ @click="onDelete(row, $index)"
268
+ />
269
+ </el-tooltip>
270
+ </template>
271
+ </el-table-column>
272
+ </el-table>
273
+ <columnRenderDialog
274
+ :column="currentTableColumn"
275
+ :sourceData="sourceData"
276
+ v-if="showColumnRenderDialog"
277
+ :visiable.sync="showColumnRenderDialog"
278
+ @confirm="confirmWidgetRenderDialog"
279
+ ></columnRenderDialog>
280
+ <editTreeButtonGroupConfigDialog
281
+ v-if="showEditTreeButtonGroupConfigDialog && editTreeButtonGroupRowData"
282
+ :visible.sync="showEditTreeButtonGroupConfigDialog"
283
+ :row="editTreeButtonGroupRowData"
284
+ @confirm="confirmEditTreeButtonGroupConfig"
285
+ />
286
+ </div>
287
+ <div class="dialog-footer" slot="footer">
288
+ <el-button @click="closeHandle" class="button-sty" icon="el-icon-close">
289
+ {{ i18nt("designer.hint.cancel") }}
290
+ </el-button>
291
+ <el-button
292
+ type="primary"
293
+ @click="colSubmit"
294
+ class="button-sty"
295
+ icon="el-icon-check"
296
+ >
297
+ {{ i18nt("designer.hint.confirm") }}
298
+ </el-button>
299
+ </div>
212
300
  <el-dialog
213
301
  v-if="showRenderDialogFlag"
214
302
  :title="i18nt('designer.setting.renderFunction')"
@@ -221,16 +309,35 @@
221
309
  :destroy-on-close="!0"
222
310
  v-dialog-drag
223
311
  top="7vh"
312
+ :append-to-body="true"
224
313
  >
225
- <el-alert type="info" :closable="!1" title="function customRender(params,h) {"/>
226
- <code-editor ref="dsResultEditor" mode="javascript" :readonly="!1" v-model="renderJson"></code-editor>
227
- <el-alert type="info" :closable="!1" title="}"/>
314
+ <el-alert
315
+ type="info"
316
+ :closable="!1"
317
+ title="function customRender(params,h) {"
318
+ />
319
+ <code-editor
320
+ ref="dsResultEditor"
321
+ mode="javascript"
322
+ :readonly="!1"
323
+ v-model="renderJson"
324
+ ></code-editor>
325
+ <el-alert type="info" :closable="!1" title="}" />
228
326
  <div class="dialog-footer" slot="footer">
229
- <el-button @click="showRenderDialogFlag = !1" class="button-sty" icon="el-icon-close">
230
- {{ i18nt('designer.hint.cancel') }}
327
+ <el-button
328
+ @click="showRenderDialogFlag = !1"
329
+ class="button-sty"
330
+ icon="el-icon-close"
331
+ >
332
+ {{ i18nt("designer.hint.cancel") }}
231
333
  </el-button>
232
- <el-button type="primary" @click="saveColumnRender" class="button-sty" icon="el-icon-check">
233
- {{ i18nt('designer.hint.confirm') }}
334
+ <el-button
335
+ type="primary"
336
+ @click="saveColumnRender"
337
+ class="button-sty"
338
+ icon="el-icon-check"
339
+ >
340
+ {{ i18nt("designer.hint.confirm") }}
234
341
  </el-button>
235
342
  </div>
236
343
  </el-dialog>
@@ -249,305 +356,793 @@
249
356
  top="5vh"
250
357
  >
251
358
  <div class="cont">
252
- <el-alert type="info" :closable="false" :title="tableColumnConfigHeader"></el-alert>
253
- <code-editor :mode="'javascript'" :readonly="false" v-model="tableColumnConfigCode"
254
- ref="ecEditor"></code-editor>
359
+ <el-alert
360
+ type="info"
361
+ :closable="false"
362
+ :title="tableColumnConfigHeader"
363
+ ></el-alert>
364
+ <code-editor
365
+ :mode="'javascript'"
366
+ :readonly="false"
367
+ v-model="tableColumnConfigCode"
368
+ ref="ecEditor"
369
+ ></code-editor>
255
370
  <el-alert type="info" :closable="false" title="}"></el-alert>
256
371
  </div>
257
372
  <div slot="footer" class="dialog-footer">
258
- <el-button @click="showTableColumnConfigDialog = false" class="button-sty" icon="el-icon-close">
259
- {{ i18nt('designer.hint.cancel') }}
373
+ <el-button
374
+ @click="showTableColumnConfigDialog = false"
375
+ class="button-sty"
376
+ icon="el-icon-close"
377
+ >
378
+ {{ i18nt("designer.hint.cancel") }}
260
379
  </el-button>
261
- <el-button type="primary" @click="saveTableColumnConfigDialog" class="button-sty" icon="el-icon-check">
262
- {{ i18nt('designer.hint.confirm') }}
380
+ <el-button
381
+ type="primary"
382
+ @click="saveTableColumnConfigDialog"
383
+ class="button-sty"
384
+ icon="el-icon-check"
385
+ >
386
+ {{ i18nt("designer.hint.confirm") }}
387
+ </el-button>
388
+ </div>
389
+ </el-dialog>
390
+ <el-dialog
391
+ :title="i18nt('designer.setting.editFormEventHandler')"
392
+ :visible.sync="showFormEventDialogFlag"
393
+ v-if="showFormEventDialogFlag"
394
+ :show-close="true"
395
+ custom-class="dialog-style list-dialog"
396
+ v-dialog-drag
397
+ :close-on-click-modal="false"
398
+ :close-on-press-escape="false"
399
+ :destroy-on-close="true"
400
+ :append-to-body="true"
401
+ :modal-append-to-body="true"
402
+ top="5vh"
403
+ >
404
+ <div class="cont">
405
+ <el-alert
406
+ type="info"
407
+ :closable="false"
408
+ :title="'form.' + eventParamsMap[curEventName]"
409
+ ></el-alert>
410
+ <code-editor
411
+ :mode="'javascript'"
412
+ :readonly="false"
413
+ v-model="formEventHandlerCode"
414
+ ref="ecEditor"
415
+ ></code-editor>
416
+ <el-alert type="info" :closable="false" title="}"></el-alert>
417
+ </div>
418
+ <div slot="footer" class="dialog-footer">
419
+ <el-button
420
+ @click="showFormEventDialogFlag = false"
421
+ class="button-sty"
422
+ icon="el-icon-close"
423
+ >
424
+ {{ i18nt("designer.hint.cancel") }}
425
+ </el-button>
426
+ <el-button
427
+ type="primary"
428
+ @click="saveFormEventHandler"
429
+ class="button-sty"
430
+ icon="el-icon-check"
431
+ >
432
+ {{ i18nt("designer.hint.confirm") }}
263
433
  </el-button>
264
434
  </div>
265
435
  </el-dialog>
266
- </div>
267
436
 
437
+ <el-dialog
438
+ custom-class="dialog-style list-dialog table-column-row-edit-dialog"
439
+ :title="i18nt('designer.setting.tableColEdit')"
440
+ :visible.sync="showRowEditDialog"
441
+ v-if="showRowEditDialog"
442
+ :modal="false"
443
+ :show-close="!0"
444
+ :close-on-click-modal="!1"
445
+ :close-on-press-escape="!1"
446
+ :destroy-on-close="!0"
447
+ :append-to-body="true"
448
+ :modal-append-to-body="true"
449
+ top="5vh"
450
+ width="480px"
451
+ v-dialog-drag
452
+ >
453
+ <div class="cont table-column-row-edit-cont">
454
+ <el-form :model="rowData" class="form-m2" label-position="top">
455
+ <el-form-item :label="i18nt('designer.setting.columnLabel')">
456
+ <el-input
457
+ v-model="rowData.label"
458
+ @change="changeRowLabel(rowData)"
459
+ ></el-input>
460
+ </el-form-item>
461
+ <el-form-item :label="i18nt('designer.setting.columnName')">
462
+ <el-input
463
+ v-model="rowData.prop"
464
+ @change="changeRowProp(rowData)"
465
+ :disabled="'editAttachment' == rowData.formatS"
466
+ ></el-input>
467
+ </el-form-item>
468
+ <el-form-item :label="i18nt('designer.setting.columnWidth')">
469
+ <el-input v-model="rowData.width"></el-input>
470
+ </el-form-item>
471
+ <el-form-item :label="i18nt('必填')">
472
+ <el-switch
473
+ v-model="rowData.required"
474
+ @change="changeRowRequired(rowData)"
475
+ ></el-switch>
476
+ </el-form-item>
477
+ <el-form-item :label="i18nt('designer.setting.fixedColumn')">
478
+ <el-select v-model="rowData.fixed" clearable>
479
+ <el-option value="left">left</el-option>
480
+ <el-option value="right">right</el-option>
481
+ </el-select>
482
+ </el-form-item>
483
+ <el-form-item :label="i18nt('designer.setting.formatOfColumn')">
484
+ <el-select
485
+ v-model="rowData.formatS"
486
+ @change="changeFormatS(rowData, false)"
487
+ clearable
488
+ >
489
+ <el-option-group
490
+ :label="i18nt('designer.setting.customRenderGroup')"
491
+ >
492
+ <el-option value="render" label="render"></el-option>
493
+ </el-option-group>
494
+ <el-option-group v-for="t in op" :key="t.label" :label="t.label">
495
+ <el-option
496
+ v-for="e in t.options"
497
+ :key="e.value"
498
+ :value="e.value"
499
+ :label="e.label"
500
+ ></el-option>
501
+ </el-option-group>
502
+ </el-select>
503
+ </el-form-item>
504
+ <el-form-item label="格式化配置">
505
+ <el-button
506
+ size="mini"
507
+ plain=""
508
+ round=""
509
+ icon="el-icon-edit"
510
+ @click="openFormatConfigDialog(rowData, rowDataIndex)"
511
+ :disabled="
512
+ !columnFormatMap[rowData.formatS] &&
513
+ 'widgetRender' !== rowData.formatS &&
514
+ 'editTreeButtonGroup' !== rowData.formatS
515
+ "
516
+ ></el-button>
517
+ </el-form-item>
518
+ <el-form-item :label="i18nt('designer.setting.renderFunction')">
519
+ <el-button
520
+ :disabled="'render' !== rowData.formatS"
521
+ size="mini"
522
+ plain=""
523
+ round=""
524
+ icon="el-icon-edit"
525
+ @click="showRenderDialog(rowData)"
526
+ ></el-button>
527
+ </el-form-item>
528
+ <el-form-item
529
+ v-if="isUtcTransformColumn(rowData)"
530
+ label="UTC时差转换"
531
+ >
532
+ <el-switch v-model="rowData.utcTransformEnabled"></el-switch>
533
+ </el-form-item>
534
+ <el-form-item :label="i18nt('designer.setting.visibleColumn')">
535
+ <el-switch v-model="rowData.show"></el-switch>
536
+ </el-form-item>
537
+ <el-form-item :label="i18nt('designer.setting.sortableColumn')">
538
+ <el-switch v-model="rowData.sortable"></el-switch>
539
+ </el-form-item>
540
+ <el-form-item label="显示筛选">
541
+ <el-switch v-model="rowData.filterable"></el-switch>
542
+ </el-form-item>
543
+ <el-form-item :label="i18nt('明细行')">
544
+ <el-switch v-model="rowData.isItemLine"></el-switch>
545
+ </el-form-item>
546
+
547
+ <el-form-item :label="i18nt('下拉列')">
548
+ <el-switch v-model="rowData.treeNode"></el-switch>
549
+ </el-form-item>
550
+ <el-form-item :label="i18nt('自定义表格列配置')">
551
+ <a
552
+ href="javascript:void(0);"
553
+ class="a-link link-oneLind"
554
+ @click="openTableColumnConfigDialog(rowData, rowDataIndex)"
555
+ >
556
+ <span>{{ rowData.tableColumnConfig }}</span>
557
+ <i class="el-icon-edit"></i>
558
+ </a>
559
+ </el-form-item>
560
+ <el-form-item :label="i18nt('编辑插槽类型')">
561
+ <el-select
562
+ v-model="rowData.editFormatS"
563
+ @change="changeFormatS(rowData, true)"
564
+ clearable
565
+ >
566
+ <el-option
567
+ v-for="e in editOp"
568
+ :key="e.value"
569
+ :value="e.value"
570
+ :label="e.label"
571
+ ></el-option>
572
+ </el-select>
573
+ </el-form-item>
574
+ <el-form-item label="编辑插槽配置">
575
+ <el-button
576
+ size="mini"
577
+ plain=""
578
+ round=""
579
+ icon="el-icon-edit"
580
+ @click="openEditFormatConfigDialog(rowData, rowDataIndex)"
581
+ :disabled="!rowData.editFormatS"
582
+ ></el-button>
583
+ </el-form-item>
584
+ <el-form-item :label="i18nt('导出类型')">
585
+ <el-select v-model="rowData.exportType" clearable>
586
+ <el-option value="Image2" label="图片"></el-option>
587
+ <el-option value="Number" label="数值"></el-option>
588
+ </el-select>
589
+ </el-form-item>
590
+ <el-form-item :label="i18nt('表尾统计行类型')">
591
+ <el-select v-model="rowData.footerDataType" clearable>
592
+ <el-option value="1" label="合计"></el-option>
593
+ <el-option value="2" label="平均"></el-option>
594
+ <el-option value="3" label="自定义"></el-option>
595
+ </el-select>
596
+ </el-form-item>
597
+ <el-form-item label="表尾统计行配置">
598
+ <el-button
599
+ size="mini"
600
+ plain=""
601
+ round=""
602
+ icon="el-icon-edit"
603
+ @click="
604
+ editFormEventHandler(rowData, rowDataIndex, 'footerMethodConfg')
605
+ "
606
+ :disabled="rowData.footerDataType !== '3'"
607
+ ></el-button>
608
+ </el-form-item>
609
+ <el-form-item :label="i18nt('显示名称颜色')">
610
+ <el-select v-model="rowData.labelColor" clearable>
611
+ <el-option value="#e6a23c" label="橙"></el-option>
612
+ <el-option value="#2a6494" label="蓝"></el-option>
613
+ <el-option value="#30b08f" label="绿"></el-option>
614
+ <el-option value="#909399" label="灰"></el-option>
615
+ <el-option value="#ea5353" label="红"></el-option>
616
+ </el-select>
617
+ </el-form-item>
618
+ </el-form>
619
+ </div>
620
+ <div class="dialog-footer" slot="footer">
621
+ <el-button
622
+ @click="closeRowEditDialog"
623
+ class="button-sty"
624
+ icon="el-icon-close"
625
+ >
626
+ {{ i18nt("designer.hint.cancel") }}
627
+ </el-button>
628
+ <el-button
629
+ type="primary"
630
+ @click="submitRowEditDialog"
631
+ class="button-sty"
632
+ icon="el-icon-check"
633
+ >
634
+ {{ i18nt("designer.hint.confirm") }}
635
+ </el-button>
636
+ </div>
637
+ </el-dialog>
638
+ </el-dialog>
268
639
  </template>
269
640
  <script>
270
641
  import i18n from "../../../../../../components/xform/utils/i18n";
271
642
  import Sortable from "sortablejs";
272
- import {generateId} from "../../../../../../components/xform/utils/util";
643
+ import {
644
+ generateId,
645
+ loopHandleWidget,
646
+ deepClone,
647
+ columnFormatMap,
648
+ } from "../../../../../../components/xform/utils/util";
649
+ import columnRenderDialog from "./columnRenderDialog.vue";
650
+ import editTreeButtonGroupConfigDialog from "./edit-tree-button-group-config-dialog.vue";
651
+
652
+ let businessOptions = [
653
+ {
654
+ value: "_createBy",
655
+ label: "创建人",
656
+ },
657
+ {
658
+ value: "_modifyBy",
659
+ label: "更新人",
660
+ },
661
+ {
662
+ value: "create_date",
663
+ label: "创建时间",
664
+ },
665
+ {
666
+ value: "modify_date",
667
+ label: "更新时间",
668
+ },
669
+ ];
670
+ let userFields = ["_createBy", "_modifyBy", "create_date", "modify_date"];
273
671
 
274
672
  export default {
275
673
  mixins: [i18n],
276
674
  props: {
277
675
  designer: Object,
278
676
  selectedWidget: Object,
279
- optionModel: Object
677
+ optionModel: Object,
678
+ visiable: {
679
+ type: Boolean,
680
+ default: false,
681
+ },
280
682
  },
281
- components: {},
282
- inject: ['openWidgetPropertyDialog'],
683
+ components: { columnRenderDialog, editTreeButtonGroupConfigDialog },
684
+ inject: ["openWidgetPropertyDialog"],
283
685
  data() {
284
686
  return {
687
+ tableReady: false,
285
688
  tableColumnConfigTitle: null,
286
689
  showTableColumnConfigDialog: false,
287
690
  tableColumnConfigHeader: null,
288
691
  tableColumnConfigCode: null,
289
- showDialog: true,
290
- dialogVisible: true,
692
+ showEditTreeButtonGroupConfigDialog: false,
693
+ currentEditTreeButtonGroupRow: null,
694
+ editTreeButtonGroupRowData: null,
291
695
  alignOptions: [
292
696
  {
293
- value: 'left',
294
- label: 'left'
697
+ value: "left",
698
+ label: "left",
295
699
  },
296
700
  {
297
- value: 'center',
298
- label: 'center'
701
+ value: "center",
702
+ label: "center",
299
703
  },
300
704
  {
301
- value: 'right',
302
- label: 'right'
303
- }
705
+ value: "right",
706
+ label: "right",
707
+ },
304
708
  ],
709
+ businessOptions,
710
+ userFields,
305
711
  op: [
306
712
  {
307
- label: 'edit Format',
713
+ label: "edit Format",
308
714
  options: [
309
715
  {
310
- value: 'editInput',
311
- label: '文本输入框'
716
+ value: "editInput",
717
+ label: "文本输入框",
312
718
  },
313
719
  {
314
- value: 'editNumber',
315
- label: '数字输入框'
720
+ value: "editNumber",
721
+ label: "数字输入框",
316
722
  },
317
723
  {
318
- value: 'editDate',
319
- label: '日期输入框'
724
+ value: "editDate",
725
+ label: "日期输入框",
320
726
  },
321
727
  {
322
- value: 'editSelect',
323
- label: '下拉框'
728
+ value: "textarea",
729
+ label: "多行文本输入框",
324
730
  },
325
731
  {
326
- value: 'editAttachment',
327
- label: '附件'
732
+ value: "editSelect",
733
+ label: "下拉框",
328
734
  },
329
735
  {
330
- value: 'editSearch',
331
- label: '搜索框'
736
+ value: "checkbox",
737
+ label: "复选框",
332
738
  },
333
739
  {
334
- value: 'editStatus',
335
- label: '状态'
740
+ value: "radio",
741
+ label: "单选框",
336
742
  },
337
743
  {
338
- value: 'editDelete',
339
- label: '删除按钮'
744
+ value: "editAttachment",
745
+ label: "附件",
340
746
  },
341
747
  {
342
- value: 'editButton',
343
- label: '查看按钮'
748
+ value: "editSearch",
749
+ label: "搜索框",
344
750
  },
345
751
  {
346
- value: 'aText',
347
- label: '超链接文本'
752
+ value: "editStatus",
753
+ label: "状态",
348
754
  },
349
755
  {
350
- value: 'aLink',
351
- label: '超链接按钮'
756
+ value: "text",
757
+ label: "文本",
352
758
  },
353
759
  {
354
- value: 'button',
355
- label: '按钮'
760
+ value: "aText",
761
+ label: "超链接文本",
356
762
  },
357
763
  {
358
- value: 'editTreeButtonGroup',
359
- label: '编辑行按钮组'
360
- }
361
- ]
764
+ value: "widgetRender",
765
+ label: "自定义组件",
766
+ },
767
+ ],
362
768
  },
363
769
  {
364
- label: '树控件',
770
+ label: "按钮控件",
365
771
  options: [
366
772
  {
367
- value: 'addSiblingEditRow',
368
- label: '新增兄弟节点'
773
+ value: "dropdown",
774
+ label: "下拉按钮",
369
775
  },
370
776
  {
371
- value: 'addChildTreeRow',
372
- label: '新增子节点'
777
+ value: "editDelete",
778
+ label: "删除按钮",
373
779
  },
374
780
  {
375
- value: 'moveUpRow',
376
- label: '上移'
781
+ value: "editButton",
782
+ label: "查看按钮",
377
783
  },
378
784
  {
379
- value: 'moveDownRow',
380
- label: '下移'
785
+ value: "aLink",
786
+ label: "超链接按钮",
381
787
  },
382
788
  {
383
- value: 'removeTreeRow',
384
- label: '删除树节点'
385
- }
386
- ]
789
+ value: "button",
790
+ label: "按钮",
791
+ },
792
+ {
793
+ value: "editTreeButtonGroup",
794
+ label: "编辑行按钮组",
795
+ },
796
+ ],
387
797
  },
388
798
  {
389
- label: 'Date Format',
799
+ label: "树控件",
390
800
  options: [
391
801
  {
392
- value: 'd1',
393
- label: 'yyyy-MM-dd'
802
+ value: "addSiblingEditRow",
803
+ label: "新增兄弟节点",
394
804
  },
395
805
  {
396
- value: 'd2',
397
- label: 'yyyy/MM/dd'
806
+ value: "addChildTreeRow",
807
+ label: "新增子节点",
398
808
  },
399
809
  {
400
- value: 'd3',
401
- label: 'yyyy年MM月dd日'
810
+ value: "moveUpRow",
811
+ label: "上移",
402
812
  },
403
813
  {
404
- value: 'd4',
405
- label: 'yyyy-MM-dd HH:mm:ss'
814
+ value: "moveDownRow",
815
+ label: "下移",
406
816
  },
407
817
  {
408
- value: 'd5',
409
- label: 'yyyy-MM-dd hh:mm:ss'
410
- }
411
- ]
818
+ value: "removeTreeRow",
819
+ label: "删除树节点",
820
+ },
821
+ ],
822
+ },
823
+
824
+ {
825
+ label: "业务模块",
826
+ options: businessOptions,
412
827
  },
413
828
  {
414
- label: 'Number Format',
829
+ label: "日期格式化",
415
830
  options: [
416
831
  {
417
- value: 'n1',
418
- label: '###,###,###,##0.######'
832
+ value: "d1",
833
+ label: "yyyy-MM-dd",
419
834
  },
420
835
  {
421
- value: 'n2',
422
- label: '###,###,###,##0.00####'
836
+ value: "d2",
837
+ label: "yyyy/MM/dd",
423
838
  },
424
839
  {
425
- value: 'n3',
426
- label: '###,###,###,##0.000000'
840
+ value: "d3",
841
+ label: "yyyy年MM月dd日",
427
842
  },
428
843
  {
429
- value: 'n4',
430
- label: '###,###,###,##0.000'
844
+ value: "d4",
845
+ label: "yyyy-MM-dd HH:mm:ss",
431
846
  },
432
847
  {
433
- value: 'n5',
434
- label: '###,###,###,##0.00'
848
+ value: "d5",
849
+ label: "yyyy-MM-dd hh:mm:ss",
850
+ },
851
+ ],
852
+ },
853
+ {
854
+ label: "数字格式化",
855
+ options: [
856
+ {
857
+ value: "n1",
858
+ label: "###,###,###,##0.######",
435
859
  },
436
860
  {
437
- value: 'n6',
438
- label: '###,###,###,##0'
861
+ value: "n2",
862
+ label: "###,###,###,##0.00####",
439
863
  },
440
864
  {
441
- value: 'n7',
442
- label: '###,##0.00##%'
443
- }
444
- ]
445
- }
865
+ value: "n3",
866
+ label: "###,###,###,##0.000000",
867
+ },
868
+ {
869
+ value: "n4",
870
+ label: "###,###,###,##0.000",
871
+ },
872
+ {
873
+ value: "n5",
874
+ label: "###,###,###,##0.00",
875
+ },
876
+ {
877
+ value: "n6",
878
+ label: "###,###,###,##0",
879
+ },
880
+ {
881
+ value: "n7",
882
+ label: "###,##0.00##%",
883
+ },
884
+ ],
885
+ },
446
886
  ],
447
887
  editOp: [
448
888
  {
449
- value: 'editInput',
450
- label: '文本输入框'
889
+ value: "editInput",
890
+ label: "文本输入框",
451
891
  },
452
892
  {
453
- value: 'editNumber',
454
- label: '数字输入框'
893
+ value: "editNumber",
894
+ label: "数字输入框",
455
895
  },
456
896
  {
457
- value: 'editDate',
458
- label: '日期输入框'
897
+ value: "editDate",
898
+ label: "日期输入框",
459
899
  },
460
900
  {
461
- value: 'editSelect',
462
- label: '下拉框'
901
+ value: "editSelect",
902
+ label: "下拉框",
463
903
  },
464
904
  {
465
- value: 'editAttachment',
466
- label: '附件'
905
+ value: "editAttachment",
906
+ label: "附件",
467
907
  },
468
908
  {
469
- value: 'editSearch',
470
- label: '搜索框'
471
- }
909
+ value: "editSearch",
910
+ label: "搜索框",
911
+ },
472
912
  ],
473
913
  showRenderDialogFlag: !1,
474
- renderJson: '',
914
+ renderJson: "",
475
915
  currentTableColumn: null,
916
+ sourceData: null,
476
917
 
477
918
  hideAfter: 1500,
478
919
  openDelay: 500,
479
- tableData: [],//树形结构数据转的数组
920
+ tableData: [], //树形结构数据转的数组
480
921
  tableDataArray: [],
481
922
  dragSort: null,
482
- columnFormatMap: {
483
- editInput: 'input',
484
- editNumber: 'number',
485
- editDate: 'date',
486
- editSelect: 'select',
487
- editSearch: 'vabsearch',
488
- editAttachment: 'baseAttachment',
489
- editStatus: 'status',
490
- aText: 'a-text',
491
- aLink: 'a-link',
492
- editDelete: 'a-link',
493
- editButton: 'a-link',
494
- button: 'button',
495
- addSiblingEditRow: 'a-link',
496
- addChildTreeRow: 'a-link',
497
- moveUpRow: 'a-link',
498
- moveDownRow: 'a-link',
499
- removeTreeRow: 'a-link'
923
+ columnFormatMap,
924
+
925
+ showFormEventDialogFlag: false,
926
+ formEventHandlerCode: "",
927
+ curEventName: "",
928
+ curEventRow: null,
929
+
930
+ eventParamsMap: {
931
+ footerMethodConfg: "footerMethodConfg(dataId,formCode,param) {",
500
932
  },
501
- }
933
+
934
+ showColumnRenderDialog: false,
935
+
936
+ editRowData: null,
937
+ rowData: null,
938
+ rowDataIndex: 0,
939
+ showRowEditDialog: false,
940
+ };
502
941
  },
503
942
  beforeDestroy() {
504
- if (this.dragSort) this.dragSort.destroy()
943
+ if (this.dragSort) this.dragSort.destroy();
505
944
  },
506
- created() {
507
-
945
+ computed: {
946
+ showDialog: {
947
+ get() {
948
+ return this.visiable;
949
+ },
950
+ set(val) {
951
+ this.$emit("update:visiable", val);
952
+ },
953
+ },
954
+ shouldExpandAllTable() {
955
+ return this.countTreeRows(this.tableData) <= 30;
956
+ },
508
957
  },
958
+ watch: {
959
+ visiable(val) {
960
+ if (val) {
961
+ this.onDialogOpen();
962
+ } else {
963
+ this.onDialogClose();
964
+ }
965
+ },
966
+ },
967
+ created() {},
509
968
  mounted() {
510
- this.init();
969
+ if (this.visiable) {
970
+ this.onDialogOpen();
971
+ }
511
972
  },
512
973
  methods: {
513
- init() {
514
- this.tableData = this.$baseLodash.cloneDeep(this.optionModel.tableColumns);
974
+ countTreeRows(rows) {
975
+ if (!Array.isArray(rows) || !rows.length) {
976
+ return 0;
977
+ }
978
+ let count = 0;
979
+ const walk = (list) => {
980
+ list.forEach((item) => {
981
+ count += 1;
982
+ if (item.children && item.children.length) {
983
+ walk(item.children);
984
+ }
985
+ });
986
+ };
987
+ walk(rows);
988
+ return count;
989
+ },
990
+ cloneTableColumnsForEdit(columns) {
991
+ if (!Array.isArray(columns)) {
992
+ return [];
993
+ }
994
+ const skipKeys = ["widget", "editWidget"];
995
+ const cloneRow = (row) => {
996
+ if (!row || typeof row !== "object") {
997
+ return row;
998
+ }
999
+ const cloned = {};
1000
+ Object.keys(row).forEach((key) => {
1001
+ if (skipKeys.includes(key)) {
1002
+ return;
1003
+ }
1004
+ const val = row[key];
1005
+ if (key === "children" && Array.isArray(val) && val.length) {
1006
+ cloned.children = val.map(cloneRow);
1007
+ return;
1008
+ }
1009
+ if (val !== null && typeof val === "object") {
1010
+ try {
1011
+ cloned[key] = deepClone(val);
1012
+ } catch (e) {
1013
+ cloned[key] = val;
1014
+ }
1015
+ return;
1016
+ }
1017
+ cloned[key] = val;
1018
+ });
1019
+ return cloned;
1020
+ };
1021
+ return columns.map(cloneRow);
1022
+ },
1023
+ editFormEventHandler(row, index, eventName) {
1024
+ this.curEventRow = row;
1025
+ this.curEventName = eventName;
1026
+ this.curEventIndex = index;
1027
+ this.formEventHandlerCode = row[eventName];
1028
+ this.showFormEventDialogFlag = true;
1029
+ },
1030
+
1031
+ saveFormEventHandler() {
1032
+ const codeHints = this.$refs.ecEditor.getEditorAnnotations();
1033
+ let syntaxErrorFlag = false;
1034
+ if (!!codeHints && codeHints.length > 0) {
1035
+ codeHints.forEach((chItem) => {
1036
+ if (chItem.type === "error") {
1037
+ syntaxErrorFlag = true;
1038
+ }
1039
+ });
1040
+
1041
+ if (syntaxErrorFlag) {
1042
+ this.$message.error(
1043
+ this.i18nt("designer.setting.syntaxCheckWarning")
1044
+ );
1045
+ return;
1046
+ }
1047
+ }
1048
+ this.curEventRow[this.curEventName] = this.formEventHandlerCode;
1049
+ this.showFormEventDialogFlag = false;
1050
+ },
1051
+ onDialogClose() {
1052
+ this.tableReady = false;
1053
+ if (this.dragSort) {
1054
+ this.dragSort.destroy();
1055
+ this.dragSort = null;
1056
+ }
1057
+ },
1058
+ onDialogOpen() {
1059
+ this.tableReady = false;
1060
+ if (this.dragSort) {
1061
+ this.dragSort.destroy();
1062
+ this.dragSort = null;
1063
+ }
515
1064
  this.$nextTick(() => {
516
- this.rowDrop();
1065
+ const load = () => {
1066
+ this.loadTableData();
1067
+ this.tableReady = true;
1068
+ this.$nextTick(() => {
1069
+ requestAnimationFrame(() => {
1070
+ this.rowDrop();
1071
+ });
1072
+ });
1073
+ };
1074
+ if (typeof requestIdleCallback === "function") {
1075
+ requestIdleCallback(load, { timeout: 80 });
1076
+ } else {
1077
+ setTimeout(load, 0);
1078
+ }
517
1079
  });
518
1080
  },
1081
+ loadTableData() {
1082
+ const source = this.optionModel.tableColumns || [];
1083
+ try {
1084
+ this.tableData = this.cloneTableColumnsForEdit(source);
1085
+ } catch (e) {
1086
+ this.tableData = this.$baseLodash.cloneDeep(source);
1087
+ }
1088
+ },
519
1089
  colSubmit() {
520
1090
  this.dialogVisible = !1;
521
1091
  this.optionModel.tableColumns = this.tableData;
522
1092
  this.closeHandle();
523
1093
  },
1094
+ openWidgetRenderDialog(row, sourceData) {
1095
+ this.currentTableColumn = row;
1096
+ this.sourceData = sourceData;
1097
+
1098
+ // this.widgetList =
1099
+
1100
+ // this.designer.widgetList
1101
+
1102
+ this.showColumnRenderDialog = true;
1103
+ },
1104
+ confirmWidgetRenderDialog(widgetList) {
1105
+ this.currentTableColumn.widgetList = widgetList;
1106
+ this.showColumnRenderDialog = false;
1107
+ },
524
1108
  showRenderDialog: function (e) {
525
- (this.currentTableColumn = e), (this.renderJson = e.render || ''), (this.showRenderDialogFlag = !0);
1109
+ /*if(e.formatS == 'widgetRender'){
1110
+ this.openWidgetRenderDialog(e);
1111
+ return
1112
+ }*/
1113
+
1114
+ (this.currentTableColumn = e),
1115
+ (this.renderJson = e.render || ""),
1116
+ (this.showRenderDialogFlag = !0);
526
1117
  },
527
1118
  saveColumnRender: function () {
528
- this.$set(this.currentTableColumn, 'render', this.renderJson), (this.showRenderDialogFlag = !1);
1119
+ this.$set(this.currentTableColumn, "render", this.renderJson),
1120
+ (this.showRenderDialogFlag = !1);
529
1121
  },
530
1122
  closeHandle() {
531
- this.$emit('update:visiable', false);
532
- this.$emit('close');
1123
+ this.$emit("update:visiable", false);
1124
+ this.$emit("close");
533
1125
  },
534
1126
  // 添加同级节点
535
1127
  onAddSibling(row, index) {
536
- console.log('onAddSibling', row, index)
537
- const parentId = row.parentId || null
1128
+ console.log("onAddSibling", row, index);
1129
+ const parentId = row.parentId || null;
538
1130
  // 先判断是不是根节点
539
1131
  if (!parentId) {
540
1132
  // 当前节点直接添加
541
1133
  // this.tableData.push(this.generateRow(parentId))
542
- let addIndex = this.tableData.filter(item => !item.parentId).findIndex(item => item.columnId == row.columnId) + 1;
543
- this.tableData.splice(addIndex, 0, this.generateRow(parentId))
1134
+ let addIndex =
1135
+ this.tableData
1136
+ .filter((item) => !item.parentId)
1137
+ .findIndex((item) => item.columnId == row.columnId) + 1;
1138
+ this.tableData.splice(addIndex, 0, this.generateRow(parentId));
544
1139
  } else {
545
- this.handleAddOneRow(row, index, 'SIBLING')
1140
+ this.handleAddOneRow(row, index, "SIBLING");
546
1141
  }
547
1142
  },
548
1143
  // 添加子节点 todo
549
1144
  onAddChild(row, index) {
550
- this.handleAddOneRow(row, index, 'CHILD')
1145
+ this.handleAddOneRow(row, index, "CHILD");
551
1146
  },
552
1147
  /**
553
1148
  * 处理添加一行数据
@@ -556,46 +1151,49 @@ export default {
556
1151
  * @param {string} type 操作类型 SIBLING 同级 / CHILD 子级
557
1152
  */
558
1153
  handleAddOneRow(row, index, type) {
559
-
560
- const {parentId, columnId} = row
561
- const curId = type === 'SIBLING' ? parentId : columnId
562
- let curRow = {}
1154
+ const { parentId, columnId } = row;
1155
+ const curId = type === "SIBLING" ? parentId : columnId;
1156
+ let curRow = {};
563
1157
  // 在 tableData 中,找到当前节点
564
1158
  const findRow = (data) => {
565
1159
  data.forEach((item) => {
566
1160
  if (item.columnId === curId) {
567
- curRow = item
1161
+ curRow = item;
568
1162
  }
569
1163
  if (item.children && item.children.length) {
570
- findRow(item.children)
1164
+ findRow(item.children);
571
1165
  }
572
- })
573
- }
1166
+ });
1167
+ };
574
1168
 
575
- findRow(this.tableData)
1169
+ findRow(this.tableData);
576
1170
 
577
- const {columnId: generateParentId, children} = curRow
1171
+ const { columnId: generateParentId, children } = curRow;
578
1172
 
579
- let newRow = this.generateRow(generateParentId)
1173
+ let newRow = this.generateRow(generateParentId);
580
1174
  if (children) {
581
- if (type === 'SIBLING') {
582
- let addIndex = children.findIndex(item => item.columnId == row.columnId) + 1;
583
- children.splice(addIndex, 0, newRow)
1175
+ if (type === "SIBLING") {
1176
+ let addIndex =
1177
+ children.findIndex((item) => item.columnId == row.columnId) + 1;
1178
+ children.splice(addIndex, 0, newRow);
584
1179
  } else {
585
- children.push(newRow)
1180
+ children.push(newRow);
586
1181
  }
587
1182
  } else {
588
- this.$set(curRow, 'children', [newRow])
1183
+ this.$set(curRow, "children", [newRow]);
589
1184
  }
590
1185
  },
591
1186
  getUuid() {
592
1187
  return new Date().getTime();
593
1188
  },
1189
+ createRowAuthName(type) {
1190
+ return `row${type}` + generateId();
1191
+ },
594
1192
  /**
595
1193
  * 生成一行数据
596
1194
  */
597
1195
  generateRow(parentId) {
598
- let tmpId = 'column' + generateId();
1196
+ let tmpId = "column" + generateId();
599
1197
  let uuid = this.getUuid();
600
1198
  var row = {
601
1199
  columnId: uuid,
@@ -605,46 +1203,75 @@ export default {
605
1203
  width: 150,
606
1204
  prop: tmpId,
607
1205
  label: tmpId,
608
- align: 'left',
1206
+ align: "left",
609
1207
  show: true,
610
1208
  sortable: true,
611
-
1209
+ filterable: true,
1210
+ exportType: null,
1211
+ footerDataType: null,
1212
+ footerMethodConfg: null,
1213
+ widgetList: [],
1214
+ labelColor: null,
1215
+ rowAddAuthName: this.createRowAuthName("Add"),
1216
+ rowEditAuthName: this.createRowAuthName("Edit"),
1217
+ rowAddShow: null,
1218
+ rowEditShow: null,
1219
+ utcTransformEnabled: false,
612
1220
  // treeNode: false,
613
-
614
1221
  };
615
1222
  return row;
616
1223
  },
1224
+ isUtcTransformColumn(row) {
1225
+ const formatS = row.formatS;
1226
+ if (!formatS) {
1227
+ return true;
1228
+ }
1229
+ return [
1230
+ "d1",
1231
+ "d2",
1232
+ "d3",
1233
+ "d4",
1234
+ "d5",
1235
+ "render",
1236
+ "create_date",
1237
+ "modify_date",
1238
+ ].includes(formatS);
1239
+ },
617
1240
  // 添加根节点
618
1241
  onAddRoot() {
619
- this.tableData.push(this.generateRow())
1242
+ this.tableData.push(this.generateRow());
620
1243
  },
621
1244
  // 删除当前节点及对应子节点数据
622
1245
  onDelete(row) {
623
- const {parentId, columnId} = row
1246
+ const { parentId, columnId } = row;
624
1247
  // 根节点直接删除
625
1248
  if (!parentId) {
626
- const delIndex = this.tableData.findIndex((item) => item.columnId === columnId)
627
- this.tableData.splice(delIndex, 1)
1249
+ const delIndex = this.tableData.findIndex(
1250
+ (item) => item.columnId === columnId
1251
+ );
1252
+ this.tableData.splice(delIndex, 1);
628
1253
  } else {
629
1254
  // 找到父节点,通过父节点删除
630
- let parentRow = {}
1255
+ let parentRow = {};
631
1256
  const findRow = (data) => {
632
1257
  data.forEach((item) => {
633
1258
  if (item.columnId === parentId) {
634
- parentRow = {...item}
1259
+ parentRow = { ...item };
635
1260
  }
636
1261
  if (item.children && item.children.length) {
637
- findRow(item.children)
1262
+ findRow(item.children);
638
1263
  }
639
- })
640
- }
641
- findRow(this.tableData)
1264
+ });
1265
+ };
1266
+ findRow(this.tableData);
642
1267
 
643
- const {children} = parentRow
1268
+ const { children } = parentRow;
644
1269
 
645
- const delIndex = children.findIndex((item) => item.columnId === columnId)
1270
+ const delIndex = children.findIndex(
1271
+ (item) => item.columnId === columnId
1272
+ );
646
1273
 
647
- children.splice(delIndex, 1)
1274
+ children.splice(delIndex, 1);
648
1275
  }
649
1276
  },
650
1277
  // 数据准备 生成 id 和 parentId
@@ -652,30 +1279,34 @@ export default {
652
1279
  const tableFormat = (tableData, parentId) => {
653
1280
  tableData.forEach((item) => {
654
1281
  // item.parentId = parentId || null
655
- if (!item.kid) item.kid = item.columnId
1282
+ if (!item.kid) item.kid = item.columnId;
656
1283
  if (item.children && item.children.length > 0) {
657
- tableFormat(item.children, item.columnId)
1284
+ tableFormat(item.children, item.columnId);
658
1285
  }
659
- })
660
- }
1286
+ });
1287
+ };
661
1288
 
662
- tableFormat(data)
663
- return data
1289
+ tableFormat(data);
1290
+ return data;
664
1291
  },
665
1292
  //drag begin
666
1293
  //行拖拽
667
1294
  rowDrop() {
668
- if (this.dragSort) this.dragSort.destroy() // 防止在Dom上重复绑定事件
1295
+ if (this.dragSort) this.dragSort.destroy(); // 防止在Dom上重复绑定事件
669
1296
  // const tbody = document.querySelector('.drag .el-table__body-wrapper tbody');
670
- var tbody = this.$refs.singleTable.$el.querySelectorAll('.el-table__fixed-body-wrapper > table > tbody')[0];
1297
+ var tbody = this.$refs.singleTable.$el.querySelectorAll(
1298
+ ".el-table__fixed-body-wrapper > table > tbody"
1299
+ )[0];
671
1300
  const _this = this;
672
1301
  this.dragSort = Sortable.create(tbody, {
673
- ghostClass: 'sortable-ghost',
1302
+ ghostClass: "sortable-ghost",
1303
+ // draggable: ".drag-option", // 修改可拖拽元素
1304
+ handle: ".drag-option", // 指定拖动按钮
674
1305
  setData: function (e) {
675
- e.setData('Text', '');
1306
+ e.setData("Text", "");
676
1307
  },
677
- onEnd({newIndex, oldIndex}) {
678
- _this.rowDropEnd(newIndex, oldIndex)
1308
+ onEnd({ newIndex, oldIndex }) {
1309
+ _this.rowDropEnd(newIndex, oldIndex);
679
1310
  },
680
1311
  });
681
1312
  },
@@ -686,7 +1317,7 @@ export default {
686
1317
  data.forEach((item) => {
687
1318
  const loop = (data) => {
688
1319
  result.push({
689
- ...data
1320
+ ...data,
690
1321
  });
691
1322
  let child = data.children;
692
1323
  if (child) {
@@ -702,7 +1333,9 @@ export default {
702
1333
  //数组转树
703
1334
  arrToTree(arr, parentId) {
704
1335
  return arr
705
- .filter((item) => (!parentId ? !item.parentId : item.parentId === parentId))
1336
+ .filter((item) =>
1337
+ !parentId ? !item.parentId : item.parentId === parentId
1338
+ )
706
1339
  .map((item) => {
707
1340
  item.children = this.arrToTree(arr, item.columnId);
708
1341
  return item;
@@ -740,13 +1373,7 @@ export default {
740
1373
  let newRow = this.tableDataArray[newIndex];
741
1374
 
742
1375
  //判断是否把该行 拖拽到 自己的底级中
743
- if (
744
- this.isTreeBottom(
745
- this.tableData,
746
- oldRow.columnId,
747
- newRow.columnId
748
- )
749
- ) {
1376
+ if (this.isTreeBottom(this.tableData, oldRow.columnId, newRow.columnId)) {
750
1377
  this.$message({
751
1378
  type: "error",
752
1379
  message: "不能放到子节点",
@@ -792,72 +1419,116 @@ export default {
792
1419
  let isButtontCell = false;
793
1420
  let widgetType = this.columnFormatMap[formatS];
794
1421
  if (widgetType) {
795
- isButtontCell = widgetType === 'a-link' || widgetType === 'button';
1422
+ isButtontCell =
1423
+ widgetType === "a-link" ||
1424
+ widgetType === "button" ||
1425
+ widgetType === "dropdown";
796
1426
  }
797
1427
  return isButtontCell;
798
1428
  },
799
1429
  //drag end
800
- changeFormatS(row) {
801
- let isButtontCell = this.getIsButtontCell(row.formatS);
802
- let columnWidgetConfig = this.getColumnWidgetConfig(row, true);
803
- let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
804
- if (columnSelectedWidget) {
805
- row.columnOption = columnSelectedWidget.options;
806
- } else {
807
- row.columnOption = {}
808
- }
809
-
810
- if (row.formatS == 'editTreeButtonGroup') {
811
- row.prop = null;
812
- row.label = null;
813
- row.sortable = false;
814
- row.width = 150;
815
- } else if (isButtontCell) {
816
- if (row.formatS == 'aLink' || row.formatS == 'button') {
817
- if (!row.width || row.width == 47) row.width = 150;
1430
+ changeFormatS(row, isEdit) {
1431
+ let formatS = isEdit ? row.editFormatS : row.formatS;
1432
+ let isButtontCell = this.getIsButtontCell(formatS);
1433
+ // let columnWidgetConfig = this.getColumnWidgetConfig(row, true, isEdit);
1434
+ // let { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
1435
+ let attachmentPrefix = this.designer.getAttachmentPrefix();
1436
+ let columnSelectedWidget = this.designer.createColumnWidget(row, isEdit);
1437
+ if (!isEdit) {
1438
+ //格式化类型
1439
+ if (columnSelectedWidget) {
1440
+ row.columnOption = columnSelectedWidget.options;
1441
+ row.widget = columnSelectedWidget;
818
1442
  } else {
819
- row.width = 47;
1443
+ row.columnOption = {};
1444
+ row.widget = null;
820
1445
  }
821
- row.prop = null;
822
- row.label = null;
823
- row.sortable = false;
1446
+ row.utcTransformEnabled = false;
824
1447
  } else {
825
- let tmpId = 'column' + generateId();
826
- if (!row.width || row.width == 47) row.width = 150;
827
- if (!row.prop) row.prop = tmpId;
828
- if (!row.label) row.label = tmpId;
829
- row.sortable = true;
1448
+ if (row.prop && row.prop.startsWith(attachmentPrefix)) {
1449
+ let suffix = row.prop.replace(attachmentPrefix, "");
1450
+ columnSelectedWidget.options.keyName = row.prop;
1451
+ columnSelectedWidget.options.keyNameSuffix = suffix;
1452
+ }
1453
+ //编辑插槽类型
1454
+ if (columnSelectedWidget) {
1455
+ row.columnOption = columnSelectedWidget.options;
1456
+ row.editWidget = columnSelectedWidget;
1457
+ } else {
1458
+ row.editColumnOption = {};
1459
+ row.editWidget = null;
1460
+ }
1461
+ }
830
1462
 
831
- if (row.formatS == 'editAttachment') {
832
- row.prop = this.designer.createAttachmentKeyName();
1463
+ if (!isEdit) {
1464
+ if (row.formatS == "editTreeButtonGroup") {
1465
+ row.prop = null;
1466
+ row.label = null;
1467
+ row.sortable = false;
1468
+ row.width = 150;
1469
+ row.columnOption = {};
1470
+ row.widget = null;
1471
+ } else if (isButtontCell) {
1472
+ if (row.formatS == "dropdown") {
1473
+ row.width = 100;
1474
+ } else if (row.formatS == "aLink" || row.formatS == "button") {
1475
+ if (!row.width || row.width == 47) row.width = 150;
1476
+ } else {
1477
+ row.width = 47;
1478
+ }
1479
+ row.prop = null;
1480
+ row.label = null;
1481
+ row.sortable = false;
833
1482
  } else {
834
- let attachmentPrefix = this.designer.getAttachmentPrefix();
835
- row.prop = row.prop.replaceAll(attachmentPrefix, "");
1483
+ let tmpId = "column" + generateId();
1484
+ if (!row.width || row.width == 47) row.width = 150;
1485
+ if (!row.prop) row.prop = tmpId;
1486
+ if (!row.label) row.label = tmpId;
1487
+
1488
+ if (this.userFields.includes(row.formatS)) {
1489
+ let item = this.businessOptions.find(
1490
+ (item) => item.value == row.formatS
1491
+ );
1492
+ if (item) {
1493
+ row.prop = item.value;
1494
+ row.label = item.label;
1495
+ }
1496
+ }
1497
+
1498
+ row.sortable = true;
1499
+
1500
+ if (!isEdit) {
1501
+ if (formatS == "editAttachment") {
1502
+ row.prop = columnSelectedWidget.options.keyName;
1503
+ } else {
1504
+ row.prop = row.prop.replaceAll(attachmentPrefix, "");
1505
+ }
1506
+ }
836
1507
  }
837
1508
  }
838
1509
  },
839
1510
  getColumnWidgetConfig(row, isChange, isEdit) {
840
- let formatS = isEdit ? row.editFormatS : row.formatS
1511
+ let formatS = isEdit ? row.editFormatS : row.formatS;
841
1512
  let columnSelectedWidget = null;
842
1513
  let columnEditFields = null;
843
1514
 
844
1515
  let type = this.columnFormatMap[formatS];
845
- /*if (type == 'date') {
846
- columnEditFields = ['type', 'format', 'valueFormat']
847
- } else if (type == 'select') {
848
-
849
- }
850
- if (type == 'vabsearch') {
851
- columnEditFields = ['vabSearchField', 'formCode', 'formVersion', 'required', 'showFormField', 'onSearchConfirm', 'onSearchClear']
852
- }*/
853
1516
 
854
1517
  if (type) {
855
1518
  // columnSelectedWidget = this.$baseLodash.cloneDeep(this.designer.getFieldWidgetByType(type));
856
- columnSelectedWidget = this.designer.copyNewFieldWidget(this.designer.getFieldWidgetByType(type));
1519
+ columnSelectedWidget = this.designer.copyNewFieldWidget(
1520
+ this.designer.getFieldWidgetByType(type)
1521
+ );
857
1522
  /*let tmpId = generateId();
858
1523
  let idVal = row.prop ? row.prop : (type + tmpId);*/
859
1524
  /*columnSelectedWidget.id = idVal;*/
860
1525
  // columnSelectedWidget.options.name = idVal;
1526
+ /*if (isEdit) {
1527
+ columnSelectedWidget.id = "edit_" + row.columnId;
1528
+ } else {
1529
+ columnSelectedWidget.id = row.columnId;
1530
+ }*/
1531
+ // columnSelectedWidget.id = row.columnId;
861
1532
  let columnOption;
862
1533
  if (!isEdit) {
863
1534
  columnOption = row.columnOption;
@@ -867,61 +1538,70 @@ export default {
867
1538
  if (!isChange && columnOption && Object.keys(columnOption).length) {
868
1539
  columnOption.required = row.required || false;
869
1540
  columnSelectedWidget.options = columnOption;
870
- if ('editDelete' == formatS) {
871
- columnSelectedWidget.options.hiddenByWf = columnSelectedWidget.options.hiddenByWf ?? true;
872
- columnSelectedWidget.options.prefixIcon = columnSelectedWidget.options.prefixIcon || "el-icon-delete";
873
- } else if ('editButton' == formatS) {
874
- columnSelectedWidget.options.prefixIcon = columnSelectedWidget.options.prefixIcon || "el-icon-edit";
1541
+ if ("editDelete" == formatS) {
1542
+ columnSelectedWidget.options.hiddenByWf =
1543
+ columnSelectedWidget.options.hiddenByWf ?? true;
1544
+ columnSelectedWidget.options.prefixIcon =
1545
+ columnSelectedWidget.options.prefixIcon || "el-icon-delete";
1546
+ } else if ("editButton" == formatS) {
1547
+ columnSelectedWidget.options.prefixIcon =
1548
+ columnSelectedWidget.options.prefixIcon || "el-icon-edit";
875
1549
  }
876
1550
  } else {
877
1551
  columnSelectedWidget.options.required = row.required || false;
878
1552
 
879
- if ('editDelete' == formatS) {
1553
+ if ("editDelete" == formatS) {
880
1554
  columnSelectedWidget.options.prefixIcon = "el-icon-delete";
881
1555
  columnSelectedWidget.options.label = "删除";
882
1556
  columnSelectedWidget.options.labelHidden = true;
883
1557
  columnSelectedWidget.options.hiddenByWf = true;
884
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.deleteRow(tableParam.row,tableParam.rowIndex);";
885
- } else if ('editButton' == formatS) {
1558
+ columnSelectedWidget.options.onClick =
1559
+ "let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.deleteRow(tableParam.row,tableParam.rowIndex);";
1560
+ } else if ("editButton" == formatS) {
886
1561
  columnSelectedWidget.options.prefixIcon = "el-icon-edit";
887
1562
  columnSelectedWidget.options.label = "查看";
888
1563
  columnSelectedWidget.options.labelHidden = true;
889
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.openEditDialog(tableParam.row)";
890
- } else if ('addSiblingEditRow' == formatS) {
1564
+ columnSelectedWidget.options.onClick =
1565
+ "let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.openEditDialog(tableParam.row)";
1566
+ } else if ("addSiblingEditRow" == formatS) {
891
1567
  columnSelectedWidget.options.prefixIcon = "el-icon-plus";
892
1568
  columnSelectedWidget.options.label = "新增兄弟节点";
893
1569
  columnSelectedWidget.options.labelHidden = false;
894
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().addSiblingTreeRow(null,tableParam);";
895
- } else if ('addChildTreeRow' == formatS) {
1570
+ columnSelectedWidget.options.onClick =
1571
+ "let tableParam = this.tableParam;\nthis.getParentTarget().addSiblingTreeRow(null,tableParam);";
1572
+ } else if ("addChildTreeRow" == formatS) {
896
1573
  columnSelectedWidget.options.prefixIcon = "el-icon-plus";
897
1574
  columnSelectedWidget.options.label = "新增子节点";
898
1575
  columnSelectedWidget.options.labelHidden = false;
899
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().addChildTreeRow(null,tableParam);";
900
- } else if ('moveUpRow' == formatS) {
1576
+ columnSelectedWidget.options.onClick =
1577
+ "let tableParam = this.tableParam;\nthis.getParentTarget().addChildTreeRow(null,tableParam);";
1578
+ } else if ("moveUpRow" == formatS) {
901
1579
  // columnSelectedWidget.options.prefixIcon = "el-icon-plus";
902
1580
  columnSelectedWidget.options.label = "↑上移";
903
1581
  columnSelectedWidget.options.labelHidden = false;
904
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().moveUpRow(tableParam);";
905
- } else if ('moveDownRow' == formatS) {
1582
+ columnSelectedWidget.options.onClick =
1583
+ "let tableParam = this.tableParam;\nthis.getParentTarget().moveUpRow(tableParam);";
1584
+ } else if ("moveDownRow" == formatS) {
906
1585
  // columnSelectedWidget.options.prefixIcon = "el-icon-plus";
907
1586
  columnSelectedWidget.options.label = "↓下移";
908
1587
  columnSelectedWidget.options.labelHidden = false;
909
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().moveDownRow(tableParam);";
910
- } else if ('removeTreeRow' == formatS) {
1588
+ columnSelectedWidget.options.onClick =
1589
+ "let tableParam = this.tableParam;\nthis.getParentTarget().moveDownRow(tableParam);";
1590
+ } else if ("removeTreeRow" == formatS) {
911
1591
  columnSelectedWidget.options.prefixIcon = "el-icon-delete";
912
1592
  columnSelectedWidget.options.label = "删除";
913
1593
  columnSelectedWidget.options.labelHidden = true;
914
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().removeTreeRow(tableParam);";
1594
+ columnSelectedWidget.options.onClick =
1595
+ "let tableParam = this.tableParam;\nthis.getParentTarget().removeTreeRow(tableParam);";
915
1596
  }
916
1597
 
917
1598
  columnOption = columnSelectedWidget.options;
918
-
919
1599
  }
920
1600
 
921
1601
  // columnSelectedWidget.options.name = isEdit? (type + row.columnId) : row.prop;
922
1602
  // columnSelectedWidget.options.name = type + row.columnId;
923
1603
  // columnSelectedWidget.options.name = row.prop;
924
- if (columnSelectedWidget.options.hasOwnProperty('keyName')) {
1604
+ if (columnSelectedWidget.options.hasOwnProperty("keyName")) {
925
1605
  columnSelectedWidget.options.keyName = row.prop;
926
1606
  columnSelectedWidget.options.keyNameEnabled = true;
927
1607
  } else {
@@ -933,46 +1613,126 @@ export default {
933
1613
  columnSelectedWidget.options.labelHidden = true;
934
1614
  }
935
1615
  }
936
- return {columnSelectedWidget, columnEditFields};
1616
+ return { columnSelectedWidget, columnEditFields };
1617
+ },
1618
+ findColumnByColumnId(columnList, columnId) {
1619
+ let result = null;
1620
+ if (columnList) {
1621
+ let column = columnList.find((item) => item.columnId == columnId);
1622
+ if (!column) {
1623
+ }
1624
+ for (let column of columnList) {
1625
+ if (column.columnId == columnId) {
1626
+ result = column;
1627
+ break;
1628
+ } else if (column.children && column.children.length) {
1629
+ let subColumn = this.findColumnByColumnId(
1630
+ column.children,
1631
+ children
1632
+ );
1633
+ if (subColumn) {
1634
+ result = subColumn;
1635
+ break;
1636
+ }
1637
+ }
1638
+ }
1639
+ }
1640
+ return result;
1641
+ },
1642
+
1643
+ getRowWidget(row) {
1644
+ let widget = row.widget;
1645
+ if (!widget) {
1646
+ widget.options.a = a;
1647
+ widget.options.a = a;
1648
+ }
1649
+ return widget;
1650
+ },
1651
+ confirmEditTreeButtonGroupConfig(rowConfig) {
1652
+ if (this.currentEditTreeButtonGroupRow) {
1653
+ Object.assign(this.currentEditTreeButtonGroupRow, rowConfig);
1654
+ }
1655
+ this.currentEditTreeButtonGroupRow = null;
1656
+ this.editTreeButtonGroupRowData = null;
937
1657
  },
938
1658
  openFormatConfigDialog(row, index) {
939
- let option = row.columnOption;
940
- let selectedWidget;
941
- let columnWidgetConfig = this.getColumnWidgetConfig(row);
942
- let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
943
- if (columnSelectedWidget) {
944
- option = columnSelectedWidget.options;
945
- selectedWidget = columnSelectedWidget;
946
- } else {
947
- option = {}
948
- selectedWidget = {};
1659
+ if (row.formatS === "editTreeButtonGroup") {
1660
+ this.currentEditTreeButtonGroupRow = row;
1661
+ this.editTreeButtonGroupRowData = this.$baseLodash.cloneDeep(row);
1662
+ this.showEditTreeButtonGroupConfigDialog = true;
1663
+ return;
949
1664
  }
1665
+ if (row.formatS == "widgetRender") {
1666
+ let formWidgetList = deepClone(this.designer.widgetList);
1667
+ let tableData = deepClone(this.tableData);
1668
+ let columnId = row.columnId;
950
1669
 
951
- let columnOption = this.$baseLodash.cloneDeep(option);
952
- row.columnOption = columnOption;
953
- this.operateIndex = index;
1670
+ let dataTableName = this.optionModel.name;
1671
+
1672
+ let targetColumn = null;
1673
+ loopHandleWidget(formWidgetList, (item) => {
1674
+ if (item.options.name == dataTableName) {
1675
+ item.options.tableColumns = tableData;
1676
+ targetColumn = this.findColumnByColumnId(
1677
+ item.options.tableColumns,
1678
+ columnId
1679
+ );
1680
+ }
1681
+ });
1682
+ let getWidgetList = (subWidgetList = []) => {
1683
+ targetColumn.widgetList = this.$baseLodash.cloneDeep(subWidgetList);
1684
+ return formWidgetList;
1685
+ };
1686
+ let sourceData = {
1687
+ formWidgetList,
1688
+ dataTableName,
1689
+ columnId,
1690
+ getWidgetList,
1691
+ };
1692
+
1693
+ this.openWidgetRenderDialog(row, sourceData);
1694
+ return;
1695
+ }
954
1696
 
1697
+ const { columnSelectedWidget, columnEditFields } =
1698
+ this.getColumnWidgetConfig(row);
1699
+ if (!columnSelectedWidget) {
1700
+ this.$message.warning(this.$t1("请先选择列格式化类型"));
1701
+ return;
1702
+ }
1703
+ columnSelectedWidget.options = this.$baseLodash.cloneDeep(
1704
+ columnSelectedWidget.options
1705
+ );
1706
+ this.operateIndex = index;
955
1707
  this.openWidgetPropertyDialog({
956
1708
  row: row,
957
- columnSelectedWidget: selectedWidget,
1709
+ columnSelectedWidget,
1710
+ tableColumns: this.tableData,
958
1711
  index: index,
959
- columnEditFields: columnEditFields,
1712
+ columnEditFields,
960
1713
  callback: (columnOption) => {
961
- this.confirmFormatConfigDialog(columnOption);
962
- }
963
- })
1714
+ this.confirmFormatConfigDialog(columnOption, row);
1715
+ },
1716
+ });
964
1717
  },
965
1718
  getFieldKeyNameByOptions(options) {
966
1719
  let o = options.name;
967
- return (
968
- (options.keyNameEnabled
969
- && options.keyName)
970
- || o
971
- );
1720
+ return (options.keyNameEnabled && options.keyName) || o;
972
1721
  },
973
- confirmFormatConfigDialog(columnOption) {
974
- let row = this.tableData[this.operateIndex];
1722
+ confirmFormatConfigDialog(columnOption, row) {
1723
+ // let row = this.tableData[this.operateIndex];
975
1724
  row.columnOption = columnOption;
1725
+
1726
+ if (row.widget) {
1727
+ row.widget.options = columnOption;
1728
+ } else {
1729
+ let type = this.columnFormatMap[row.formatS];
1730
+ let fieldWidget = this.designer.createColumnWidget(row, false);
1731
+ fieldWidget.options = columnOption;
1732
+ row.widget = fieldWidget;
1733
+ this.$forceUpdate();
1734
+ }
1735
+
976
1736
  let isButtontCell = this.getIsButtontCell(row.formatS);
977
1737
  if (!isButtontCell) {
978
1738
  row.prop = this.getFieldKeyNameByOptions(columnOption);
@@ -981,74 +1741,185 @@ export default {
981
1741
  }
982
1742
  },
983
1743
  openEditFormatConfigDialog(row, index) {
984
- let option = row.columnOption;
985
- let selectedWidget;
986
- let columnWidgetConfig = this.getColumnWidgetConfig(row, null, true);
987
- let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
988
- if (columnSelectedWidget) {
989
- option = columnSelectedWidget.options;
990
- selectedWidget = columnSelectedWidget;
991
- } else {
992
- option = {}
993
- selectedWidget = {};
1744
+ const { columnSelectedWidget, columnEditFields } =
1745
+ this.getColumnWidgetConfig(row, false, true);
1746
+ if (!columnSelectedWidget) {
1747
+ this.$message.warning(this.$t1("请先选择编辑列格式化类型"));
1748
+ return;
994
1749
  }
995
-
996
- let columnOption = this.$baseLodash.cloneDeep(option);
997
- row.editColumnOption = columnOption;
1750
+ columnSelectedWidget.options = this.$baseLodash.cloneDeep(
1751
+ columnSelectedWidget.options
1752
+ );
998
1753
  this.operateIndex = index;
999
-
1000
1754
  this.openWidgetPropertyDialog({
1001
1755
  row: row,
1002
- columnSelectedWidget: selectedWidget,
1756
+ tableColumns: this.tableData,
1757
+ columnSelectedWidget,
1003
1758
  index: index,
1004
- columnEditFields: columnEditFields,
1759
+ columnEditFields,
1005
1760
  callback: (columnOption) => {
1006
- this.confirmEditFormatConfigDialog(columnOption);
1007
- }
1008
- })
1761
+ this.confirmEditFormatConfigDialog(columnOption, row);
1762
+ },
1763
+ });
1009
1764
  },
1010
- confirmEditFormatConfigDialog(columnOption) {
1011
- let row = this.tableData[this.operateIndex];
1765
+ confirmEditFormatConfigDialog(columnOption, row) {
1766
+ // let row = this.tableData[this.operateIndex];
1012
1767
  row.editColumnOption = columnOption;
1768
+ // row.editWidget.options = columnOption;
1769
+
1770
+ if (row.editWidget) {
1771
+ row.editWidget.options = columnOption;
1772
+ } else {
1773
+ let type = this.columnFormatMap[row.editFormatS];
1774
+ let fieldWidget = this.designer.createColumnWidget(row, true);
1775
+ fieldWidget.options = columnOption;
1776
+ row.editWidget = fieldWidget;
1777
+ this.$forceUpdate();
1778
+ }
1779
+
1013
1780
  /*row.prop = columnOption.name;
1014
1781
  row.label = columnOption.label;
1015
1782
  row.required = columnOption.required;*/
1016
1783
  },
1017
1784
  openTableColumnConfigDialog(row, index) {
1018
1785
  this.operateIndex = index;
1786
+ this.currentTableColumn = row;
1019
1787
  let eventName = "tableColumnConfig";
1020
- let eventParams = ["dataId", "formCode"]
1021
- this.tableColumnConfigHeader = `${this.optionModel.name}.${eventName}(${eventParams.join(', ')}) {`;
1022
- this.tableColumnConfigCode = this.$baseLodash.cloneDeep(row.tableColumnConfig || '');
1788
+ let eventParams = ["dataId", "formCode"];
1789
+ this.tableColumnConfigHeader = `${
1790
+ this.optionModel.name
1791
+ }.${eventName}(${eventParams.join(", ")}) {`;
1792
+ this.tableColumnConfigCode = this.$baseLodash.cloneDeep(
1793
+ row.tableColumnConfig || ""
1794
+ );
1023
1795
 
1024
1796
  this.tableColumnConfigTitle = `自定义表格列属性配置(${row.label})`;
1025
1797
  this.showTableColumnConfigDialog = true;
1026
1798
  },
1027
1799
  saveTableColumnConfigDialog() {
1028
- let row = this.tableData[this.operateIndex];
1800
+ // let row = this.tableData[this.operateIndex];
1801
+ let row = this.currentTableColumn;
1029
1802
  const codeHints = this.$refs.ecEditor.getEditorAnnotations();
1030
1803
  let syntaxErrorFlag = false;
1031
1804
  if (!!codeHints && codeHints.length > 0) {
1032
- codeHints.forEach(chItem => {
1033
- if (chItem.type === 'error') {
1805
+ codeHints.forEach((chItem) => {
1806
+ if (chItem.type === "error") {
1034
1807
  syntaxErrorFlag = true;
1035
1808
  }
1036
1809
  });
1037
1810
 
1038
1811
  if (syntaxErrorFlag) {
1039
- this.$message.error(this.i18nt('designer.setting.syntaxCheckWarning'));
1812
+ this.$message.error(
1813
+ this.i18nt("designer.setting.syntaxCheckWarning")
1814
+ );
1040
1815
  return;
1041
1816
  }
1042
1817
  }
1043
- this.$set(row, 'tableColumnConfig', this.$baseLodash.cloneDeep(this.tableColumnConfigCode))
1818
+ this.$set(
1819
+ row,
1820
+ "tableColumnConfig",
1821
+ this.$baseLodash.cloneDeep(this.tableColumnConfigCode)
1822
+ );
1044
1823
  this.showTableColumnConfigDialog = false;
1824
+ },
1825
+ changeRowLabel(row) {
1826
+ this.setRowWidgetAttars(row, "label", row.label);
1827
+ },
1828
+ changeRowProp(row) {
1829
+ this.setRowWidgetAttars(row, "keyName", row.prop);
1830
+ },
1831
+ changeRowRequired(row) {
1832
+ this.setRowWidgetAttars(row, "required", row.required);
1833
+ },
1834
+ setRowWidgetAttars(row, key, value) {
1835
+ let type1 = this.columnFormatMap[row.formatS];
1836
+ let type2 = this.columnFormatMap[row.editFormatS];
1837
+ let newWidget = type1
1838
+ ? this.designer.copyNewFieldWidget(
1839
+ this.designer.getFieldWidgetByType(type1)
1840
+ )
1841
+ : null;
1045
1842
 
1843
+ let newEditWidget = type2
1844
+ ? this.designer.copyNewFieldWidget(
1845
+ this.designer.getFieldWidgetByType(type2)
1846
+ )
1847
+ : null;
1848
+
1849
+ if (newWidget.formItemFlag) {
1850
+ if (row.widget) {
1851
+ if (row.widget.options[key] !== undefined)
1852
+ row.widget.options[key] = value;
1853
+ }
1854
+ if (row.columnOption) {
1855
+ if (row.columnOption[key] !== undefined)
1856
+ row.columnOption[key] = value;
1857
+ }
1858
+ }
1859
+
1860
+ if (newWidget.formItemFlag) {
1861
+ if (row.editWidget) {
1862
+ if (row.editWidget.options[key] !== undefined)
1863
+ row.editWidget.options[key] = value;
1864
+ }
1865
+ if (row.editColumnOption) {
1866
+ if (row.editColumnOption[key] !== undefined)
1867
+ row.editColumnOption[key] = value;
1868
+ }
1869
+ }
1046
1870
  },
1047
- }
1048
- }
1871
+ openRowEditDialog(row, index) {
1872
+ this.editRowData = row;
1873
+ this.rowData = this.$baseLodash.cloneDeep(row);
1874
+ this.rowDataIndex = index;
1875
+ this.showRowEditDialog = true;
1876
+ },
1877
+ submitRowEditDialog() {
1878
+ Object.assign(this.editRowData, this.$baseLodash.cloneDeep(this.rowData));
1879
+ // this.editRowData = this.$baseLodash.cloneDeep(this.rowData);
1880
+ this.showRowEditDialog = false;
1881
+ },
1882
+ closeRowEditDialog() {
1883
+ this.showRowEditDialog = false;
1884
+ },
1885
+ },
1886
+ };
1049
1887
  </script>
1050
1888
  <style scoped lang="scss">
1051
1889
  .icon-drag:before {
1052
- content: '\e61d';
1890
+ content: "\e61d";
1891
+ }
1892
+
1893
+ /* 固定弹框内容区高度,避免加载前后抖动 */
1894
+ ::v-deep .table-column-config-dialog.el-dialog {
1895
+ .el-dialog__body {
1896
+ height: 532px;
1897
+ max-height: 532px;
1898
+ overflow: hidden;
1899
+ box-sizing: border-box;
1900
+ }
1901
+ }
1902
+
1903
+ .table-column-dialog-cont {
1904
+ height: 516px;
1905
+ min-height: 516px;
1906
+ max-height: 516px;
1907
+ overflow: hidden;
1908
+ box-sizing: border-box;
1909
+ }
1910
+
1911
+ /* 完整列配置弹框:挂到 body,内容区可滚动 */
1912
+ ::v-deep .table-column-row-edit-dialog.el-dialog {
1913
+ .el-dialog__body {
1914
+ max-height: calc(90vh - 130px);
1915
+ overflow-y: auto;
1916
+ overflow-x: hidden;
1917
+ box-sizing: border-box;
1918
+ }
1919
+ }
1920
+
1921
+ .table-column-row-edit-cont {
1922
+ padding-bottom: 8px;
1923
+ box-sizing: border-box;
1053
1924
  }
1054
1925
  </style>