cloud-web-corejs 1.0.54-dev.68 → 1.0.54-dev.680

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