cloud-web-corejs 1.0.54-dev.71 → 1.0.54-dev.710

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