cloud-web-corejs 1.0.54-dev.67 → 1.0.54-dev.671

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 (513) 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 +14 -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/utc-transform-mixin.js +75 -0
  169. package/src/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin.js +179 -0
  170. package/src/components/xform/form-designer/form-widget/field-widget/multiSearch-widget.vue +53 -0
  171. package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +114 -81
  172. package/src/components/xform/form-designer/form-widget/field-widget/oplog-widget.vue +186 -0
  173. package/src/components/xform/form-designer/form-widget/field-widget/print-button-widget.vue +55 -28
  174. package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +119 -0
  175. package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +154 -47
  176. package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +26 -6
  177. package/src/components/xform/form-designer/form-widget/field-widget/search_button-widget.vue +2 -2
  178. package/src/components/xform/form-designer/form-widget/field-widget/select-export-button-widget.vue +86 -0
  179. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +92 -0
  180. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +24 -9
  181. package/src/components/xform/form-designer/form-widget/field-widget/singerSearch-widget.vue +53 -0
  182. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +145 -0
  183. package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +12 -1
  184. package/src/components/xform/form-designer/form-widget/field-widget/static-text-widget.vue +8 -3
  185. package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +82 -49
  186. package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +38 -38
  187. package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +99 -0
  188. package/src/components/xform/form-designer/form-widget/field-widget/tempStorage-widget.vue +147 -0
  189. package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +111 -34
  190. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +4 -3
  191. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +2 -1
  192. package/src/components/xform/form-designer/form-widget/field-widget/vabSearch-widget.vue +3 -171
  193. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +191 -66
  194. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +753 -0
  195. package/src/components/xform/form-designer/form-widget/field-widget/vue-page-widget.vue +231 -0
  196. package/src/components/xform/form-designer/form-widget/indexMixin.js +1 -1
  197. package/src/components/xform/form-designer/indexMixin.js +3 -2
  198. package/src/components/xform/form-designer/refMixinDesign.js +1 -28
  199. package/src/components/xform/form-designer/setting-panel/form-setting.vue +981 -172
  200. package/src/components/xform/form-designer/setting-panel/index.vue +41 -32
  201. package/src/components/xform/form-designer/setting-panel/indexMixin.js +1 -1
  202. package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +537 -302
  203. package/src/components/xform/form-designer/setting-panel/property-editor/a-link-editor.vue +4 -4
  204. package/src/components/xform/form-designer/setting-panel/property-editor/a-text-editor.vue +3 -3
  205. package/src/components/xform/form-designer/setting-panel/property-editor/autoValueEnabled-editor.vue +38 -0
  206. package/src/components/xform/form-designer/setting-panel/property-editor/buttonIcon-editor.vue +14 -15
  207. package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +6 -0
  208. package/src/components/xform/form-designer/setting-panel/property-editor/colorClass-editor.vue +28 -0
  209. package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +41 -0
  210. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +125 -0
  211. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +933 -1042
  212. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/edit-tree-button-group-config-dialog.vue +281 -0
  213. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +432 -0
  214. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/onCheckboxChange-editor.vue +1 -1
  215. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +1548 -587
  216. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +3 -3
  217. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-pane/detail-pane-editor.vue +3 -3
  218. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
  219. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
  220. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
  221. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +34 -46
  222. package/src/components/xform/form-designer/setting-panel/property-editor/container-tree/tree-customClass-editor.vue +31 -2
  223. package/src/components/xform/form-designer/setting-panel/property-editor/copyButton-editor.vue +36 -0
  224. package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +32 -0
  225. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +133 -0
  226. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin.js +2 -2
  227. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onAfterConfirmFile-editor.vue +5 -3
  228. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +23 -8
  229. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindEvent-editor.vue +35 -20
  230. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/icon-editor.vue +14 -15
  231. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +64 -5
  232. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-dateLimit-editor.vue +157 -0
  233. package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-item-editor.vue +21 -0
  234. package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -0
  235. package/src/components/xform/form-designer/setting-panel/property-editor/field-gantt/gantt-editor.vue +36 -0
  236. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +77 -20
  237. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -0
  238. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +44 -15
  239. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +115 -0
  240. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
  241. package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/preWrap-editor.vue +23 -0
  242. package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/textContent-editor.vue +1 -1
  243. package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +67 -41
  244. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-button-editor.vue +56 -0
  245. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +71 -0
  246. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +13 -1
  247. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +33 -1
  248. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +66 -0
  249. package/src/components/xform/form-designer/setting-panel/property-editor/field-vue-page/vue-page-editor.vue +48 -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 +304 -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 +225 -187
  276. package/src/components/xform/form-designer/setting-panel/widgetPropertyDialogMixin.js +186 -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 +1754 -953
  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 +3326 -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 +3721 -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/en-US.js +1 -0
  303. package/src/components/xform/lang/zh-CN.js +30 -4
  304. package/src/components/xform/mixins/defaultHandle.js +367 -2
  305. package/src/components/xform/mixins/scriptHttp.js +3 -1
  306. package/src/components/xform/utils/emitter.js +4 -4
  307. package/src/components/xform/utils/formHttp.js +162 -0
  308. package/src/components/xform/utils/format.js +41 -34
  309. package/src/components/xform/utils/formula-util.js +969 -0
  310. package/src/components/xform/utils/smart-vue-i18n/index.js +2 -1
  311. package/src/components/xform/utils/tableColumnHelper.js +112 -0
  312. package/src/components/xform/utils/util.js +1406 -1
  313. package/src/components/xform/utils/validators.js +2 -5
  314. package/src/components/xform/utils/vue2js-generator.js +2 -2
  315. package/src/components/xhsPrint/index.js +44 -1
  316. package/src/components/xhsPrint/mixins.js +269 -1
  317. package/src/directive/LimitNumber/index.js +125 -1
  318. package/src/directive/el-dialog-center/index.js +34 -1
  319. package/src/directive/el-drag-dialog/drag.js +86 -1
  320. package/src/directive/el-readonly/index.js +15 -1
  321. package/src/directive/permission/hasPermi.js +34 -1
  322. package/src/index.js +215 -190
  323. package/src/lang/index.js +56 -51
  324. package/src/lang/locale/en/login.js +27 -0
  325. package/src/lang/locale/zh/login.js +26 -0
  326. package/src/layout/components/AppMain.vue +8 -1
  327. package/src/layout/components/Sidebar/default.vue +1604 -1222
  328. package/src/layout/components/Sidebar/index.vue +6 -1
  329. package/src/layout/components/TagsView/index.vue +43 -12
  330. package/src/layout/components/createCompany/createCompanyDialog.vue +157 -0
  331. package/src/layout/components/extractedCode/createDialog.vue +92 -0
  332. package/src/layout/components/extractedCode/queryDialog.vue +103 -0
  333. package/src/layout/components/extractedCode/viewDialog.vue +207 -0
  334. package/src/layout/components/langTool.vue +33 -30
  335. package/src/layout/components/watermark/index.vue +83 -0
  336. package/src/layout/defaultLayout.vue +17 -9
  337. package/src/mixins/selectDialog/index.js +266 -1
  338. package/src/mixins/tableTree/index.js +199 -4
  339. package/src/mixins/wf/index.js +33 -1
  340. package/src/permission.js +135 -18
  341. package/src/resources/js/base/common.js +109 -109
  342. package/src/router/index.js +4 -7
  343. package/src/router/modules/customer.js +12 -18
  344. package/src/router/modules/system.js +4 -0
  345. package/src/store/config/index.js +83 -14
  346. package/src/store/getters.js +4 -1
  347. package/src/store/modules/permission.js +46 -41
  348. package/src/store/modules/settings.js +1 -1
  349. package/src/store/modules/tagsView.js +5 -8
  350. package/src/store/modules/user.js +367 -16
  351. package/src/utils/aes.js +2 -1
  352. package/src/utils/auth.js +1 -1
  353. package/src/utils/global.js +1 -1
  354. package/src/utils/index.js +2 -3
  355. package/src/utils/keepAlive.js +1 -1
  356. package/src/utils/pddLog.js +92 -0
  357. package/src/utils/pdfUtil.js +71 -0
  358. package/src/utils/request.js +1 -1
  359. package/src/utils/vab.js +1283 -27
  360. package/src/utils/validate.js +1 -1
  361. package/src/utils/wf.js +4 -4
  362. package/src/views/bd/setting/bd_attach_setting/edit.vue +5 -5
  363. package/src/views/bd/setting/bd_attach_setting/list.vue +28 -55
  364. package/src/views/bd/setting/bd_attach_setting/mixins/dialog.js +84 -1
  365. package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +116 -5
  366. package/src/views/bd/setting/bd_attach_setting/mixins/list.js +239 -1
  367. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -0
  368. package/src/views/bd/setting/bd_company_env/edit.vue +193 -0
  369. package/src/views/bd/setting/bd_company_env/list.vue +175 -0
  370. package/src/views/bd/setting/config_manage/list.vue +83 -0
  371. package/src/views/bd/setting/formVersion/button.vue +55 -0
  372. package/src/views/bd/setting/formVersion/compareBasicSection.vue +126 -0
  373. package/src/views/bd/setting/formVersion/compareCodeSection.vue +535 -0
  374. package/src/views/bd/setting/formVersion/compareContMixin.scss +71 -0
  375. package/src/views/bd/setting/formVersion/compareContent.vue +63 -0
  376. package/src/views/bd/setting/formVersion/compareDialog.vue +88 -0
  377. package/src/views/bd/setting/formVersion/compareMixin.js +93 -0
  378. package/src/views/bd/setting/formVersion/fieldCompare.vue +54 -0
  379. package/src/views/bd/setting/formVersion/formScriptCompareView.vue +94 -0
  380. package/src/views/bd/setting/formVersion/formTemplateCompareView.vue +74 -0
  381. package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +400 -0
  382. package/src/views/bd/setting/formVersion/link.vue +58 -0
  383. package/src/views/bd/setting/formVersion/preformDialog.vue +87 -0
  384. package/src/views/bd/setting/formVersion/reverButton.vue +82 -0
  385. package/src/views/bd/setting/formVersion/tableDetailDiff.js +78 -0
  386. package/src/views/bd/setting/formVersion/tableModelCompareView.vue +468 -0
  387. package/src/views/bd/setting/formVersion/textDiff.js +102 -0
  388. package/src/views/bd/setting/form_import_log/edit.vue +130 -0
  389. package/src/views/bd/setting/form_import_log/list.vue +211 -0
  390. package/src/views/bd/setting/form_script/edit.vue +196 -74
  391. package/src/views/bd/setting/form_script/edit1.vue +410 -187
  392. package/src/views/bd/setting/form_script/form_list.vue +118 -37
  393. package/src/views/bd/setting/form_script/list.vue +90 -21
  394. package/src/views/bd/setting/form_script/list1.vue +200 -118
  395. package/src/views/bd/setting/form_script/mixins/dialog.js +130 -1
  396. package/src/views/bd/setting/form_script/mixins/edit.js +265 -7
  397. package/src/views/bd/setting/form_script/mixins/edit1.js +259 -9
  398. package/src/views/bd/setting/form_script/mixins/form_list.js +322 -14
  399. package/src/views/bd/setting/form_script/mixins/list.js +278 -4
  400. package/src/views/bd/setting/form_script/mixins/list1.js +480 -14
  401. package/src/views/bd/setting/form_script/mixins/list2.js +10 -1
  402. package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +194 -0
  403. package/src/views/bd/setting/form_script/mixins/preformDialog.js +34 -1
  404. package/src/views/bd/setting/form_script/otherAuthDialog.vue +83 -0
  405. package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +3 -3
  406. package/src/views/bd/setting/form_template/edit.vue +355 -184
  407. package/src/views/bd/setting/form_template/formDesignerDialog.vue +171 -0
  408. package/src/views/bd/setting/form_template/list.vue +296 -214
  409. package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +279 -1
  410. package/src/views/bd/setting/form_template/mixins/dialog.js +103 -1
  411. package/src/views/bd/setting/form_template/mixins/edit.js +277 -9
  412. package/src/views/bd/setting/form_template/mixins/editWfObjConfigDialog.js +92 -1
  413. package/src/views/bd/setting/form_template/mixins/ftHistoryDialog.js +91 -1
  414. package/src/views/bd/setting/form_template/mixins/itemEdit.js +104 -1
  415. package/src/views/bd/setting/form_template/mixins/itemList.js +234 -1
  416. package/src/views/bd/setting/form_template/mixins/list.js +672 -22
  417. package/src/views/bd/setting/form_template/mixins/list2.js +411 -0
  418. package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +193 -0
  419. package/src/views/bd/setting/form_template/mixins/preformDialog.js +28 -3
  420. package/src/views/bd/setting/form_template/mixins/wf_list.js +421 -3
  421. package/src/views/bd/setting/form_template/otherAuthDialog.vue +83 -0
  422. package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +2 -2
  423. package/src/views/bd/setting/form_template/wf_list.vue +161 -127
  424. package/src/views/bd/setting/logic_param/edit.vue +146 -0
  425. package/src/views/bd/setting/logic_param/edit1.vue +106 -0
  426. package/src/views/bd/setting/logic_param/edit2.vue +139 -0
  427. package/src/views/bd/setting/logic_param/list.vue +74 -0
  428. package/src/views/bd/setting/logic_param/list1.vue +12 -0
  429. package/src/views/bd/setting/logic_param/list2.vue +12 -0
  430. package/src/views/bd/setting/logic_param/mixins/edit.js +93 -0
  431. package/src/views/bd/setting/logic_param/mixins/list.js +376 -0
  432. package/src/views/bd/setting/menu_kind/list.vue +172 -83
  433. package/src/views/bd/setting/menu_kind/mixins/authDialog.js +300 -7
  434. package/src/views/bd/setting/menu_kind/mixins/dialog.js +139 -1
  435. package/src/views/bd/setting/menu_kind/mixins/list.js +201 -1
  436. package/src/views/bd/setting/push_data/edit.vue +139 -0
  437. package/src/views/bd/setting/push_data/list.vue +283 -0
  438. package/src/views/bd/setting/push_data_h/edit.vue +153 -0
  439. package/src/views/bd/setting/push_data_h/list.vue +293 -0
  440. package/src/views/bd/setting/request_async_setting/edit.vue +320 -0
  441. package/src/views/bd/setting/request_async_setting/list.vue +372 -0
  442. package/src/views/bd/setting/request_setting/edit.vue +300 -0
  443. package/src/views/bd/setting/request_setting/list.vue +301 -0
  444. package/src/views/bd/setting/table_model/edit.vue +1079 -426
  445. package/src/views/bd/setting/table_model/list.vue +213 -128
  446. package/src/views/bd/setting/table_model/mixins/dialog.js +71 -1
  447. package/src/views/bd/setting/table_model/mixins/edit.js +1309 -13
  448. package/src/views/bd/setting/table_model/mixins/list.js +429 -2
  449. package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +201 -0
  450. package/src/views/bd/setting/table_model/mixins/zdDialog.js +114 -3
  451. package/src/views/bd/setting/table_model/otherAuthDialog.vue +83 -0
  452. package/src/views/bd/setting/utils/index.js +60 -1
  453. package/src/views/user/access_log/list.vue +418 -349
  454. package/src/views/user/area/dialog.vue +223 -117
  455. package/src/views/user/area/list.vue +318 -0
  456. package/src/views/user/common_attribute/list.vue +4 -1
  457. package/src/views/user/company_info/dialog.vue +195 -163
  458. package/src/views/user/extend_datasource/dialog.vue +3 -0
  459. package/src/views/user/extend_datasource/edit.vue +2 -1
  460. package/src/views/user/extend_datasource/list.vue +3 -0
  461. package/src/views/user/fieldTranslation/editDialog.vue +8 -8
  462. package/src/views/user/fieldTranslation/list.vue +33 -33
  463. package/src/views/user/form/vform/designer.vue +790 -749
  464. package/src/views/user/form/vform/out_render.vue +1 -1
  465. package/src/views/user/form/vform/render.vue +67 -37
  466. package/src/views/user/form/view/edit.vue +56 -37
  467. package/src/views/user/form/view/list.vue +311 -52
  468. package/src/views/user/home/default.vue +1117 -979
  469. package/src/views/user/home/dev.vue +29 -0
  470. package/src/views/user/home/index.vue +18 -7
  471. package/src/views/user/login/default.vue +165 -36
  472. package/src/views/user/login/index.vue +4 -6
  473. package/src/views/user/login/indexMixin.js +329 -118
  474. package/src/views/user/menu/list.vue +27 -1
  475. package/src/views/user/notify_message/dialog.vue +44 -22
  476. package/src/views/user/notify_template/edit.vue +188 -187
  477. package/src/views/user/notify_template/edit2.vue +176 -0
  478. package/src/views/user/notify_template/list.vue +4 -1
  479. package/src/views/user/notify_template/list2.vue +190 -0
  480. package/src/views/user/outLink/form_view.vue +211 -211
  481. package/src/views/user/outLink/index.vue +67 -11
  482. package/src/views/user/position/list.vue +112 -72
  483. package/src/views/user/project_tag/dialog.vue +9 -4
  484. package/src/views/user/project_tag/edit.vue +2 -2
  485. package/src/views/user/project_tag/list.vue +9 -4
  486. package/src/views/user/request_setting/edit.vue +258 -0
  487. package/src/views/user/request_setting/list.vue +248 -0
  488. package/src/views/user/role/authConfig.vue +89 -0
  489. package/src/views/user/role/dialog.vue +70 -48
  490. package/src/views/user/role/edit.vue +609 -429
  491. package/src/views/user/role/list.vue +4 -4
  492. package/src/views/user/sale_org/dialog.vue +1 -1
  493. package/src/views/user/sale_org/list.vue +4 -1
  494. package/src/views/user/system_notice/infoDialog.vue +2 -1
  495. package/src/views/user/user/dialog.vue +46 -23
  496. package/src/views/user/user/edit.vue +1391 -1021
  497. package/src/views/user/user/form_dialog.vue +158 -0
  498. package/src/views/user/user/form_info.vue +210 -0
  499. package/src/views/user/user/info.vue +253 -140
  500. package/src/views/user/user/list.vue +652 -563
  501. package/src/views/user/user/modifyPasswordDialog.vue +64 -53
  502. package/src/views/user/wf/wfReport/index.vue +619 -0
  503. package/src/views/user/wf/wf_auto_submit_data/list.vue +2 -0
  504. package/src/views/user/wf/wf_manage/list.vue +379 -250
  505. package/src/views/user/wf/wf_manage/list2.vue +854 -0
  506. package/src/views/user/wf/wf_manage/wfContentDialog.vue +25 -22
  507. package/src/views/user/wf/wf_obj_config/importItemDialog.vue +109 -0
  508. package/src/views/user/wf/wf_obj_config/itemEdit.vue +25 -1
  509. package/src/views/user/wf/wf_obj_config/list.vue +114 -9
  510. package/src/views/user/wf/wf_transfer_setting/edit.vue +282 -0
  511. package/src/views/user/wf/wf_transfer_setting/list.vue +319 -0
  512. package/src/views/user/workbench_menu/list.vue +555 -0
  513. 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,898 @@
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>
370
+ <el-alert type="info" :closable="false" title="}"></el-alert>
371
+ </div>
372
+ <div slot="footer" class="dialog-footer">
373
+ <el-button
374
+ @click="showTableColumnConfigDialog = false"
375
+ class="button-sty"
376
+ icon="el-icon-close"
377
+ >
378
+ {{ i18nt("designer.hint.cancel") }}
379
+ </el-button>
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>
255
416
  <el-alert type="info" :closable="false" title="}"></el-alert>
256
417
  </div>
257
418
  <div slot="footer" class="dialog-footer">
258
- <el-button @click="showTableColumnConfigDialog = false" class="button-sty" icon="el-icon-close">
259
- {{ i18nt('designer.hint.cancel') }}
419
+ <el-button
420
+ @click="showFormEventDialogFlag = false"
421
+ class="button-sty"
422
+ icon="el-icon-close"
423
+ >
424
+ {{ i18nt("designer.hint.cancel") }}
260
425
  </el-button>
261
- <el-button type="primary" @click="saveTableColumnConfigDialog" class="button-sty" icon="el-icon-check">
262
- {{ i18nt('designer.hint.confirm') }}
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-item label-width="0" class="form-item-full">
619
+ <el-divider class="custom-divider">{{
620
+ i18nt("designer.setting.customLabelIcon")
621
+ }}</el-divider>
622
+ </el-form-item>
623
+ <el-form-item :label="i18nt('designer.setting.labelIconClass')">
624
+ <icon-picker v-model="rowData.labelIconClass"></icon-picker>
625
+ </el-form-item>
626
+ <el-form-item :label="i18nt('designer.setting.labelIconPosition')">
627
+ <el-select
628
+ v-model="rowData.labelIconPosition"
629
+ clearable
630
+ placeholder="默认后面"
631
+ >
632
+ <el-option label="前面" value="front"></el-option>
633
+ <el-option label="后面" value="rear"></el-option>
634
+ </el-select>
635
+ </el-form-item>
636
+ <el-form-item
637
+ :label="i18nt('designer.setting.labelTooltip')"
638
+ class="form-item-full"
639
+ >
640
+ <el-input
641
+ type="text"
642
+ v-model="rowData.labelTooltip"
643
+ clearable
644
+ ></el-input>
645
+ </el-form-item>
646
+ </el-form>
647
+ </div>
648
+ <div class="dialog-footer" slot="footer">
649
+ <el-button
650
+ @click="closeRowEditDialog"
651
+ class="button-sty"
652
+ icon="el-icon-close"
653
+ >
654
+ {{ i18nt("designer.hint.cancel") }}
655
+ </el-button>
656
+ <el-button
657
+ type="primary"
658
+ @click="submitRowEditDialog"
659
+ class="button-sty"
660
+ icon="el-icon-check"
661
+ >
662
+ {{ i18nt("designer.hint.confirm") }}
663
+ </el-button>
664
+ </div>
665
+ </el-dialog>
666
+ </el-dialog>
268
667
  </template>
269
668
  <script>
270
669
  import i18n from "../../../../../../components/xform/utils/i18n";
271
670
  import Sortable from "sortablejs";
272
- import {generateId} from "../../../../../../components/xform/utils/util";
671
+ import {
672
+ generateId,
673
+ loopHandleWidget,
674
+ deepClone,
675
+ columnFormatMap,
676
+ } from "../../../../../../components/xform/utils/util";
677
+ import columnRenderDialog from "./columnRenderDialog.vue";
678
+ import editTreeButtonGroupConfigDialog from "./edit-tree-button-group-config-dialog.vue";
679
+ import IconPicker from "@base/components/xform/icon-picker/index.vue";
680
+
681
+ let businessOptions = [
682
+ {
683
+ value: "_createBy",
684
+ label: "创建人",
685
+ },
686
+ {
687
+ value: "_modifyBy",
688
+ label: "更新人",
689
+ },
690
+ {
691
+ value: "create_date",
692
+ label: "创建时间",
693
+ },
694
+ {
695
+ value: "modify_date",
696
+ label: "更新时间",
697
+ },
698
+ ];
699
+ let userFields = ["_createBy", "_modifyBy", "create_date", "modify_date"];
273
700
 
274
701
  export default {
275
702
  mixins: [i18n],
276
703
  props: {
277
704
  designer: Object,
278
705
  selectedWidget: Object,
279
- optionModel: Object
706
+ optionModel: Object,
707
+ visiable: {
708
+ type: Boolean,
709
+ default: false,
710
+ },
711
+ },
712
+ components: {
713
+ columnRenderDialog,
714
+ editTreeButtonGroupConfigDialog,
715
+ IconPicker,
280
716
  },
281
- components: {},
282
- inject: ['openWidgetPropertyDialog'],
717
+ inject: ["openWidgetPropertyDialog"],
283
718
  data() {
284
719
  return {
720
+ tableReady: false,
285
721
  tableColumnConfigTitle: null,
286
722
  showTableColumnConfigDialog: false,
287
723
  tableColumnConfigHeader: null,
288
724
  tableColumnConfigCode: null,
289
- showDialog: true,
290
- dialogVisible: true,
725
+ showEditTreeButtonGroupConfigDialog: false,
726
+ currentEditTreeButtonGroupRow: null,
727
+ editTreeButtonGroupRowData: null,
291
728
  alignOptions: [
292
729
  {
293
- value: 'left',
294
- label: 'left'
730
+ value: "left",
731
+ label: "left",
295
732
  },
296
733
  {
297
- value: 'center',
298
- label: 'center'
734
+ value: "center",
735
+ label: "center",
299
736
  },
300
737
  {
301
- value: 'right',
302
- label: 'right'
303
- }
738
+ value: "right",
739
+ label: "right",
740
+ },
304
741
  ],
742
+ businessOptions,
743
+ userFields,
305
744
  op: [
306
745
  {
307
- label: 'edit Format',
746
+ label: "edit Format",
308
747
  options: [
309
748
  {
310
- value: 'editInput',
311
- label: '文本输入框'
749
+ value: "editInput",
750
+ label: "文本输入框",
312
751
  },
313
752
  {
314
- value: 'editNumber',
315
- label: '数字输入框'
753
+ value: "editNumber",
754
+ label: "数字输入框",
316
755
  },
317
756
  {
318
- value: 'editDate',
319
- label: '日期输入框'
757
+ value: "editDate",
758
+ label: "日期输入框",
320
759
  },
321
760
  {
322
- value: 'editSelect',
323
- label: '下拉框'
761
+ value: "textarea",
762
+ label: "多行文本输入框",
324
763
  },
325
764
  {
326
- value: 'editAttachment',
327
- label: '附件'
765
+ value: "editSelect",
766
+ label: "下拉框",
328
767
  },
329
768
  {
330
- value: 'editSearch',
331
- label: '搜索框'
769
+ value: "checkbox",
770
+ label: "复选框",
332
771
  },
333
772
  {
334
- value: 'editStatus',
335
- label: '状态'
773
+ value: "radio",
774
+ label: "单选框",
336
775
  },
337
776
  {
338
- value: 'editDelete',
339
- label: '删除按钮'
777
+ value: "editAttachment",
778
+ label: "附件",
340
779
  },
341
780
  {
342
- value: 'editButton',
343
- label: '查看按钮'
781
+ value: "editSearch",
782
+ label: "搜索框",
344
783
  },
345
784
  {
346
- value: 'aText',
347
- label: '超链接文本'
785
+ value: "editStatus",
786
+ label: "状态",
348
787
  },
349
788
  {
350
- value: 'aLink',
351
- label: '超链接按钮'
789
+ value: "text",
790
+ label: "文本",
352
791
  },
353
792
  {
354
- value: 'button',
355
- label: '按钮'
793
+ value: "aText",
794
+ label: "超链接文本",
356
795
  },
357
796
  {
358
- value: 'editTreeButtonGroup',
359
- label: '编辑行按钮组'
360
- }
361
- ]
797
+ value: "widgetRender",
798
+ label: "自定义组件",
799
+ },
800
+ ],
362
801
  },
363
802
  {
364
- label: '树控件',
803
+ label: "按钮控件",
365
804
  options: [
366
805
  {
367
- value: 'addSiblingEditRow',
368
- label: '新增兄弟节点'
806
+ value: "dropdown",
807
+ label: "下拉按钮",
369
808
  },
370
809
  {
371
- value: 'addChildTreeRow',
372
- label: '新增子节点'
810
+ value: "editDelete",
811
+ label: "删除按钮",
373
812
  },
374
813
  {
375
- value: 'moveUpRow',
376
- label: '上移'
814
+ value: "editButton",
815
+ label: "查看按钮",
377
816
  },
378
817
  {
379
- value: 'moveDownRow',
380
- label: '下移'
818
+ value: "aLink",
819
+ label: "超链接按钮",
381
820
  },
382
821
  {
383
- value: 'removeTreeRow',
384
- label: '删除树节点'
385
- }
386
- ]
822
+ value: "button",
823
+ label: "按钮",
824
+ },
825
+ {
826
+ value: "editTreeButtonGroup",
827
+ label: "编辑行按钮组",
828
+ },
829
+ ],
387
830
  },
388
831
  {
389
- label: 'Date Format',
832
+ label: "树控件",
390
833
  options: [
391
834
  {
392
- value: 'd1',
393
- label: 'yyyy-MM-dd'
835
+ value: "addSiblingEditRow",
836
+ label: "新增兄弟节点",
394
837
  },
395
838
  {
396
- value: 'd2',
397
- label: 'yyyy/MM/dd'
839
+ value: "addChildTreeRow",
840
+ label: "新增子节点",
398
841
  },
399
842
  {
400
- value: 'd3',
401
- label: 'yyyy年MM月dd日'
843
+ value: "moveUpRow",
844
+ label: "上移",
402
845
  },
403
846
  {
404
- value: 'd4',
405
- label: 'yyyy-MM-dd HH:mm:ss'
847
+ value: "moveDownRow",
848
+ label: "下移",
406
849
  },
407
850
  {
408
- value: 'd5',
409
- label: 'yyyy-MM-dd hh:mm:ss'
410
- }
411
- ]
851
+ value: "removeTreeRow",
852
+ label: "删除树节点",
853
+ },
854
+ ],
412
855
  },
856
+
413
857
  {
414
- label: 'Number Format',
858
+ label: "业务模块",
859
+ options: businessOptions,
860
+ },
861
+ {
862
+ label: "日期格式化",
415
863
  options: [
416
864
  {
417
- value: 'n1',
418
- label: '###,###,###,##0.######'
865
+ value: "d1",
866
+ label: "yyyy-MM-dd",
419
867
  },
420
868
  {
421
- value: 'n2',
422
- label: '###,###,###,##0.00####'
869
+ value: "d2",
870
+ label: "yyyy/MM/dd",
423
871
  },
424
872
  {
425
- value: 'n3',
426
- label: '###,###,###,##0.000000'
873
+ value: "d3",
874
+ label: "yyyy年MM月dd日",
427
875
  },
428
876
  {
429
- value: 'n4',
430
- label: '###,###,###,##0.000'
877
+ value: "d4",
878
+ label: "yyyy-MM-dd HH:mm:ss",
431
879
  },
432
880
  {
433
- value: 'n5',
434
- label: '###,###,###,##0.00'
881
+ value: "d5",
882
+ label: "yyyy-MM-dd hh:mm:ss",
883
+ },
884
+ ],
885
+ },
886
+ {
887
+ label: "数字格式化",
888
+ options: [
889
+ {
890
+ value: "n1",
891
+ label: "###,###,###,##0.######",
435
892
  },
436
893
  {
437
- value: 'n6',
438
- label: '###,###,###,##0'
894
+ value: "n2",
895
+ label: "###,###,###,##0.00####",
439
896
  },
440
897
  {
441
- value: 'n7',
442
- label: '###,##0.00##%'
443
- }
444
- ]
445
- }
898
+ value: "n3",
899
+ label: "###,###,###,##0.000000",
900
+ },
901
+ {
902
+ value: "n4",
903
+ label: "###,###,###,##0.000",
904
+ },
905
+ {
906
+ value: "n5",
907
+ label: "###,###,###,##0.00",
908
+ },
909
+ {
910
+ value: "n6",
911
+ label: "###,###,###,##0",
912
+ },
913
+ {
914
+ value: "n7",
915
+ label: "###,##0.00##%",
916
+ },
917
+ ],
918
+ },
446
919
  ],
447
920
  editOp: [
448
921
  {
449
- value: 'editInput',
450
- label: '文本输入框'
922
+ value: "editInput",
923
+ label: "文本输入框",
451
924
  },
452
925
  {
453
- value: 'editNumber',
454
- label: '数字输入框'
926
+ value: "editNumber",
927
+ label: "数字输入框",
455
928
  },
456
929
  {
457
- value: 'editDate',
458
- label: '日期输入框'
930
+ value: "editDate",
931
+ label: "日期输入框",
459
932
  },
460
933
  {
461
- value: 'editSelect',
462
- label: '下拉框'
934
+ value: "editSelect",
935
+ label: "下拉框",
463
936
  },
464
937
  {
465
- value: 'editAttachment',
466
- label: '附件'
938
+ value: "editAttachment",
939
+ label: "附件",
467
940
  },
468
941
  {
469
- value: 'editSearch',
470
- label: '搜索框'
471
- }
942
+ value: "editSearch",
943
+ label: "搜索框",
944
+ },
472
945
  ],
473
946
  showRenderDialogFlag: !1,
474
- renderJson: '',
947
+ renderJson: "",
475
948
  currentTableColumn: null,
949
+ sourceData: null,
476
950
 
477
951
  hideAfter: 1500,
478
952
  openDelay: 500,
479
- tableData: [],//树形结构数据转的数组
953
+ tableData: [], //树形结构数据转的数组
480
954
  tableDataArray: [],
481
955
  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'
956
+ columnFormatMap,
957
+
958
+ showFormEventDialogFlag: false,
959
+ formEventHandlerCode: "",
960
+ curEventName: "",
961
+ curEventRow: null,
962
+
963
+ eventParamsMap: {
964
+ footerMethodConfg: "footerMethodConfg(dataId,formCode,param) {",
500
965
  },
501
- }
966
+
967
+ showColumnRenderDialog: false,
968
+
969
+ editRowData: null,
970
+ rowData: null,
971
+ rowDataIndex: 0,
972
+ showRowEditDialog: false,
973
+ sourceTableColumnsSnapshot: null,
974
+ };
502
975
  },
503
976
  beforeDestroy() {
504
- if (this.dragSort) this.dragSort.destroy()
977
+ if (this.dragSort) this.dragSort.destroy();
505
978
  },
506
- created() {
507
-
979
+ computed: {
980
+ showDialog: {
981
+ get() {
982
+ return this.visiable;
983
+ },
984
+ set(val) {
985
+ this.$emit("update:visiable", val);
986
+ },
987
+ },
988
+ shouldExpandAllTable() {
989
+ return this.countTreeRows(this.tableData) <= 30;
990
+ },
508
991
  },
992
+ watch: {
993
+ visiable(val) {
994
+ if (val) {
995
+ this.onDialogOpen();
996
+ } else {
997
+ this.onDialogClose();
998
+ }
999
+ },
1000
+ },
1001
+ created() {},
509
1002
  mounted() {
510
- this.init();
1003
+ if (this.visiable) {
1004
+ this.onDialogOpen();
1005
+ }
511
1006
  },
512
1007
  methods: {
513
- init() {
514
- this.tableData = this.$baseLodash.cloneDeep(this.optionModel.tableColumns);
1008
+ countTreeRows(rows) {
1009
+ if (!Array.isArray(rows) || !rows.length) {
1010
+ return 0;
1011
+ }
1012
+ let count = 0;
1013
+ const walk = (list) => {
1014
+ list.forEach((item) => {
1015
+ count += 1;
1016
+ if (item.children && item.children.length) {
1017
+ walk(item.children);
1018
+ }
1019
+ });
1020
+ };
1021
+ walk(rows);
1022
+ return count;
1023
+ },
1024
+ cloneTableColumnsForEdit(columns) {
1025
+ if (!Array.isArray(columns)) {
1026
+ return [];
1027
+ }
1028
+ const refKeys = ["widget", "editWidget", "widgetList"];
1029
+ const cloneRow = (row) => {
1030
+ if (!row || typeof row !== "object") {
1031
+ return row;
1032
+ }
1033
+ const cloned = {};
1034
+ Object.keys(row).forEach((key) => {
1035
+ const val = row[key];
1036
+ if (key === "children" && Array.isArray(val) && val.length) {
1037
+ cloned.children = val.map(cloneRow);
1038
+ return;
1039
+ }
1040
+ if (refKeys.includes(key)) {
1041
+ cloned[key] = val;
1042
+ return;
1043
+ }
1044
+ if (key === "columnOption") {
1045
+ if (!row.widget) {
1046
+ cloned.columnOption =
1047
+ val !== null && typeof val === "object" ? deepClone(val) : val;
1048
+ }
1049
+ return;
1050
+ }
1051
+ if (key === "editColumnOption") {
1052
+ if (!row.editWidget) {
1053
+ cloned.editColumnOption =
1054
+ val !== null && typeof val === "object" ? deepClone(val) : val;
1055
+ }
1056
+ return;
1057
+ }
1058
+ if (val !== null && typeof val === "object") {
1059
+ try {
1060
+ cloned[key] = deepClone(val);
1061
+ } catch (e) {
1062
+ cloned[key] = val;
1063
+ }
1064
+ return;
1065
+ }
1066
+ cloned[key] = val;
1067
+ });
1068
+ if (row.widget && !cloned.widget) {
1069
+ cloned.widget = row.widget;
1070
+ }
1071
+ if (row.editWidget && !cloned.editWidget) {
1072
+ cloned.editWidget = row.editWidget;
1073
+ }
1074
+ return cloned;
1075
+ };
1076
+ return columns.map(cloneRow);
1077
+ },
1078
+ buildColumnWidgetMap(columns, map = {}) {
1079
+ if (!Array.isArray(columns)) {
1080
+ return map;
1081
+ }
1082
+ columns.forEach((col) => {
1083
+ if (col && col.columnId) {
1084
+ map[col.columnId] = col;
1085
+ }
1086
+ if (col.children && col.children.length) {
1087
+ this.buildColumnWidgetMap(col.children, map);
1088
+ }
1089
+ });
1090
+ return map;
1091
+ },
1092
+ restoreColumnWidgetRefs(columns, widgetMap) {
1093
+ if (!Array.isArray(columns)) {
1094
+ return [];
1095
+ }
1096
+ return columns.map((row) => {
1097
+ const next = Object.assign({}, row);
1098
+ const orig = widgetMap[next.columnId];
1099
+ if (orig) {
1100
+ if (!next.widget && orig.widget) {
1101
+ next.widget = orig.widget;
1102
+ }
1103
+ if (!next.editWidget && orig.editWidget) {
1104
+ next.editWidget = orig.editWidget;
1105
+ }
1106
+ if (
1107
+ (!next.widgetList || !next.widgetList.length) &&
1108
+ orig.widgetList &&
1109
+ orig.widgetList.length
1110
+ ) {
1111
+ next.widgetList = orig.widgetList;
1112
+ }
1113
+ }
1114
+ if (next.children && next.children.length) {
1115
+ next.children = this.restoreColumnWidgetRefs(
1116
+ next.children,
1117
+ widgetMap
1118
+ );
1119
+ }
1120
+ return next;
1121
+ });
1122
+ },
1123
+ editFormEventHandler(row, index, eventName) {
1124
+ this.curEventRow = row;
1125
+ this.curEventName = eventName;
1126
+ this.curEventIndex = index;
1127
+ this.formEventHandlerCode = row[eventName];
1128
+ this.showFormEventDialogFlag = true;
1129
+ },
1130
+
1131
+ saveFormEventHandler() {
1132
+ const codeHints = this.$refs.ecEditor.getEditorAnnotations();
1133
+ let syntaxErrorFlag = false;
1134
+ if (!!codeHints && codeHints.length > 0) {
1135
+ codeHints.forEach((chItem) => {
1136
+ if (chItem.type === "error") {
1137
+ syntaxErrorFlag = true;
1138
+ }
1139
+ });
1140
+
1141
+ if (syntaxErrorFlag) {
1142
+ this.$message.error(
1143
+ this.i18nt("designer.setting.syntaxCheckWarning")
1144
+ );
1145
+ return;
1146
+ }
1147
+ }
1148
+ this.curEventRow[this.curEventName] = this.formEventHandlerCode;
1149
+ this.showFormEventDialogFlag = false;
1150
+ },
1151
+ onDialogClose() {
1152
+ this.tableReady = false;
1153
+ this.sourceTableColumnsSnapshot = null;
1154
+ if (this.dragSort) {
1155
+ this.dragSort.destroy();
1156
+ this.dragSort = null;
1157
+ }
1158
+ },
1159
+ onDialogOpen() {
1160
+ this.tableReady = false;
1161
+ if (this.dragSort) {
1162
+ this.dragSort.destroy();
1163
+ this.dragSort = null;
1164
+ }
515
1165
  this.$nextTick(() => {
516
- this.rowDrop();
1166
+ const load = () => {
1167
+ this.loadTableData();
1168
+ this.tableReady = true;
1169
+ this.$nextTick(() => {
1170
+ requestAnimationFrame(() => {
1171
+ this.rowDrop();
1172
+ });
1173
+ });
1174
+ };
1175
+ if (typeof requestIdleCallback === "function") {
1176
+ requestIdleCallback(load, { timeout: 80 });
1177
+ } else {
1178
+ setTimeout(load, 0);
1179
+ }
517
1180
  });
518
1181
  },
1182
+ loadTableData() {
1183
+ const source = this.optionModel.tableColumns || [];
1184
+ this.sourceTableColumnsSnapshot = source;
1185
+ this.tableData = this.cloneTableColumnsForEdit(source);
1186
+ },
519
1187
  colSubmit() {
520
1188
  this.dialogVisible = !1;
521
- this.optionModel.tableColumns = this.tableData;
1189
+ const widgetMap = this.buildColumnWidgetMap(
1190
+ this.sourceTableColumnsSnapshot || []
1191
+ );
1192
+ this.optionModel.tableColumns = this.restoreColumnWidgetRefs(
1193
+ this.tableData,
1194
+ widgetMap
1195
+ );
1196
+ this.sourceTableColumnsSnapshot = null;
522
1197
  this.closeHandle();
523
1198
  },
1199
+ openWidgetRenderDialog(row, sourceData) {
1200
+ this.currentTableColumn = row;
1201
+ this.sourceData = sourceData;
1202
+
1203
+ // this.widgetList =
1204
+
1205
+ // this.designer.widgetList
1206
+
1207
+ this.showColumnRenderDialog = true;
1208
+ },
1209
+ confirmWidgetRenderDialog(widgetList) {
1210
+ this.currentTableColumn.widgetList = widgetList;
1211
+ this.showColumnRenderDialog = false;
1212
+ },
524
1213
  showRenderDialog: function (e) {
525
- (this.currentTableColumn = e), (this.renderJson = e.render || ''), (this.showRenderDialogFlag = !0);
1214
+ /*if(e.formatS == 'widgetRender'){
1215
+ this.openWidgetRenderDialog(e);
1216
+ return
1217
+ }*/
1218
+
1219
+ (this.currentTableColumn = e),
1220
+ (this.renderJson = e.render || ""),
1221
+ (this.showRenderDialogFlag = !0);
526
1222
  },
527
1223
  saveColumnRender: function () {
528
- this.$set(this.currentTableColumn, 'render', this.renderJson), (this.showRenderDialogFlag = !1);
1224
+ this.$set(this.currentTableColumn, "render", this.renderJson),
1225
+ (this.showRenderDialogFlag = !1);
529
1226
  },
530
1227
  closeHandle() {
531
- this.$emit('update:visiable', false);
532
- this.$emit('close');
1228
+ this.$emit("update:visiable", false);
1229
+ this.$emit("close");
533
1230
  },
534
1231
  // 添加同级节点
535
1232
  onAddSibling(row, index) {
536
- console.log('onAddSibling', row, index)
537
- const parentId = row.parentId || null
1233
+ console.log("onAddSibling", row, index);
1234
+ const parentId = row.parentId || null;
538
1235
  // 先判断是不是根节点
539
1236
  if (!parentId) {
540
1237
  // 当前节点直接添加
541
1238
  // 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))
1239
+ let addIndex =
1240
+ this.tableData
1241
+ .filter((item) => !item.parentId)
1242
+ .findIndex((item) => item.columnId == row.columnId) + 1;
1243
+ this.tableData.splice(addIndex, 0, this.generateRow(parentId));
544
1244
  } else {
545
- this.handleAddOneRow(row, index, 'SIBLING')
1245
+ this.handleAddOneRow(row, index, "SIBLING");
546
1246
  }
547
1247
  },
548
1248
  // 添加子节点 todo
549
1249
  onAddChild(row, index) {
550
- this.handleAddOneRow(row, index, 'CHILD')
1250
+ this.handleAddOneRow(row, index, "CHILD");
551
1251
  },
552
1252
  /**
553
1253
  * 处理添加一行数据
@@ -556,46 +1256,49 @@ export default {
556
1256
  * @param {string} type 操作类型 SIBLING 同级 / CHILD 子级
557
1257
  */
558
1258
  handleAddOneRow(row, index, type) {
559
-
560
- const {parentId, columnId} = row
561
- const curId = type === 'SIBLING' ? parentId : columnId
562
- let curRow = {}
1259
+ const { parentId, columnId } = row;
1260
+ const curId = type === "SIBLING" ? parentId : columnId;
1261
+ let curRow = {};
563
1262
  // 在 tableData 中,找到当前节点
564
1263
  const findRow = (data) => {
565
1264
  data.forEach((item) => {
566
1265
  if (item.columnId === curId) {
567
- curRow = item
1266
+ curRow = item;
568
1267
  }
569
1268
  if (item.children && item.children.length) {
570
- findRow(item.children)
1269
+ findRow(item.children);
571
1270
  }
572
- })
573
- }
1271
+ });
1272
+ };
574
1273
 
575
- findRow(this.tableData)
1274
+ findRow(this.tableData);
576
1275
 
577
- const {columnId: generateParentId, children} = curRow
1276
+ const { columnId: generateParentId, children } = curRow;
578
1277
 
579
- let newRow = this.generateRow(generateParentId)
1278
+ let newRow = this.generateRow(generateParentId);
580
1279
  if (children) {
581
- if (type === 'SIBLING') {
582
- let addIndex = children.findIndex(item => item.columnId == row.columnId) + 1;
583
- children.splice(addIndex, 0, newRow)
1280
+ if (type === "SIBLING") {
1281
+ let addIndex =
1282
+ children.findIndex((item) => item.columnId == row.columnId) + 1;
1283
+ children.splice(addIndex, 0, newRow);
584
1284
  } else {
585
- children.push(newRow)
1285
+ children.push(newRow);
586
1286
  }
587
1287
  } else {
588
- this.$set(curRow, 'children', [newRow])
1288
+ this.$set(curRow, "children", [newRow]);
589
1289
  }
590
1290
  },
591
1291
  getUuid() {
592
1292
  return new Date().getTime();
593
1293
  },
1294
+ createRowAuthName(type) {
1295
+ return `row${type}` + generateId();
1296
+ },
594
1297
  /**
595
1298
  * 生成一行数据
596
1299
  */
597
1300
  generateRow(parentId) {
598
- let tmpId = 'column' + generateId();
1301
+ let tmpId = "column" + generateId();
599
1302
  let uuid = this.getUuid();
600
1303
  var row = {
601
1304
  columnId: uuid,
@@ -605,46 +1308,78 @@ export default {
605
1308
  width: 150,
606
1309
  prop: tmpId,
607
1310
  label: tmpId,
608
- align: 'left',
1311
+ align: "left",
609
1312
  show: true,
610
1313
  sortable: true,
611
-
1314
+ filterable: true,
1315
+ exportType: null,
1316
+ footerDataType: null,
1317
+ footerMethodConfg: null,
1318
+ widgetList: [],
1319
+ labelColor: null,
1320
+ rowAddAuthName: this.createRowAuthName("Add"),
1321
+ rowEditAuthName: this.createRowAuthName("Edit"),
1322
+ rowAddShow: null,
1323
+ rowEditShow: null,
1324
+ utcTransformEnabled: false,
1325
+ labelIconClass: null,
1326
+ labelIconPosition: "rear",
1327
+ labelTooltip: null,
612
1328
  // treeNode: false,
613
-
614
1329
  };
615
1330
  return row;
616
1331
  },
1332
+ isUtcTransformColumn(row) {
1333
+ const formatS = row.formatS;
1334
+ if (!formatS) {
1335
+ return true;
1336
+ }
1337
+ return [
1338
+ "d1",
1339
+ "d2",
1340
+ "d3",
1341
+ "d4",
1342
+ "d5",
1343
+ "render",
1344
+ "create_date",
1345
+ "modify_date",
1346
+ ].includes(formatS);
1347
+ },
617
1348
  // 添加根节点
618
1349
  onAddRoot() {
619
- this.tableData.push(this.generateRow())
1350
+ this.tableData.push(this.generateRow());
620
1351
  },
621
1352
  // 删除当前节点及对应子节点数据
622
1353
  onDelete(row) {
623
- const {parentId, columnId} = row
1354
+ const { parentId, columnId } = row;
624
1355
  // 根节点直接删除
625
1356
  if (!parentId) {
626
- const delIndex = this.tableData.findIndex((item) => item.columnId === columnId)
627
- this.tableData.splice(delIndex, 1)
1357
+ const delIndex = this.tableData.findIndex(
1358
+ (item) => item.columnId === columnId
1359
+ );
1360
+ this.tableData.splice(delIndex, 1);
628
1361
  } else {
629
1362
  // 找到父节点,通过父节点删除
630
- let parentRow = {}
1363
+ let parentRow = {};
631
1364
  const findRow = (data) => {
632
1365
  data.forEach((item) => {
633
1366
  if (item.columnId === parentId) {
634
- parentRow = {...item}
1367
+ parentRow = { ...item };
635
1368
  }
636
1369
  if (item.children && item.children.length) {
637
- findRow(item.children)
1370
+ findRow(item.children);
638
1371
  }
639
- })
640
- }
641
- findRow(this.tableData)
1372
+ });
1373
+ };
1374
+ findRow(this.tableData);
642
1375
 
643
- const {children} = parentRow
1376
+ const { children } = parentRow;
644
1377
 
645
- const delIndex = children.findIndex((item) => item.columnId === columnId)
1378
+ const delIndex = children.findIndex(
1379
+ (item) => item.columnId === columnId
1380
+ );
646
1381
 
647
- children.splice(delIndex, 1)
1382
+ children.splice(delIndex, 1);
648
1383
  }
649
1384
  },
650
1385
  // 数据准备 生成 id 和 parentId
@@ -652,30 +1387,34 @@ export default {
652
1387
  const tableFormat = (tableData, parentId) => {
653
1388
  tableData.forEach((item) => {
654
1389
  // item.parentId = parentId || null
655
- if (!item.kid) item.kid = item.columnId
1390
+ if (!item.kid) item.kid = item.columnId;
656
1391
  if (item.children && item.children.length > 0) {
657
- tableFormat(item.children, item.columnId)
1392
+ tableFormat(item.children, item.columnId);
658
1393
  }
659
- })
660
- }
1394
+ });
1395
+ };
661
1396
 
662
- tableFormat(data)
663
- return data
1397
+ tableFormat(data);
1398
+ return data;
664
1399
  },
665
1400
  //drag begin
666
1401
  //行拖拽
667
1402
  rowDrop() {
668
- if (this.dragSort) this.dragSort.destroy() // 防止在Dom上重复绑定事件
1403
+ if (this.dragSort) this.dragSort.destroy(); // 防止在Dom上重复绑定事件
669
1404
  // 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];
1405
+ var tbody = this.$refs.singleTable.$el.querySelectorAll(
1406
+ ".el-table__fixed-body-wrapper > table > tbody"
1407
+ )[0];
671
1408
  const _this = this;
672
1409
  this.dragSort = Sortable.create(tbody, {
673
- ghostClass: 'sortable-ghost',
1410
+ ghostClass: "sortable-ghost",
1411
+ // draggable: ".drag-option", // 修改可拖拽元素
1412
+ handle: ".drag-option", // 指定拖动按钮
674
1413
  setData: function (e) {
675
- e.setData('Text', '');
1414
+ e.setData("Text", "");
676
1415
  },
677
- onEnd({newIndex, oldIndex}) {
678
- _this.rowDropEnd(newIndex, oldIndex)
1416
+ onEnd({ newIndex, oldIndex }) {
1417
+ _this.rowDropEnd(newIndex, oldIndex);
679
1418
  },
680
1419
  });
681
1420
  },
@@ -686,7 +1425,7 @@ export default {
686
1425
  data.forEach((item) => {
687
1426
  const loop = (data) => {
688
1427
  result.push({
689
- ...data
1428
+ ...data,
690
1429
  });
691
1430
  let child = data.children;
692
1431
  if (child) {
@@ -702,7 +1441,9 @@ export default {
702
1441
  //数组转树
703
1442
  arrToTree(arr, parentId) {
704
1443
  return arr
705
- .filter((item) => (!parentId ? !item.parentId : item.parentId === parentId))
1444
+ .filter((item) =>
1445
+ !parentId ? !item.parentId : item.parentId === parentId
1446
+ )
706
1447
  .map((item) => {
707
1448
  item.children = this.arrToTree(arr, item.columnId);
708
1449
  return item;
@@ -740,13 +1481,7 @@ export default {
740
1481
  let newRow = this.tableDataArray[newIndex];
741
1482
 
742
1483
  //判断是否把该行 拖拽到 自己的底级中
743
- if (
744
- this.isTreeBottom(
745
- this.tableData,
746
- oldRow.columnId,
747
- newRow.columnId
748
- )
749
- ) {
1484
+ if (this.isTreeBottom(this.tableData, oldRow.columnId, newRow.columnId)) {
750
1485
  this.$message({
751
1486
  type: "error",
752
1487
  message: "不能放到子节点",
@@ -792,136 +1527,167 @@ export default {
792
1527
  let isButtontCell = false;
793
1528
  let widgetType = this.columnFormatMap[formatS];
794
1529
  if (widgetType) {
795
- isButtontCell = widgetType === 'a-link' || widgetType === 'button';
1530
+ isButtontCell =
1531
+ widgetType === "a-link" ||
1532
+ widgetType === "button" ||
1533
+ widgetType === "dropdown";
796
1534
  }
797
1535
  return isButtontCell;
798
1536
  },
799
1537
  //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;
1538
+ changeFormatS(row, isEdit) {
1539
+ let formatS = isEdit ? row.editFormatS : row.formatS;
1540
+ let isButtontCell = this.getIsButtontCell(formatS);
1541
+ let attachmentPrefix = this.designer.getAttachmentPrefix();
1542
+ let columnSelectedWidget = this.designer.createColumnWidget(row, isEdit);
1543
+ if (!isEdit) {
1544
+ if (columnSelectedWidget) {
1545
+ row.widget = columnSelectedWidget;
818
1546
  } else {
819
- row.width = 47;
1547
+ row.widget = null;
820
1548
  }
821
- row.prop = null;
822
- row.label = null;
823
- row.sortable = false;
1549
+ row.utcTransformEnabled = false;
824
1550
  } 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;
1551
+ if (row.prop && row.prop.startsWith(attachmentPrefix)) {
1552
+ let suffix = row.prop.replace(attachmentPrefix, "");
1553
+ columnSelectedWidget.options.keyName = row.prop;
1554
+ columnSelectedWidget.options.keyNameSuffix = suffix;
1555
+ }
1556
+ if (columnSelectedWidget) {
1557
+ row.editWidget = columnSelectedWidget;
1558
+ } else {
1559
+ row.editWidget = null;
1560
+ }
1561
+ }
830
1562
 
831
- if (row.formatS == 'editAttachment') {
832
- row.prop = this.designer.createAttachmentKeyName();
1563
+ if (!isEdit) {
1564
+ if (row.formatS == "editTreeButtonGroup") {
1565
+ row.prop = null;
1566
+ row.label = null;
1567
+ row.sortable = false;
1568
+ row.width = 150;
1569
+ row.widget = null;
1570
+ } else if (isButtontCell) {
1571
+ if (row.formatS == "dropdown") {
1572
+ row.width = 100;
1573
+ } else if (row.formatS == "aLink" || row.formatS == "button") {
1574
+ if (!row.width || row.width == 47) row.width = 150;
1575
+ } else {
1576
+ row.width = 47;
1577
+ }
1578
+ row.prop = null;
1579
+ row.label = null;
1580
+ row.sortable = false;
833
1581
  } else {
834
- let attachmentPrefix = this.designer.getAttachmentPrefix();
835
- row.prop = row.prop.replaceAll(attachmentPrefix, "");
1582
+ let tmpId = "column" + generateId();
1583
+ if (!row.width || row.width == 47) row.width = 150;
1584
+ if (!row.prop) row.prop = tmpId;
1585
+ if (!row.label) row.label = tmpId;
1586
+
1587
+ if (this.userFields.includes(row.formatS)) {
1588
+ let item = this.businessOptions.find(
1589
+ (item) => item.value == row.formatS
1590
+ );
1591
+ if (item) {
1592
+ row.prop = item.value;
1593
+ row.label = item.label;
1594
+ }
1595
+ }
1596
+
1597
+ row.sortable = true;
1598
+
1599
+ if (!isEdit) {
1600
+ if (formatS == "editAttachment") {
1601
+ row.prop = columnSelectedWidget.options.keyName;
1602
+ } else {
1603
+ row.prop = row.prop.replaceAll(attachmentPrefix, "");
1604
+ }
1605
+ }
836
1606
  }
837
1607
  }
838
1608
  },
839
1609
  getColumnWidgetConfig(row, isChange, isEdit) {
840
- let formatS = isEdit ? row.editFormatS : row.formatS
1610
+ let formatS = isEdit ? row.editFormatS : row.formatS;
841
1611
  let columnSelectedWidget = null;
842
1612
  let columnEditFields = null;
843
1613
 
844
1614
  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
1615
 
854
1616
  if (type) {
855
- // columnSelectedWidget = this.$baseLodash.cloneDeep(this.designer.getFieldWidgetByType(type));
856
- columnSelectedWidget = this.designer.copyNewFieldWidget(this.designer.getFieldWidgetByType(type));
857
- /*let tmpId = generateId();
858
- let idVal = row.prop ? row.prop : (type + tmpId);*/
859
- /*columnSelectedWidget.id = idVal;*/
860
- // columnSelectedWidget.options.name = idVal;
861
- let columnOption;
862
- if (!isEdit) {
863
- columnOption = row.columnOption;
864
- } else {
865
- columnOption = row.editColumnOption;
866
- }
867
- if (!isChange && columnOption && Object.keys(columnOption).length) {
868
- columnOption.required = row.required || false;
869
- 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";
1617
+ const applyNewWidgetDefaults = (widget) => {
1618
+ widget.options.required = row.required || false;
1619
+ if ("editDelete" == formatS) {
1620
+ widget.options.prefixIcon = "el-icon-delete";
1621
+ widget.options.label = "删除";
1622
+ widget.options.labelHidden = true;
1623
+ widget.options.hiddenByWf = true;
1624
+ widget.options.onClick =
1625
+ "let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.deleteRow(tableParam.row,tableParam.rowIndex);";
1626
+ } else if ("editButton" == formatS) {
1627
+ widget.options.prefixIcon = "el-icon-edit";
1628
+ widget.options.label = "查看";
1629
+ widget.options.labelHidden = true;
1630
+ widget.options.onClick =
1631
+ "let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.openEditDialog(tableParam.row)";
1632
+ } else if ("addSiblingEditRow" == formatS) {
1633
+ widget.options.prefixIcon = "el-icon-plus";
1634
+ widget.options.label = "新增兄弟节点";
1635
+ widget.options.labelHidden = false;
1636
+ widget.options.onClick =
1637
+ "let tableParam = this.tableParam;\nthis.getParentTarget().addSiblingTreeRow(null,tableParam);";
1638
+ } else if ("addChildTreeRow" == formatS) {
1639
+ widget.options.prefixIcon = "el-icon-plus";
1640
+ widget.options.label = "新增子节点";
1641
+ widget.options.labelHidden = false;
1642
+ widget.options.onClick =
1643
+ "let tableParam = this.tableParam;\nthis.getParentTarget().addChildTreeRow(null,tableParam);";
1644
+ } else if ("moveUpRow" == formatS) {
1645
+ widget.options.label = "↑上移";
1646
+ widget.options.labelHidden = false;
1647
+ widget.options.onClick =
1648
+ "let tableParam = this.tableParam;\nthis.getParentTarget().moveUpRow(tableParam);";
1649
+ } else if ("moveDownRow" == formatS) {
1650
+ widget.options.label = "↓下移";
1651
+ widget.options.labelHidden = false;
1652
+ widget.options.onClick =
1653
+ "let tableParam = this.tableParam;\nthis.getParentTarget().moveDownRow(tableParam);";
1654
+ } else if ("removeTreeRow" == formatS) {
1655
+ widget.options.prefixIcon = "el-icon-delete";
1656
+ widget.options.label = "删除";
1657
+ widget.options.labelHidden = true;
1658
+ widget.options.onClick =
1659
+ "let tableParam = this.tableParam;\nthis.getParentTarget().removeTreeRow(tableParam);";
875
1660
  }
876
- } else {
877
- columnSelectedWidget.options.required = row.required || false;
1661
+ };
878
1662
 
879
- if ('editDelete' == formatS) {
880
- columnSelectedWidget.options.prefixIcon = "el-icon-delete";
881
- columnSelectedWidget.options.label = "删除";
882
- columnSelectedWidget.options.labelHidden = true;
883
- 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) {
886
- columnSelectedWidget.options.prefixIcon = "el-icon-edit";
887
- columnSelectedWidget.options.label = "查看";
888
- 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) {
891
- columnSelectedWidget.options.prefixIcon = "el-icon-plus";
892
- columnSelectedWidget.options.label = "新增兄弟节点";
893
- columnSelectedWidget.options.labelHidden = false;
894
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().addSiblingTreeRow(null,tableParam);";
895
- } else if ('addChildTreeRow' == formatS) {
896
- columnSelectedWidget.options.prefixIcon = "el-icon-plus";
897
- columnSelectedWidget.options.label = "新增子节点";
898
- columnSelectedWidget.options.labelHidden = false;
899
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().addChildTreeRow(null,tableParam);";
900
- } else if ('moveUpRow' == formatS) {
901
- // columnSelectedWidget.options.prefixIcon = "el-icon-plus";
902
- columnSelectedWidget.options.label = "↑上移";
903
- columnSelectedWidget.options.labelHidden = false;
904
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().moveUpRow(tableParam);";
905
- } else if ('moveDownRow' == formatS) {
906
- // columnSelectedWidget.options.prefixIcon = "el-icon-plus";
907
- columnSelectedWidget.options.label = "↓下移";
908
- columnSelectedWidget.options.labelHidden = false;
909
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().moveDownRow(tableParam);";
910
- } else if ('removeTreeRow' == formatS) {
911
- columnSelectedWidget.options.prefixIcon = "el-icon-delete";
912
- columnSelectedWidget.options.label = "删除";
913
- columnSelectedWidget.options.labelHidden = true;
914
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().removeTreeRow(tableParam);";
1663
+ if (!isChange) {
1664
+ const sourceWidget = this.designer.getColumnWidget(row, isEdit);
1665
+ if (sourceWidget) {
1666
+ columnSelectedWidget = this.$baseLodash.cloneDeep(sourceWidget);
1667
+ columnSelectedWidget.options.required = row.required || false;
1668
+ if ("editDelete" == formatS) {
1669
+ columnSelectedWidget.options.hiddenByWf =
1670
+ columnSelectedWidget.options.hiddenByWf ?? true;
1671
+ columnSelectedWidget.options.prefixIcon =
1672
+ columnSelectedWidget.options.prefixIcon || "el-icon-delete";
1673
+ } else if ("editButton" == formatS) {
1674
+ columnSelectedWidget.options.prefixIcon =
1675
+ columnSelectedWidget.options.prefixIcon || "el-icon-edit";
1676
+ }
1677
+ } else {
1678
+ columnSelectedWidget = this.designer.copyNewFieldWidget(
1679
+ this.designer.getFieldWidgetByType(type)
1680
+ );
1681
+ applyNewWidgetDefaults(columnSelectedWidget);
915
1682
  }
916
-
917
- columnOption = columnSelectedWidget.options;
918
-
1683
+ } else {
1684
+ columnSelectedWidget = this.designer.copyNewFieldWidget(
1685
+ this.designer.getFieldWidgetByType(type)
1686
+ );
1687
+ applyNewWidgetDefaults(columnSelectedWidget);
919
1688
  }
920
1689
 
921
- // columnSelectedWidget.options.name = isEdit? (type + row.columnId) : row.prop;
922
- // columnSelectedWidget.options.name = type + row.columnId;
923
- // columnSelectedWidget.options.name = row.prop;
924
- if (columnSelectedWidget.options.hasOwnProperty('keyName')) {
1690
+ if (columnSelectedWidget.options.hasOwnProperty("keyName")) {
925
1691
  columnSelectedWidget.options.keyName = row.prop;
926
1692
  columnSelectedWidget.options.keyNameEnabled = true;
927
1693
  } else {
@@ -933,122 +1699,317 @@ export default {
933
1699
  columnSelectedWidget.options.labelHidden = true;
934
1700
  }
935
1701
  }
936
- return {columnSelectedWidget, columnEditFields};
1702
+ return { columnSelectedWidget, columnEditFields };
1703
+ },
1704
+ findColumnByColumnId(columnList, columnId) {
1705
+ let result = null;
1706
+ if (columnList) {
1707
+ let column = columnList.find((item) => item.columnId == columnId);
1708
+ for (let column of columnList) {
1709
+ if (column.columnId == columnId) {
1710
+ result = column;
1711
+ break;
1712
+ } else if (column.children && column.children.length) {
1713
+ let subColumn = this.findColumnByColumnId(
1714
+ column.children,
1715
+ children
1716
+ );
1717
+ if (subColumn) {
1718
+ result = subColumn;
1719
+ break;
1720
+ }
1721
+ }
1722
+ }
1723
+ }
1724
+ return result;
1725
+ },
1726
+
1727
+ getRowWidget(row) {
1728
+ let widget = row.widget;
1729
+ if (!widget) {
1730
+ widget.options.a = a;
1731
+ widget.options.a = a;
1732
+ }
1733
+ return widget;
1734
+ },
1735
+ confirmEditTreeButtonGroupConfig(rowConfig) {
1736
+ if (this.currentEditTreeButtonGroupRow) {
1737
+ Object.assign(this.currentEditTreeButtonGroupRow, rowConfig);
1738
+ }
1739
+ this.currentEditTreeButtonGroupRow = null;
1740
+ this.editTreeButtonGroupRowData = null;
937
1741
  },
938
1742
  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 = {};
1743
+ if (row.formatS === "editTreeButtonGroup") {
1744
+ this.currentEditTreeButtonGroupRow = row;
1745
+ this.editTreeButtonGroupRowData = this.$baseLodash.cloneDeep(row);
1746
+ this.showEditTreeButtonGroupConfigDialog = true;
1747
+ return;
949
1748
  }
1749
+ if (row.formatS == "widgetRender") {
1750
+ let formWidgetList = deepClone(this.designer.widgetList);
1751
+ const widgetMap = this.buildColumnWidgetMap(
1752
+ this.sourceTableColumnsSnapshot || this.optionModel.tableColumns || []
1753
+ );
1754
+ let tableData = this.restoreColumnWidgetRefs(
1755
+ this.cloneTableColumnsForEdit(this.tableData),
1756
+ widgetMap
1757
+ );
1758
+ let columnId = row.columnId;
950
1759
 
951
- let columnOption = this.$baseLodash.cloneDeep(option);
952
- row.columnOption = columnOption;
953
- this.operateIndex = index;
1760
+ let dataTableName = this.optionModel.name;
1761
+
1762
+ let targetColumn = null;
1763
+ loopHandleWidget(formWidgetList, (item) => {
1764
+ if (item.options.name == dataTableName) {
1765
+ item.options.tableColumns = tableData;
1766
+ targetColumn = this.findColumnByColumnId(
1767
+ item.options.tableColumns,
1768
+ columnId
1769
+ );
1770
+ }
1771
+ });
1772
+ let getWidgetList = (subWidgetList = []) => {
1773
+ targetColumn.widgetList = this.$baseLodash.cloneDeep(subWidgetList);
1774
+ return formWidgetList;
1775
+ };
1776
+ let sourceData = {
1777
+ formWidgetList,
1778
+ dataTableName,
1779
+ columnId,
1780
+ getWidgetList,
1781
+ };
1782
+
1783
+ this.openWidgetRenderDialog(row, sourceData);
1784
+ return;
1785
+ }
954
1786
 
1787
+ const { columnSelectedWidget, columnEditFields } =
1788
+ this.getColumnWidgetConfig(row);
1789
+ if (!columnSelectedWidget) {
1790
+ this.$message.warning(this.$t1("请先选择列格式化类型"));
1791
+ return;
1792
+ }
1793
+ columnSelectedWidget.options = this.$baseLodash.cloneDeep(
1794
+ columnSelectedWidget.options
1795
+ );
1796
+ this.operateIndex = index;
955
1797
  this.openWidgetPropertyDialog({
956
1798
  row: row,
957
- columnSelectedWidget: selectedWidget,
1799
+ columnSelectedWidget,
1800
+ tableColumns: this.tableData,
958
1801
  index: index,
959
- columnEditFields: columnEditFields,
960
- callback: (columnOption) => {
961
- this.confirmFormatConfigDialog(columnOption);
962
- }
963
- })
1802
+ columnEditFields,
1803
+ callback: (confirmedWidget) => {
1804
+ this.confirmFormatConfigDialog(confirmedWidget, row);
1805
+ },
1806
+ });
964
1807
  },
965
1808
  getFieldKeyNameByOptions(options) {
966
1809
  let o = options.name;
967
- return (
968
- (options.keyNameEnabled
969
- && options.keyName)
970
- || o
971
- );
1810
+ return (options.keyNameEnabled && options.keyName) || o;
972
1811
  },
973
- confirmFormatConfigDialog(columnOption) {
974
- let row = this.tableData[this.operateIndex];
975
- row.columnOption = columnOption;
1812
+ confirmFormatConfigDialog(columnSelectedWidget, row) {
1813
+ row.widget = columnSelectedWidget;
1814
+ const options = columnSelectedWidget.options;
1815
+
976
1816
  let isButtontCell = this.getIsButtontCell(row.formatS);
977
1817
  if (!isButtontCell) {
978
- row.prop = this.getFieldKeyNameByOptions(columnOption);
979
- row.label = columnOption.label;
980
- row.required = columnOption.required;
1818
+ row.prop = this.getFieldKeyNameByOptions(options);
1819
+ row.label = options.label;
1820
+ row.required = options.required;
981
1821
  }
982
1822
  },
983
1823
  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 = {};
1824
+ const { columnSelectedWidget, columnEditFields } =
1825
+ this.getColumnWidgetConfig(row, false, true);
1826
+ if (!columnSelectedWidget) {
1827
+ this.$message.warning(this.$t1("请先选择编辑列格式化类型"));
1828
+ return;
994
1829
  }
995
-
996
- let columnOption = this.$baseLodash.cloneDeep(option);
997
- row.editColumnOption = columnOption;
1830
+ columnSelectedWidget.options = this.$baseLodash.cloneDeep(
1831
+ columnSelectedWidget.options
1832
+ );
998
1833
  this.operateIndex = index;
999
-
1000
1834
  this.openWidgetPropertyDialog({
1001
1835
  row: row,
1002
- columnSelectedWidget: selectedWidget,
1836
+ tableColumns: this.tableData,
1837
+ columnSelectedWidget,
1003
1838
  index: index,
1004
- columnEditFields: columnEditFields,
1005
- callback: (columnOption) => {
1006
- this.confirmEditFormatConfigDialog(columnOption);
1007
- }
1008
- })
1839
+ columnEditFields,
1840
+ callback: (confirmedWidget) => {
1841
+ this.confirmEditFormatConfigDialog(confirmedWidget, row);
1842
+ },
1843
+ });
1009
1844
  },
1010
- confirmEditFormatConfigDialog(columnOption) {
1011
- let row = this.tableData[this.operateIndex];
1012
- row.editColumnOption = columnOption;
1013
- /*row.prop = columnOption.name;
1014
- row.label = columnOption.label;
1015
- row.required = columnOption.required;*/
1845
+ confirmEditFormatConfigDialog(columnSelectedWidget, row) {
1846
+ row.editWidget = columnSelectedWidget;
1016
1847
  },
1017
1848
  openTableColumnConfigDialog(row, index) {
1018
1849
  this.operateIndex = index;
1850
+ this.currentTableColumn = row;
1019
1851
  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 || '');
1852
+ let eventParams = ["dataId", "formCode"];
1853
+ this.tableColumnConfigHeader = `${
1854
+ this.optionModel.name
1855
+ }.${eventName}(${eventParams.join(", ")}) {`;
1856
+ this.tableColumnConfigCode = this.$baseLodash.cloneDeep(
1857
+ row.tableColumnConfig || ""
1858
+ );
1023
1859
 
1024
1860
  this.tableColumnConfigTitle = `自定义表格列属性配置(${row.label})`;
1025
1861
  this.showTableColumnConfigDialog = true;
1026
1862
  },
1027
1863
  saveTableColumnConfigDialog() {
1028
- let row = this.tableData[this.operateIndex];
1864
+ let row = this.currentTableColumn;
1029
1865
  const codeHints = this.$refs.ecEditor.getEditorAnnotations();
1030
1866
  let syntaxErrorFlag = false;
1031
1867
  if (!!codeHints && codeHints.length > 0) {
1032
- codeHints.forEach(chItem => {
1033
- if (chItem.type === 'error') {
1868
+ codeHints.forEach((chItem) => {
1869
+ if (chItem.type === "error") {
1034
1870
  syntaxErrorFlag = true;
1035
1871
  }
1036
1872
  });
1037
1873
 
1038
1874
  if (syntaxErrorFlag) {
1039
- this.$message.error(this.i18nt('designer.setting.syntaxCheckWarning'));
1875
+ this.$message.error(
1876
+ this.i18nt("designer.setting.syntaxCheckWarning")
1877
+ );
1040
1878
  return;
1041
1879
  }
1042
1880
  }
1043
- this.$set(row, 'tableColumnConfig', this.$baseLodash.cloneDeep(this.tableColumnConfigCode))
1881
+ this.$set(
1882
+ row,
1883
+ "tableColumnConfig",
1884
+ this.$baseLodash.cloneDeep(this.tableColumnConfigCode)
1885
+ );
1044
1886
  this.showTableColumnConfigDialog = false;
1887
+ },
1888
+ changeRowLabel(row) {
1889
+ this.setRowWidgetAttars(row, "label", row.label);
1890
+ },
1891
+ changeRowProp(row) {
1892
+ this.setRowWidgetAttars(row, "keyName", row.prop);
1893
+ },
1894
+ changeRowRequired(row) {
1895
+ this.setRowWidgetAttars(row, "required", row.required);
1896
+ },
1897
+ setRowWidgetAttars(row, key, value) {
1898
+ let type1 = this.columnFormatMap[row.formatS];
1899
+ let type2 = this.columnFormatMap[row.editFormatS];
1900
+ let newWidget = type1
1901
+ ? this.designer.copyNewFieldWidget(
1902
+ this.designer.getFieldWidgetByType(type1)
1903
+ )
1904
+ : null;
1045
1905
 
1906
+ let newEditWidget = type2
1907
+ ? this.designer.copyNewFieldWidget(
1908
+ this.designer.getFieldWidgetByType(type2)
1909
+ )
1910
+ : null;
1911
+
1912
+ if (newWidget && newWidget.formItemFlag && row.widget) {
1913
+ if (row.widget.options[key] !== undefined) {
1914
+ row.widget.options[key] = value;
1915
+ }
1916
+ }
1917
+
1918
+ if (newEditWidget && newEditWidget.formItemFlag && row.editWidget) {
1919
+ if (row.editWidget.options[key] !== undefined) {
1920
+ row.editWidget.options[key] = value;
1921
+ }
1922
+ }
1046
1923
  },
1047
- }
1048
- }
1924
+ openRowEditDialog(row, index) {
1925
+ this.editRowData = row;
1926
+ this.rowData = this.cloneTableColumnsForEdit([row])[0];
1927
+ this.rowDataIndex = index;
1928
+ this.showRowEditDialog = true;
1929
+ },
1930
+ submitRowEditDialog() {
1931
+ Object.assign(this.editRowData, this.rowData);
1932
+ if (this.rowData.widget) {
1933
+ this.editRowData.widget = this.rowData.widget;
1934
+ }
1935
+ if (this.rowData.editWidget) {
1936
+ this.editRowData.editWidget = this.rowData.editWidget;
1937
+ }
1938
+ if (this.rowData.widgetList && this.rowData.widgetList.length) {
1939
+ this.editRowData.widgetList = this.rowData.widgetList;
1940
+ }
1941
+ this.showRowEditDialog = false;
1942
+ },
1943
+ closeRowEditDialog() {
1944
+ this.showRowEditDialog = false;
1945
+ },
1946
+ },
1947
+ };
1049
1948
  </script>
1050
1949
  <style scoped lang="scss">
1051
1950
  .icon-drag:before {
1052
- content: '\e61d';
1951
+ content: "\e61d";
1952
+ }
1953
+
1954
+ /* 固定弹框内容区高度,避免加载前后抖动 */
1955
+ ::v-deep .table-column-config-dialog.el-dialog {
1956
+ .el-dialog__body {
1957
+ height: 532px;
1958
+ max-height: 532px;
1959
+ overflow: hidden;
1960
+ box-sizing: border-box;
1961
+ }
1962
+ }
1963
+
1964
+ .table-column-dialog-cont {
1965
+ height: 516px;
1966
+ min-height: 516px;
1967
+ max-height: 516px;
1968
+ overflow: hidden;
1969
+ box-sizing: border-box;
1970
+ }
1971
+
1972
+ /* 完整列配置弹框:挂到 body,内容区可滚动 */
1973
+ ::v-deep .table-column-row-edit-dialog.el-dialog {
1974
+ .el-dialog__body {
1975
+ max-height: calc(90vh - 130px);
1976
+ overflow-y: auto;
1977
+ overflow-x: hidden;
1978
+ box-sizing: border-box;
1979
+
1980
+ .cont.table-column-row-edit-cont {
1981
+ overflow: visible;
1982
+ max-height: none;
1983
+ padding-bottom: 12px;
1984
+ }
1985
+
1986
+ .form-m2 {
1987
+ height: auto !important;
1988
+ overflow: visible !important;
1989
+
1990
+ .el-form-item.form-item-full:last-child {
1991
+ margin-bottom: 8px;
1992
+ }
1993
+ }
1994
+ }
1995
+ }
1996
+
1997
+ .table-column-row-edit-cont {
1998
+ box-sizing: border-box;
1999
+
2000
+ ::v-deep .form-m2 {
2001
+ .form-item-full {
2002
+ width: calc(100% - 20px) !important;
2003
+ display: block;
2004
+ }
2005
+
2006
+ .form-item-full .el-input {
2007
+ width: 100% !important;
2008
+ }
2009
+ }
2010
+
2011
+ ::v-deep .custom-divider.el-divider--horizontal {
2012
+ margin: 10px 0;
2013
+ }
1053
2014
  }
1054
2015
  </style>