cloud-web-corejs 1.0.54-dev.52 → 1.0.54-dev.521

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 (408) hide show
  1. package/package.json +14 -3
  2. package/src/App.vue +30 -34
  3. package/src/api/user.js +16 -0
  4. package/src/components/Qrcode/fileParse.vue +0 -1
  5. package/src/components/Tinymce/index.vue +112 -71
  6. package/src/components/VabUpload/image-viewer.vue +2 -2
  7. package/src/components/VabUpload/index.js +2 -1
  8. package/src/components/VabUpload/mixins.js +2 -2
  9. package/src/components/VabUpload/privateProfileDialogMixins.js +1 -1063
  10. package/src/components/VabUpload/propertiesDialog.vue +1 -1
  11. package/src/components/VabUpload/view.vue +209 -120
  12. package/src/components/advancedSearchDialog/mixins.js +1 -1
  13. package/src/components/base-textarea/index.vue +104 -0
  14. package/src/components/baseAlert/mixins.js +1 -1
  15. package/src/components/baseAttachment/index.vue +49 -40
  16. package/src/components/baseAttachment/mixins.js +2 -1
  17. package/src/components/baseInputExport/index.vue +19 -12
  18. package/src/components/baseInputExport/mixins.js +1 -1
  19. package/src/components/baseTabs/mixins.js +1 -1
  20. package/src/components/code-editor/index.vue +102 -63
  21. package/src/components/confirmDialog/index.vue +24 -17
  22. package/src/components/confirmDialog/mixins.js +1 -1
  23. package/src/components/errorMsg/index.vue +42 -34
  24. package/src/components/errorMsg/mixins.js +6 -5
  25. package/src/components/excelExport/button.vue +57 -4
  26. package/src/components/excelExport/index.js +6 -6
  27. package/src/components/excelExport/index.vue +56 -2
  28. package/src/components/excelExport/mixins.js +3 -2
  29. package/src/components/excelImport/mixins.js +2 -1
  30. package/src/components/fileLibrary/fileObjAuthDialog.vue +179 -89
  31. package/src/components/fileLibrary/fileObjAuthEditDialog.vue +6 -0
  32. package/src/components/fileLibrary/filterDialog.vue +454 -0
  33. package/src/components/fileLibrary/index.vue +594 -254
  34. package/src/components/fileLibrary/mixins/categoryMoveDialogMixins.js +1 -1
  35. package/src/components/fileLibrary/mixins/fileCategoryDialogMixins.js +1 -1
  36. package/src/components/fileLibrary/mixins/fileHistoryDialogMixins.js +2 -2
  37. package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +339 -211
  38. package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +31 -27
  39. package/src/components/fileLibrary/mixins/fileObjAuthEditMixin.js +4 -4
  40. package/src/components/fileLibrary/mixins/indexMixins.js +220 -101
  41. package/src/components/fileLibrary/mixins/propertiesDialogMixins.js +64 -4
  42. package/src/components/fileLibrary/mixins/recycleBinDialogMixins.js +3 -3
  43. package/src/components/fileLibrary/propertiesDialog.vue +113 -74
  44. package/src/components/fileLibrary/shareDialog.vue +1 -1
  45. package/src/components/formOplog/mixins.js +1 -1
  46. package/src/components/jsonImport/index.js +1 -1
  47. package/src/components/jsonImport/mixins.js +2 -1
  48. package/src/components/langImport/mixins.js +17 -16
  49. package/src/components/obsUpload/index.js +1 -0
  50. package/src/components/obsUpload/index.vue +231 -0
  51. package/src/components/obsUpload/mixins.js +8 -0
  52. package/src/components/scriptDescription/button.vue +12 -4
  53. package/src/components/scriptTest/mixins.js +1 -1
  54. package/src/components/statusTag/mixins.js +1 -1
  55. package/src/components/table/CellSlot.vue +1 -0
  56. package/src/components/table/index.js +12 -11
  57. package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js +11028 -0
  58. package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css +200 -0
  59. package/src/components/table/tableForm.vue +99 -63
  60. package/src/components/table/tableFormMixin.js +1 -1
  61. package/src/components/table/util/index.js +328 -0
  62. package/src/components/table/vxeFilter/mixin.js +6 -6
  63. package/src/components/tempStorage/index.vue +76 -55
  64. package/src/components/tempStorage/tempStorageDialog.vue +179 -54
  65. package/src/components/vb-tabs/x-tabs.vue +56 -30
  66. package/src/components/wf/addOpinionButton.vue +57 -0
  67. package/src/components/wf/content.vue +834 -362
  68. package/src/components/wf/mixins/addOpinionButton.js +3 -0
  69. package/src/components/wf/mixins/setCandidateButton.js +6 -0
  70. package/src/components/wf/mixins/setCandidateDialog.js +2 -1
  71. package/src/components/wf/mixins/setCandidateDialog2.js +6 -0
  72. package/src/components/wf/mixins/wfFlowEleScriptDialog.js +3 -0
  73. package/src/components/wf/mixins/wfTaskUserRangeDialog.js +3 -0
  74. package/src/components/wf/setCandidateButton.vue +40 -0
  75. package/src/components/wf/setCandidateDialog.vue +10 -0
  76. package/src/components/wf/setCandidateDialog2.vue +105 -0
  77. package/src/components/wf/wf.js +2156 -1
  78. package/src/components/wf/wfFlowEleScriptDialog.vue +89 -0
  79. package/src/components/wf/wfStartDialog.vue +66 -42
  80. package/src/components/wf/wfTaskUserRangeDialog.vue +65 -0
  81. package/src/components/wf/wfUtil.js +279 -1
  82. package/src/components/xform/form-designer/designer.js +5 -3
  83. package/src/components/xform/form-designer/form-widget/components/gantt/index.vue +434 -0
  84. package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +3 -3
  85. package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +9 -8
  86. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +4 -1
  87. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +3 -3
  88. package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog copy.vue +971 -0
  89. package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog.vue +971 -0
  90. package/src/components/xform/form-designer/form-widget/dialog/exportDialog.vue +13 -0
  91. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +301 -0
  92. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +82 -49
  93. package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +5 -1
  94. package/src/components/xform/form-designer/form-widget/dialog/formulaDialog.vue +799 -0
  95. package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +38 -7
  96. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin - /345/211/257/346/234/254.js" +1639 -0
  97. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +9 -8
  98. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +133 -72
  99. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +2 -2
  100. package/src/components/xform/form-designer/form-widget/field-widget/a-text-widget.vue +1 -1
  101. package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +34 -5
  102. package/src/components/xform/form-designer/form-widget/field-widget/button-widget.vue +1 -1
  103. package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +19 -1
  104. package/src/components/xform/form-designer/form-widget/field-widget/census-widget.vue +40 -28
  105. package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +18 -7
  106. package/src/components/xform/form-designer/form-widget/field-widget/color-widget.vue +4 -1
  107. package/src/components/xform/form-designer/form-widget/field-widget/copy_button-widget.vue +89 -0
  108. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +14 -2
  109. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +30 -4
  110. package/src/components/xform/form-designer/form-widget/field-widget/download-button-widget.vue +133 -0
  111. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-item-widget.vue +77 -0
  112. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +106 -0
  113. package/src/components/xform/form-designer/form-widget/field-widget/echart-bar-widget.vue +1 -1
  114. package/src/components/xform/form-designer/form-widget/field-widget/echart-category-widget.vue +1 -1
  115. package/src/components/xform/form-designer/form-widget/field-widget/echart-pie-widget.vue +1 -1
  116. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +25 -16
  117. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +705 -379
  118. package/src/components/xform/form-designer/form-widget/field-widget/gantt-widget.vue +964 -0
  119. package/src/components/xform/form-designer/form-widget/field-widget/html-text-widget.vue +6 -2
  120. package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +22 -11
  121. package/src/components/xform/form-designer/form-widget/field-widget/import2-button-widget.vue +90 -0
  122. package/src/components/xform/form-designer/form-widget/field-widget/input-widget.vue +7 -2
  123. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +49 -8
  124. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +61 -88
  125. package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js +13 -0
  126. package/src/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin.js +179 -0
  127. package/src/components/xform/form-designer/form-widget/field-widget/multiSearch-widget.vue +53 -0
  128. package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +114 -81
  129. package/src/components/xform/form-designer/form-widget/field-widget/oplog-widget.vue +186 -0
  130. package/src/components/xform/form-designer/form-widget/field-widget/print-button-widget.vue +44 -27
  131. package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +116 -0
  132. package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +154 -47
  133. package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +26 -6
  134. package/src/components/xform/form-designer/form-widget/field-widget/search_button-widget.vue +2 -2
  135. package/src/components/xform/form-designer/form-widget/field-widget/select-export-button-widget.vue +86 -0
  136. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +24 -9
  137. package/src/components/xform/form-designer/form-widget/field-widget/singerSearch-widget.vue +53 -0
  138. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +145 -0
  139. package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +12 -1
  140. package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +31 -17
  141. package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +7 -2
  142. package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +99 -0
  143. package/src/components/xform/form-designer/form-widget/field-widget/tempStorage-widget.vue +147 -0
  144. package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +106 -33
  145. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +2 -2
  146. package/src/components/xform/form-designer/form-widget/field-widget/vabSearch-widget.vue +3 -171
  147. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +260 -58
  148. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +753 -0
  149. package/src/components/xform/form-designer/indexMixin.js +3 -772
  150. package/src/components/xform/form-designer/setting-panel/form-setting.vue +977 -169
  151. package/src/components/xform/form-designer/setting-panel/index.vue +4 -0
  152. package/src/components/xform/form-designer/setting-panel/indexMixin.js +1 -1
  153. package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +537 -302
  154. package/src/components/xform/form-designer/setting-panel/property-editor/a-link-editor.vue +4 -4
  155. package/src/components/xform/form-designer/setting-panel/property-editor/a-text-editor.vue +3 -3
  156. package/src/components/xform/form-designer/setting-panel/property-editor/autoValueEnabled-editor.vue +38 -0
  157. package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +6 -0
  158. package/src/components/xform/form-designer/setting-panel/property-editor/colorClass-editor.vue +28 -0
  159. package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +41 -0
  160. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +125 -0
  161. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +946 -1042
  162. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/onCheckboxChange-editor.vue +1 -1
  163. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +1127 -512
  164. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +2 -2
  165. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-pane/detail-pane-editor.vue +3 -3
  166. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
  167. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
  168. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
  169. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +0 -8
  170. package/src/components/xform/form-designer/setting-panel/property-editor/container-tree/tree-customClass-editor.vue +31 -2
  171. package/src/components/xform/form-designer/setting-panel/property-editor/copyButton-editor.vue +36 -0
  172. package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +32 -0
  173. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin.js +2 -2
  174. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onAfterConfirmFile-editor.vue +32 -0
  175. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +14 -7
  176. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindEvent-editor.vue +35 -20
  177. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +64 -5
  178. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +27 -0
  179. package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-item-editor.vue +21 -0
  180. package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -0
  181. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +185 -69
  182. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +188 -86
  183. package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +84 -39
  184. package/src/components/xform/form-designer/setting-panel/property-editor/field-gantt/gantt-editor.vue +36 -0
  185. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +77 -20
  186. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -0
  187. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +44 -15
  188. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +115 -0
  189. package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
  190. package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +67 -41
  191. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-button-editor.vue +56 -0
  192. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +26 -7
  193. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +13 -1
  194. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +33 -1
  195. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +66 -0
  196. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +89 -19
  197. package/src/components/xform/form-designer/setting-panel/property-editor/formatType-editor.vue +137 -0
  198. package/src/components/xform/form-designer/setting-panel/property-editor/formula-editor.vue +721 -466
  199. package/src/components/xform/form-designer/setting-panel/property-editor/labelColor-editor.vue +20 -11
  200. package/src/components/xform/form-designer/setting-panel/property-editor/labelIconClass-editor.vue +1 -1
  201. package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +1 -1
  202. package/src/components/xform/form-designer/setting-panel/property-editor/labelTooltip-editor.vue +1 -1
  203. package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
  204. package/src/components/xform/form-designer/setting-panel/property-editor/multiple-editor.vue +19 -14
  205. package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
  206. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +124 -50
  207. package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +31 -0
  208. package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +1 -1
  209. package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +349 -0
  210. package/src/components/xform/form-designer/setting-panel/property-editor/required-editor.vue +10 -6
  211. package/src/components/xform/form-designer/setting-panel/property-editor/requiredHint-editor.vue +3 -3
  212. package/src/components/xform/form-designer/setting-panel/property-editor/showRuleFlag-editor.vue +1 -1
  213. package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue +42 -0
  214. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +305 -19
  215. package/src/components/xform/form-designer/setting-panel/property-editor/validation-editor.vue +2 -2
  216. package/src/components/xform/form-designer/setting-panel/property-editor/validationHint-editor.vue +2 -2
  217. package/src/components/xform/form-designer/setting-panel/property-editor/wfFlag-editor.vue +372 -50
  218. package/src/components/xform/form-designer/setting-panel/property-editor/widgetShowRuleFlag-editor.vue +263 -0
  219. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +33 -11
  220. package/src/components/xform/form-designer/toolbar-panel/index.vue +12 -11
  221. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +1 -1
  222. package/src/components/xform/form-designer/widget-panel/index.vue +21 -1
  223. package/src/components/xform/form-designer/widget-panel/indexMixin.js +19 -18
  224. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1657 -869
  225. package/src/components/xform/form-render/container-item/containerItemMixin.js +12 -11
  226. package/src/components/xform/form-render/container-item/data-table-item.vue +194 -199
  227. package/src/components/xform/form-render/container-item/data-table-mixin.js +22 -18
  228. package/src/components/xform/form-render/container-item/detail-pane-item.vue +17 -3
  229. package/src/components/xform/form-render/container-item/grid-col-item.vue +10 -3
  230. package/src/components/xform/form-render/container-item/grid-item.vue +1 -1
  231. package/src/components/xform/form-render/container-item/list-h5-item.vue +1 -9
  232. package/src/components/xform/form-render/container-item/list-h5-item2.vue +1 -8
  233. package/src/components/xform/form-render/container-item/tab-item.vue +62 -25
  234. package/src/components/xform/form-render/container-item/table-cell-item.vue +38 -32
  235. package/src/components/xform/form-render/container-item/table-item.vue +4 -2
  236. package/src/components/xform/form-render/container-item/table2-cell-item.vue +53 -34
  237. package/src/components/xform/form-render/container-item/table2-item.vue +141 -88
  238. package/src/components/xform/form-render/container-item/tree-item.vue +32 -11
  239. package/src/components/xform/form-render/index.vue +77 -20
  240. package/src/components/xform/form-render/indexMixin copy.js +3462 -0
  241. package/src/components/xform/form-render/indexMixin.js +3517 -12
  242. package/src/components/xform/lang/zh-CN.js +27 -4
  243. package/src/components/xform/mixins/defaultHandle.js +1 -1
  244. package/src/components/xform/mixins/scriptHttp.js +3 -1
  245. package/src/components/xform/utils/emitter.js +4 -4
  246. package/src/components/xform/utils/format.js +35 -34
  247. package/src/components/xform/utils/formula-util.js +966 -0
  248. package/src/components/xform/utils/util.js +1 -1
  249. package/src/components/xform/utils/validators.js +1 -5
  250. package/src/components/xform/utils/vue2js-generator.js +2 -2
  251. package/src/index.js +215 -190
  252. package/src/lang/index.js +56 -51
  253. package/src/lang/locale/en/login.js +20 -0
  254. package/src/lang/locale/zh/login.js +20 -0
  255. package/src/layout/components/AppMain.vue +5 -1
  256. package/src/layout/components/Sidebar/default.vue +1423 -1222
  257. package/src/layout/components/TagsView/index.vue +37 -12
  258. package/src/layout/components/createCompany/createCompanyDialog.vue +157 -0
  259. package/src/layout/components/extractedCode/createDialog.vue +92 -0
  260. package/src/layout/components/extractedCode/queryDialog.vue +96 -0
  261. package/src/layout/components/extractedCode/viewDialog.vue +193 -0
  262. package/src/layout/components/watermark/index.vue +83 -0
  263. package/src/layout/defaultLayout.vue +1 -1
  264. package/src/layout/index.vue +3 -5
  265. package/src/mixins/selectDialog/index.js +1 -1
  266. package/src/mixins/table/index.js +151 -0
  267. package/src/mixins/tableTree/index.js +1 -1
  268. package/src/permission.js +1 -18
  269. package/src/router/modules/customer.js +89 -8
  270. package/src/store/config/index.js +1 -1
  271. package/src/store/getters.js +3 -1
  272. package/src/store/modules/permission.js +1 -1
  273. package/src/store/modules/settings.js +1 -1
  274. package/src/store/modules/tagsView.js +1 -14
  275. package/src/store/modules/user.js +1 -29
  276. package/src/utils/index.js +1 -7
  277. package/src/utils/pddLog.js +103 -0
  278. package/src/utils/pdfUtil.js +71 -0
  279. package/src/utils/request.js +1 -1
  280. package/src/utils/vab.js +19 -27
  281. package/src/views/bd/setting/bd_attach_setting/edit.vue +5 -5
  282. package/src/views/bd/setting/bd_attach_setting/list.vue +28 -55
  283. package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +4 -5
  284. package/src/views/bd/setting/bd_attach_setting/mixins/list.js +239 -1
  285. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -0
  286. package/src/views/bd/setting/bd_company_env/edit.vue +193 -0
  287. package/src/views/bd/setting/bd_company_env/list.vue +175 -0
  288. package/src/views/bd/setting/config_manage/list.vue +83 -0
  289. package/src/views/bd/setting/form_import_log/edit.vue +127 -0
  290. package/src/views/bd/setting/form_import_log/list.vue +206 -0
  291. package/src/views/bd/setting/form_script/edit.vue +9 -0
  292. package/src/views/bd/setting/form_script/edit1.vue +36 -3
  293. package/src/views/bd/setting/form_script/form_list.vue +99 -37
  294. package/src/views/bd/setting/form_script/list1.vue +181 -118
  295. package/src/views/bd/setting/form_script/mixins/dialog.js +130 -1
  296. package/src/views/bd/setting/form_script/mixins/edit.js +201 -1
  297. package/src/views/bd/setting/form_script/mixins/edit1.js +193 -1
  298. package/src/views/bd/setting/form_script/mixins/form_list.js +1 -1
  299. package/src/views/bd/setting/form_script/mixins/list.js +236 -1
  300. package/src/views/bd/setting/form_script/mixins/list1.js +423 -14
  301. package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +194 -0
  302. package/src/views/bd/setting/form_script/otherAuthDialog.vue +83 -0
  303. package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +2 -2
  304. package/src/views/bd/setting/form_template/edit.vue +22 -1
  305. package/src/views/bd/setting/form_template/editWfObjConfigDialog.vue +2 -2
  306. package/src/views/bd/setting/form_template/list.vue +326 -214
  307. package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +11 -10
  308. package/src/views/bd/setting/form_template/mixins/edit.js +234 -9
  309. package/src/views/bd/setting/form_template/mixins/list.js +689 -22
  310. package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +193 -0
  311. package/src/views/bd/setting/form_template/mixins/wf_list.js +1 -423
  312. package/src/views/bd/setting/form_template/otherAuthDialog.vue +83 -0
  313. package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +4 -4
  314. package/src/views/bd/setting/form_template/wf_list.vue +1 -1
  315. package/src/views/bd/setting/logic_param/edit.vue +146 -0
  316. package/src/views/bd/setting/logic_param/edit1.vue +106 -0
  317. package/src/views/bd/setting/logic_param/edit2.vue +139 -0
  318. package/src/views/bd/setting/logic_param/list.vue +74 -0
  319. package/src/views/bd/setting/logic_param/list1.vue +12 -0
  320. package/src/views/bd/setting/logic_param/list2.vue +12 -0
  321. package/src/views/bd/setting/logic_param/mixins/edit.js +3 -0
  322. package/src/views/bd/setting/logic_param/mixins/list.js +9 -0
  323. package/src/views/bd/setting/menu_kind/list.vue +172 -83
  324. package/src/views/bd/setting/menu_kind/mixins/authDialog.js +300 -7
  325. package/src/views/bd/setting/menu_kind/mixins/list.js +201 -1
  326. package/src/views/bd/setting/push_data/edit.vue +139 -0
  327. package/src/views/bd/setting/push_data/list.vue +283 -0
  328. package/src/views/bd/setting/push_data_h/edit.vue +153 -0
  329. package/src/views/bd/setting/push_data_h/list.vue +293 -0
  330. package/src/views/bd/setting/request_async_setting/edit.vue +320 -0
  331. package/src/views/bd/setting/request_async_setting/list.vue +372 -0
  332. package/src/views/bd/setting/request_setting/edit.vue +300 -0
  333. package/src/views/bd/setting/request_setting/list.vue +311 -0
  334. package/src/views/bd/setting/table_model/edit.vue +875 -426
  335. package/src/views/bd/setting/table_model/list.vue +190 -128
  336. package/src/views/bd/setting/table_model/mixins/dialog.js +1 -1
  337. package/src/views/bd/setting/table_model/mixins/edit.js +1202 -13
  338. package/src/views/bd/setting/table_model/mixins/list.js +440 -14
  339. package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +201 -0
  340. package/src/views/bd/setting/table_model/otherAuthDialog.vue +83 -0
  341. package/src/views/user/access_log/list.vue +418 -349
  342. package/src/views/user/area/dialog.vue +223 -117
  343. package/src/views/user/area/list.vue +318 -0
  344. package/src/views/user/bill_setting/edit.vue +1 -1
  345. package/src/views/user/bill_setting/list.vue +1 -1
  346. package/src/views/user/common_attribute/itemEdit.vue +2 -2
  347. package/src/views/user/common_attribute/list.vue +5 -2
  348. package/src/views/user/common_script/edit.vue +1 -1
  349. package/src/views/user/common_script/list.vue +1 -1
  350. package/src/views/user/company_info/dialog.vue +164 -163
  351. package/src/views/user/company_info/edit.vue +1 -1
  352. package/src/views/user/extend_datasource/dialog.vue +4 -0
  353. package/src/views/user/extend_datasource/edit.vue +5 -1
  354. package/src/views/user/extend_datasource/list.vue +5 -1
  355. package/src/views/user/fieldTranslation/editDialog.vue +7 -7
  356. package/src/views/user/fieldTranslation/list.vue +32 -32
  357. package/src/views/user/form/vform/designer.vue +776 -749
  358. package/src/views/user/form/vform/out_render.vue +1 -1
  359. package/src/views/user/form/vform/render.vue +59 -37
  360. package/src/views/user/form/view/edit.vue +38 -37
  361. package/src/views/user/form/view/list.vue +261 -49
  362. package/src/views/user/home/bears/index.vue +1032 -0
  363. package/src/views/user/home/default.vue +1025 -979
  364. package/src/views/user/home/dev.vue +29 -0
  365. package/src/views/user/home/index.vue +16 -6
  366. package/src/views/user/home/taili/index.vue +1034 -0
  367. package/src/views/user/ledger_library/list.vue +10 -12
  368. package/src/views/user/login/default.vue +165 -36
  369. package/src/views/user/login/index.vue +4 -6
  370. package/src/views/user/login/indexMixin.js +184 -8
  371. package/src/views/user/menu/list.vue +24 -1
  372. package/src/views/user/notify_message/dialog.vue +38 -22
  373. package/src/views/user/notify_template/edit.vue +188 -187
  374. package/src/views/user/notify_template/edit2.vue +176 -0
  375. package/src/views/user/notify_template/list.vue +4 -1
  376. package/src/views/user/notify_template/list2.vue +190 -0
  377. package/src/views/user/outLink/form_view.vue +211 -184
  378. package/src/views/user/outLink/index.vue +67 -11
  379. package/src/views/user/outLink/view.vue +28 -23
  380. package/src/views/user/position/list.vue +4 -4
  381. package/src/views/user/project_tag/dialog.vue +9 -4
  382. package/src/views/user/project_tag/edit.vue +2 -2
  383. package/src/views/user/project_tag/list.vue +9 -4
  384. package/src/views/user/push_setting/list.vue +2 -2
  385. package/src/views/user/request_setting/edit.vue +258 -0
  386. package/src/views/user/request_setting/list.vue +248 -0
  387. package/src/views/user/role/authConfig.vue +89 -0
  388. package/src/views/user/role/dialog.vue +70 -48
  389. package/src/views/user/role/edit.vue +609 -429
  390. package/src/views/user/role/list.vue +4 -4
  391. package/src/views/user/sale_org/dialog.vue +1 -1
  392. package/src/views/user/sale_org/list.vue +4 -1
  393. package/src/views/user/user/dialog.vue +46 -23
  394. package/src/views/user/user/edit.vue +1059 -1021
  395. package/src/views/user/user/form_dialog.vue +158 -0
  396. package/src/views/user/user/form_info.vue +210 -0
  397. package/src/views/user/user/list.vue +647 -563
  398. package/src/views/user/user/modifyPasswordDialog.vue +64 -53
  399. package/src/views/user/wf/wfReport/index.vue +618 -0
  400. package/src/views/user/wf/wf_auto_submit_data/list.vue +2 -0
  401. package/src/views/user/wf/wf_manage/list.vue +371 -249
  402. package/src/views/user/wf/wf_manage/wfContentDialog.vue +1 -1
  403. package/src/views/user/wf/wf_obj_config/importItemDialog.vue +109 -0
  404. package/src/views/user/wf/wf_obj_config/itemEdit.vue +25 -1
  405. package/src/views/user/wf/wf_obj_config/list.vue +114 -9
  406. package/src/views/user/wf/wf_obj_config/wfBizDataSettingDialog.vue +2 -2
  407. package/src/views/user/wf/wf_transfer_setting/edit.vue +282 -0
  408. package/src/views/user/wf/wf_transfer_setting/list.vue +319 -0
@@ -1,206 +1,277 @@
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"
16
- >
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
2
+ <el-dialog
3
+ custom-class="dialog-style list-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="!0"
11
+ top="5vh"
12
+ width="1220px"
13
+ v-dialog-drag
14
+ :before-close="closeHandle"
15
+ >
16
+ <div class="cont">
17
+ <el-table
18
+ ref="singleTable"
19
+ width="100%"
20
+ :data="tableData"
21
+ height="500"
22
+ border=""
23
+ row-key="columnId"
24
+ stripe=""
25
+ :tree-props="{ children: 'children' }"
26
+ default-expand-all
27
+ v-loading="pictLoading"
28
+ element-loading-background="rgba(0, 0, 0, 0)"
29
+ element-loading-text="数据正在加载中"
30
+ element-loading-spinner="el-icon-loading"
31
+ >
32
+ <el-table-column label="" width="80" fixed="left">
33
+ <template #default="scope">
34
+ <span>{{ scope.$index + 1 }}</span>
35
+ </template>
36
+ </el-table-column>
37
+ <el-table-column label="" width="35" fixed="left"
38
+ ><i class="el-icon-s-operation drag-option"></i>
39
+ </el-table-column>
40
+ <el-table-column
41
+ :label="i18nt('designer.setting.columnLabel')"
42
+ width="150"
43
+ prop="label"
44
+ fixed="left"
28
45
  >
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="格式化配置" width="90" fixed="right" align="center">
122
- <template slot-scope="scope">
123
- <el-button size="mini" plain="" round="" icon="el-icon-edit"
124
- @click="openFormatConfigDialog(scope.row,scope.$index)"
125
- :disabled="!columnFormatMap[scope.row.formatS]"></el-button>
126
- </template>
127
- </el-table-column>
128
- <el-table-column :label="i18nt('designer.setting.renderFunction')" width="70" fixed="right" align="center">
129
- <template slot-scope="scope">
130
- <el-button :disabled="'render' !== scope.row.formatS" size="mini" plain="" round="" icon="el-icon-edit"
131
- @click="showRenderDialog(scope.row)"></el-button>
132
- </template>
133
- </el-table-column>
134
- <el-table-column label="操作" width="150" fixed="right">
135
- <template slot="header">
136
- <el-tooltip
137
- :hide-after="500"
138
- class="item"
139
- effect="dark"
140
- content="添加根节点"
141
- placement="top"
142
- >
143
- <el-button
144
- size="mini" type="" circle=""
145
- icon="el-icon-plus"
146
- @click="onAddRoot"
147
- />
148
- </el-tooltip>
149
- </template>
150
- <template #default="{ row, $index }">
151
- <el-tooltip
152
- :hide-after="hideAfter"
153
- :open-delay="openDelay"
154
- effect="dark"
155
- content="添加兄弟节点"
156
- placement="top"
157
- >
158
- <el-button
159
- size="mini" type="" circle=""
160
- icon="el-icon-plus"
161
- @click="onAddSibling(row, $index)"
162
- />
163
- </el-tooltip>
46
+ <template #default="scope">
47
+ <el-input
48
+ v-model="scope.row.label"
49
+ @change="changeRowLabel(scope.row)"
50
+ ></el-input>
51
+ </template>
52
+ </el-table-column>
53
+ <el-table-column
54
+ :label="i18nt('designer.setting.columnName')"
55
+ width="150"
56
+ prop="prop"
57
+ >
58
+ <template #default="scope">
59
+ <el-input
60
+ v-model="scope.row.prop"
61
+ @change="changeRowProp(scope.row)"
62
+ :disabled="'editAttachment' == scope.row.formatS"
63
+ ></el-input>
64
+ </template>
65
+ </el-table-column>
66
+ <el-table-column
67
+ :label="i18nt('designer.setting.columnWidth')"
68
+ width="100"
69
+ prop="width"
70
+ >
71
+ <template #default="scope">
72
+ <el-input v-model="scope.row.width"></el-input>
73
+ </template>
74
+ </el-table-column>
164
75
 
165
- <el-tooltip
166
- :hide-after="hideAfter"
167
- :open-delay="openDelay"
168
- effect="dark"
169
- content="添加子节点"
170
- placement="top"
171
- >
172
- <el-button
173
- size="mini" type="" circle=""
174
- icon="el-icon-circle-plus-outline"
175
- @click="onAddChild(row, $index)"
176
- />
177
- </el-tooltip>
178
- <el-tooltip
179
- :hide-after="hideAfter"
180
- :open-delay="openDelay"
181
- effect="dark"
182
- content="删除"
183
- placement="top"
184
- >
185
- <el-button
186
- size="mini" type="" circle=""
187
- icon="el-icon-delete"
188
- @click="onDelete(row, $index)"
189
- />
190
- </el-tooltip>
191
- </template>
192
- </el-table-column>
193
- </el-table>
194
- </div>
195
- <div class="dialog-footer" slot="footer">
196
- <el-button @click="closeHandle" class="button-sty" icon="el-icon-close">
197
- {{ i18nt('designer.hint.cancel') }}
198
- </el-button>
199
- <el-button type="primary" @click="colSubmit" class="button-sty" icon="el-icon-check">
200
- {{ i18nt('designer.hint.confirm') }}
201
- </el-button>
202
- </div>
203
- </el-dialog>
76
+ <el-table-column :label="i18nt('必填')" width="70" prop="required">
77
+ <template #default="scope">
78
+ <el-switch
79
+ v-model="scope.row.required"
80
+ @change="changeRowRequired(scope.row)"
81
+ ></el-switch>
82
+ </template>
83
+ </el-table-column>
84
+ <el-table-column
85
+ :label="i18nt('designer.setting.fixedColumn')"
86
+ width="100"
87
+ prop="fixed"
88
+ >
89
+ <template #default="scope">
90
+ <el-select v-model="scope.row.fixed" clearable>
91
+ <el-option value="left">left</el-option>
92
+ <el-option value="right">right</el-option>
93
+ </el-select>
94
+ </template>
95
+ </el-table-column>
96
+ <el-table-column
97
+ :label="i18nt('designer.setting.formatOfColumn')"
98
+ width="200"
99
+ prop="formatS"
100
+ >
101
+ <template #default="scope">
102
+ <el-select
103
+ v-model="scope.row.formatS"
104
+ @change="changeFormatS(scope.row, false)"
105
+ clearable
106
+ >
107
+ <el-option-group :label="i18nt('designer.setting.customRenderGroup')">
108
+ <el-option value="render" label="render"></el-option>
109
+ </el-option-group>
110
+ <el-option-group v-for="t in op" :key="t.label" :label="t.label">
111
+ <el-option
112
+ v-for="e in t.options"
113
+ :key="e.value"
114
+ :value="e.value"
115
+ :label="e.label"
116
+ ></el-option>
117
+ </el-option-group>
118
+ </el-select>
119
+ </template>
120
+ </el-table-column>
121
+ <el-table-column label="格式化配置" width="90" align="center">
122
+ <template #default="scope">
123
+ <el-button
124
+ size="mini"
125
+ plain=""
126
+ round=""
127
+ icon="el-icon-edit"
128
+ @click="openFormatConfigDialog(scope.row, scope.$index)"
129
+ :disabled="
130
+ !columnFormatMap[scope.row.formatS] &&
131
+ 'widgetRender' !== scope.row.formatS
132
+ "
133
+ ></el-button>
134
+ </template>
135
+ </el-table-column>
136
+ <el-table-column
137
+ :label="i18nt('designer.setting.renderFunction')"
138
+ width="70"
139
+ align="center"
140
+ >
141
+ <template #default="scope">
142
+ <el-button
143
+ :disabled="'render' !== scope.row.formatS"
144
+ size="mini"
145
+ plain=""
146
+ round=""
147
+ icon="el-icon-edit"
148
+ @click="showRenderDialog(scope.row)"
149
+ ></el-button>
150
+ </template>
151
+ </el-table-column>
152
+ <el-table-column
153
+ :label="i18nt('designer.setting.visibleColumn')"
154
+ width="70"
155
+ prop="show"
156
+ >
157
+ <template #default="scope">
158
+ <el-switch v-model="scope.row.show"></el-switch>
159
+ </template>
160
+ </el-table-column>
161
+ <el-table-column
162
+ :label="i18nt('designer.setting.sortableColumn')"
163
+ width="70"
164
+ prop="sortable"
165
+ >
166
+ <template #default="scope">
167
+ <el-switch v-model="scope.row.sortable"></el-switch>
168
+ </template>
169
+ </el-table-column>
170
+ <el-table-column label="显示筛选" width="70" prop="filterable">
171
+ <template #default="scope">
172
+ <el-switch v-model="scope.row.filterable"></el-switch>
173
+ </template>
174
+ </el-table-column>
175
+ <el-table-column label="编辑更多属性" width="100" align="center" fixed="right">
176
+ <template #default="scope">
177
+ <el-button
178
+ size="mini"
179
+ plain=""
180
+ round=""
181
+ icon="el-icon-edit"
182
+ @click="openRowEditDialog(scope.row, scope.$index)"
183
+ ></el-button>
184
+ </template>
185
+ </el-table-column>
186
+ <el-table-column label="操作" width="150" fixed="right">
187
+ <template slot="header">
188
+ <el-tooltip
189
+ :hide-after="500"
190
+ class="item"
191
+ effect="dark"
192
+ content="添加根节点"
193
+ placement="top"
194
+ >
195
+ <el-button
196
+ size="mini"
197
+ type=""
198
+ circle=""
199
+ icon="el-icon-plus"
200
+ @click="onAddRoot"
201
+ />
202
+ </el-tooltip>
203
+ </template>
204
+ <template #default="{ row, $index }">
205
+ <el-tooltip
206
+ :hide-after="hideAfter"
207
+ :open-delay="openDelay"
208
+ effect="dark"
209
+ content="添加兄弟节点"
210
+ placement="top"
211
+ >
212
+ <el-button
213
+ size="mini"
214
+ type=""
215
+ circle=""
216
+ icon="el-icon-plus"
217
+ @click="onAddSibling(row, $index)"
218
+ />
219
+ </el-tooltip>
220
+
221
+ <el-tooltip
222
+ :hide-after="hideAfter"
223
+ :open-delay="openDelay"
224
+ effect="dark"
225
+ content="添加子节点"
226
+ placement="top"
227
+ >
228
+ <el-button
229
+ size="mini"
230
+ type=""
231
+ circle=""
232
+ icon="el-icon-circle-plus-outline"
233
+ @click="onAddChild(row, $index)"
234
+ />
235
+ </el-tooltip>
236
+ <el-tooltip
237
+ :hide-after="hideAfter"
238
+ :open-delay="openDelay"
239
+ effect="dark"
240
+ content="删除"
241
+ placement="top"
242
+ >
243
+ <el-button
244
+ size="mini"
245
+ type=""
246
+ circle=""
247
+ icon="el-icon-delete"
248
+ @click="onDelete(row, $index)"
249
+ />
250
+ </el-tooltip>
251
+ </template>
252
+ </el-table-column>
253
+ </el-table>
254
+ <columnRenderDialog
255
+ :column="currentTableColumn"
256
+ :sourceData="sourceData"
257
+ v-if="showColumnRenderDialog"
258
+ :visiable.sync="showColumnRenderDialog"
259
+ @confirm="confirmWidgetRenderDialog"
260
+ ></columnRenderDialog>
261
+ </div>
262
+ <div class="dialog-footer" slot="footer">
263
+ <el-button @click="closeHandle" class="button-sty" icon="el-icon-close">
264
+ {{ i18nt("designer.hint.cancel") }}
265
+ </el-button>
266
+ <el-button
267
+ type="primary"
268
+ @click="colSubmit"
269
+ class="button-sty"
270
+ icon="el-icon-check"
271
+ >
272
+ {{ i18nt("designer.hint.confirm") }}
273
+ </el-button>
274
+ </div>
204
275
  <el-dialog
205
276
  v-if="showRenderDialogFlag"
206
277
  :title="i18nt('designer.setting.renderFunction')"
@@ -213,16 +284,31 @@
213
284
  :destroy-on-close="!0"
214
285
  v-dialog-drag
215
286
  top="7vh"
287
+ :append-to-body="true"
216
288
  >
217
- <el-alert type="info" :closable="!1" title="function customRender(params,h) {"/>
218
- <code-editor ref="dsResultEditor" mode="javascript" :readonly="!1" v-model="renderJson"></code-editor>
219
- <el-alert type="info" :closable="!1" title="}"/>
289
+ <el-alert type="info" :closable="!1" title="function customRender(params,h) {" />
290
+ <code-editor
291
+ ref="dsResultEditor"
292
+ mode="javascript"
293
+ :readonly="!1"
294
+ v-model="renderJson"
295
+ ></code-editor>
296
+ <el-alert type="info" :closable="!1" title="}" />
220
297
  <div class="dialog-footer" slot="footer">
221
- <el-button @click="showRenderDialogFlag = !1" class="button-sty" icon="el-icon-close">
222
- {{ i18nt('designer.hint.cancel') }}
298
+ <el-button
299
+ @click="showRenderDialogFlag = !1"
300
+ class="button-sty"
301
+ icon="el-icon-close"
302
+ >
303
+ {{ i18nt("designer.hint.cancel") }}
223
304
  </el-button>
224
- <el-button type="primary" @click="saveColumnRender" class="button-sty" icon="el-icon-check">
225
- {{ i18nt('designer.hint.confirm') }}
305
+ <el-button
306
+ type="primary"
307
+ @click="saveColumnRender"
308
+ class="button-sty"
309
+ icon="el-icon-check"
310
+ >
311
+ {{ i18nt("designer.hint.confirm") }}
226
312
  </el-button>
227
313
  </div>
228
314
  </el-dialog>
@@ -241,39 +327,312 @@
241
327
  top="5vh"
242
328
  >
243
329
  <div class="cont">
244
- <el-alert type="info" :closable="false" :title="tableColumnConfigHeader"></el-alert>
245
- <code-editor :mode="'javascript'" :readonly="false" v-model="tableColumnConfigCode"
246
- ref="ecEditor"></code-editor>
330
+ <el-alert
331
+ type="info"
332
+ :closable="false"
333
+ :title="tableColumnConfigHeader"
334
+ ></el-alert>
335
+ <code-editor
336
+ :mode="'javascript'"
337
+ :readonly="false"
338
+ v-model="tableColumnConfigCode"
339
+ ref="ecEditor"
340
+ ></code-editor>
341
+ <el-alert type="info" :closable="false" title="}"></el-alert>
342
+ </div>
343
+ <div slot="footer" class="dialog-footer">
344
+ <el-button
345
+ @click="showTableColumnConfigDialog = false"
346
+ class="button-sty"
347
+ icon="el-icon-close"
348
+ >
349
+ {{ i18nt("designer.hint.cancel") }}
350
+ </el-button>
351
+ <el-button
352
+ type="primary"
353
+ @click="saveTableColumnConfigDialog"
354
+ class="button-sty"
355
+ icon="el-icon-check"
356
+ >
357
+ {{ i18nt("designer.hint.confirm") }}
358
+ </el-button>
359
+ </div>
360
+ </el-dialog>
361
+ <el-dialog
362
+ :title="i18nt('designer.setting.editFormEventHandler')"
363
+ :visible.sync="showFormEventDialogFlag"
364
+ v-if="showFormEventDialogFlag"
365
+ :show-close="true"
366
+ custom-class="dialog-style list-dialog"
367
+ v-dialog-drag
368
+ :close-on-click-modal="false"
369
+ :close-on-press-escape="false"
370
+ :destroy-on-close="true"
371
+ :append-to-body="true"
372
+ :modal-append-to-body="true"
373
+ top="5vh"
374
+ >
375
+ <div class="cont">
376
+ <el-alert
377
+ type="info"
378
+ :closable="false"
379
+ :title="'form.' + eventParamsMap[curEventName]"
380
+ ></el-alert>
381
+ <code-editor
382
+ :mode="'javascript'"
383
+ :readonly="false"
384
+ v-model="formEventHandlerCode"
385
+ ref="ecEditor"
386
+ ></code-editor>
247
387
  <el-alert type="info" :closable="false" title="}"></el-alert>
248
388
  </div>
249
389
  <div slot="footer" class="dialog-footer">
250
- <el-button @click="showTableColumnConfigDialog = false" class="button-sty" icon="el-icon-close">
251
- {{ i18nt('designer.hint.cancel') }}
390
+ <el-button
391
+ @click="showFormEventDialogFlag = false"
392
+ class="button-sty"
393
+ icon="el-icon-close"
394
+ >
395
+ {{ i18nt("designer.hint.cancel") }}
252
396
  </el-button>
253
- <el-button type="primary" @click="saveTableColumnConfigDialog" class="button-sty" icon="el-icon-check">
254
- {{ i18nt('designer.hint.confirm') }}
397
+ <el-button
398
+ type="primary"
399
+ @click="saveFormEventHandler"
400
+ class="button-sty"
401
+ icon="el-icon-check"
402
+ >
403
+ {{ i18nt("designer.hint.confirm") }}
255
404
  </el-button>
256
405
  </div>
257
406
  </el-dialog>
258
- </div>
259
407
 
408
+ <el-dialog
409
+ custom-class="dialog-style list-dialog"
410
+ :title="i18nt('designer.setting.tableColEdit')"
411
+ :visible.sync="showRowEditDialog"
412
+ v-if="showRowEditDialog"
413
+ :modal="false"
414
+ :show-close="!0"
415
+ :close-on-click-modal="!1"
416
+ :close-on-press-escape="!1"
417
+ :destroy-on-close="!0"
418
+ top="5vh"
419
+ width="409px"
420
+ v-dialog-drag
421
+ >
422
+ <div class="cont">
423
+ <el-form :model="rowData" class="form-m2" label-position="top">
424
+ <el-form-item :label="i18nt('designer.setting.columnLabel')">
425
+ <el-input
426
+ v-model="rowData.label"
427
+ @change="changeRowLabel(rowData)"
428
+ ></el-input>
429
+ </el-form-item>
430
+ <el-form-item :label="i18nt('designer.setting.columnName')">
431
+ <el-input
432
+ v-model="rowData.prop"
433
+ @change="changeRowProp(rowData)"
434
+ :disabled="'editAttachment' == rowData.formatS"
435
+ ></el-input>
436
+ </el-form-item>
437
+ <el-form-item :label="i18nt('designer.setting.columnWidth')">
438
+ <el-input v-model="rowData.width"></el-input>
439
+ </el-form-item>
440
+ <el-form-item :label="i18nt('必填')">
441
+ <el-switch
442
+ v-model="rowData.required"
443
+ @change="changeRowRequired(rowData)"
444
+ ></el-switch>
445
+ </el-form-item>
446
+ <el-form-item :label="i18nt('designer.setting.fixedColumn')">
447
+ <el-select v-model="rowData.fixed" clearable>
448
+ <el-option value="left">left</el-option>
449
+ <el-option value="right">right</el-option>
450
+ </el-select>
451
+ </el-form-item>
452
+ <el-form-item :label="i18nt('designer.setting.formatOfColumn')">
453
+ <el-select
454
+ v-model="rowData.formatS"
455
+ @change="changeFormatS(rowData, false)"
456
+ clearable
457
+ >
458
+ <el-option-group :label="i18nt('designer.setting.customRenderGroup')">
459
+ <el-option value="render" label="render"></el-option>
460
+ </el-option-group>
461
+ <el-option-group v-for="t in op" :key="t.label" :label="t.label">
462
+ <el-option
463
+ v-for="e in t.options"
464
+ :key="e.value"
465
+ :value="e.value"
466
+ :label="e.label"
467
+ ></el-option>
468
+ </el-option-group>
469
+ </el-select>
470
+ </el-form-item>
471
+ <el-form-item label="格式化配置">
472
+ <el-button
473
+ size="mini"
474
+ plain=""
475
+ round=""
476
+ icon="el-icon-edit"
477
+ @click="openFormatConfigDialog(rowData, rowDataIndex)"
478
+ :disabled="
479
+ !columnFormatMap[rowData.formatS] && 'widgetRender' !== rowData.formatS
480
+ "
481
+ ></el-button>
482
+ </el-form-item>
483
+ <el-form-item :label="i18nt('designer.setting.renderFunction')">
484
+ <el-button
485
+ :disabled="'render' !== rowData.formatS"
486
+ size="mini"
487
+ plain=""
488
+ round=""
489
+ icon="el-icon-edit"
490
+ @click="showRenderDialog(rowData)"
491
+ ></el-button>
492
+ </el-form-item>
493
+ <el-form-item :label="i18nt('designer.setting.visibleColumn')">
494
+ <el-switch v-model="rowData.show"></el-switch>
495
+ </el-form-item>
496
+ <el-form-item :label="i18nt('designer.setting.sortableColumn')">
497
+ <el-switch v-model="rowData.sortable"></el-switch>
498
+ </el-form-item>
499
+ <el-form-item label="显示筛选">
500
+ <el-switch v-model="rowData.filterable"></el-switch>
501
+ </el-form-item>
502
+ <el-form-item :label="i18nt('明细行')">
503
+ <el-switch v-model="rowData.isItemLine"></el-switch>
504
+ </el-form-item>
505
+
506
+ <el-form-item :label="i18nt('下拉列')">
507
+ <el-switch v-model="rowData.treeNode"></el-switch>
508
+ </el-form-item>
509
+ <el-form-item :label="i18nt('自定义表格列配置')">
510
+ <a
511
+ href="javascript:void(0);"
512
+ class="a-link link-oneLind"
513
+ @click="openTableColumnConfigDialog(rowData, rowDataIndex)"
514
+ >
515
+ <span>{{ rowData.tableColumnConfig }}</span>
516
+ <i class="el-icon-edit"></i>
517
+ </a>
518
+ </el-form-item>
519
+ <el-form-item :label="i18nt('编辑插槽类型')">
520
+ <el-select
521
+ v-model="rowData.editFormatS"
522
+ @change="changeFormatS(rowData, true)"
523
+ clearable
524
+ >
525
+ <el-option
526
+ v-for="e in editOp"
527
+ :key="e.value"
528
+ :value="e.value"
529
+ :label="e.label"
530
+ ></el-option>
531
+ </el-select>
532
+ </el-form-item>
533
+ <el-form-item label="编辑插槽配置">
534
+ <el-button
535
+ size="mini"
536
+ plain=""
537
+ round=""
538
+ icon="el-icon-edit"
539
+ @click="openEditFormatConfigDialog(rowData, rowDataIndex)"
540
+ :disabled="!rowData.editFormatS"
541
+ ></el-button>
542
+ </el-form-item>
543
+ <el-form-item :label="i18nt('导出类型')">
544
+ <el-select v-model="rowData.exportType" clearable>
545
+ <el-option value="Image2" label="图片"></el-option>
546
+ <el-option value="Number" label="数值"></el-option>
547
+ </el-select>
548
+ </el-form-item>
549
+ <el-form-item :label="i18nt('表尾统计行类型')">
550
+ <el-select v-model="rowData.footerDataType" clearable>
551
+ <el-option value="1" label="合计"></el-option>
552
+ <el-option value="2" label="平均"></el-option>
553
+ <el-option value="3" label="自定义"></el-option>
554
+ </el-select>
555
+ </el-form-item>
556
+ <el-form-item label="表尾统计行配置">
557
+ <el-button
558
+ size="mini"
559
+ plain=""
560
+ round=""
561
+ icon="el-icon-edit"
562
+ @click="editFormEventHandler(rowData, rowDataIndex, 'footerMethodConfg')"
563
+ :disabled="rowData.footerDataType !== '3'"
564
+ ></el-button>
565
+ </el-form-item>
566
+ <el-form-item :label="i18nt('显示名称颜色')">
567
+ <el-select v-model="rowData.labelColor" clearable>
568
+ <el-option value="#e6a23c" label="橙"></el-option>
569
+ <el-option value="#2a6494" label="蓝"></el-option>
570
+ <el-option value="#30b08f" label="绿"></el-option>
571
+ <el-option value="#909399" label="灰"></el-option>
572
+ <el-option value="#ea5353" label="红"></el-option>
573
+ </el-select>
574
+ </el-form-item>
575
+ </el-form>
576
+ </div>
577
+ <div class="dialog-footer" slot="footer">
578
+ <el-button @click="closeRowEditDialog" class="button-sty" icon="el-icon-close">
579
+ {{ i18nt("designer.hint.cancel") }}
580
+ </el-button>
581
+ <el-button
582
+ type="primary"
583
+ @click="submitRowEditDialog"
584
+ class="button-sty"
585
+ icon="el-icon-check"
586
+ >
587
+ {{ i18nt("designer.hint.confirm") }}
588
+ </el-button>
589
+ </div>
590
+ </el-dialog>
591
+ </el-dialog>
260
592
  </template>
261
593
  <script>
262
594
  import i18n from "../../../../../../components/xform/utils/i18n";
263
595
  import Sortable from "sortablejs";
264
- import {generateId} from "../../../../../../components/xform/utils/util";
596
+ import {
597
+ generateId,
598
+ loopHandleWidget,
599
+ deepClone,
600
+ columnFormatMap,
601
+ } from "../../../../../../components/xform/utils/util";
602
+ import columnRenderDialog from "./columnRenderDialog.vue";
603
+
604
+ let businessOptions = [
605
+ {
606
+ value: "_createBy",
607
+ label: "创建人",
608
+ },
609
+ {
610
+ value: "_modifyBy",
611
+ label: "更新人",
612
+ },
613
+ {
614
+ value: "create_date",
615
+ label: "创建时间",
616
+ },
617
+ {
618
+ value: "modify_date",
619
+ label: "更新时间",
620
+ },
621
+ ];
622
+ let userFields = ["_createBy", "_modifyBy", "create_date", "modify_date"];
265
623
 
266
624
  export default {
267
625
  mixins: [i18n],
268
626
  props: {
269
627
  designer: Object,
270
628
  selectedWidget: Object,
271
- optionModel: Object
629
+ optionModel: Object,
272
630
  },
273
- components: {},
274
- inject: ['openWidgetPropertyDialog'],
631
+ components: { columnRenderDialog },
632
+ inject: ["openWidgetPropertyDialog"],
275
633
  data() {
276
634
  return {
635
+ pictLoading: true,
277
636
  tableColumnConfigTitle: null,
278
637
  showTableColumnConfigDialog: false,
279
638
  tableColumnConfigHeader: null,
@@ -282,264 +641,344 @@ export default {
282
641
  dialogVisible: true,
283
642
  alignOptions: [
284
643
  {
285
- value: 'left',
286
- label: 'left'
644
+ value: "left",
645
+ label: "left",
287
646
  },
288
647
  {
289
- value: 'center',
290
- label: 'center'
648
+ value: "center",
649
+ label: "center",
291
650
  },
292
651
  {
293
- value: 'right',
294
- label: 'right'
295
- }
652
+ value: "right",
653
+ label: "right",
654
+ },
296
655
  ],
656
+ businessOptions,
657
+ userFields,
297
658
  op: [
298
659
  {
299
- label: 'edit Format',
660
+ label: "edit Format",
300
661
  options: [
301
662
  {
302
- value: 'editInput',
303
- label: '文本输入框'
663
+ value: "editInput",
664
+ label: "文本输入框",
304
665
  },
305
666
  {
306
- value: 'editNumber',
307
- label: '数字输入框'
667
+ value: "editNumber",
668
+ label: "数字输入框",
308
669
  },
309
670
  {
310
- value: 'editDate',
311
- label: '日期输入框'
671
+ value: "editDate",
672
+ label: "日期输入框",
312
673
  },
313
674
  {
314
- value: 'editSelect',
315
- label: '下拉框'
675
+ value: "editSelect",
676
+ label: "下拉框",
316
677
  },
317
678
  {
318
- value: 'editAttachment',
319
- label: '附件'
679
+ value: "checkbox",
680
+ label: "复选框",
320
681
  },
321
682
  {
322
- value: 'editSearch',
323
- label: '搜索框'
683
+ value: "radio",
684
+ label: "单选框",
324
685
  },
325
686
  {
326
- value: 'editStatus',
327
- label: '状态'
687
+ value: "editAttachment",
688
+ label: "附件",
328
689
  },
329
690
  {
330
- value: 'editDelete',
331
- label: '删除按钮'
691
+ value: "editSearch",
692
+ label: "搜索框",
332
693
  },
333
694
  {
334
- value: 'editButton',
335
- label: '查看按钮'
695
+ value: "editStatus",
696
+ label: "状态",
336
697
  },
337
698
  {
338
- value: 'aText',
339
- label: '超链接文本'
699
+ value: "text",
700
+ label: "文本",
340
701
  },
341
702
  {
342
- value: 'aLink',
343
- label: '超链接按钮'
703
+ value: "editDelete",
704
+ label: "删除按钮",
344
705
  },
345
706
  {
346
- value: 'button',
347
- label: '按钮'
707
+ value: "editButton",
708
+ label: "查看按钮",
348
709
  },
349
710
  {
350
- value: 'editTreeButtonGroup',
351
- label: '编辑行按钮组'
352
- }
353
- ]
711
+ value: "aText",
712
+ label: "超链接文本",
713
+ },
714
+ {
715
+ value: "aLink",
716
+ label: "超链接按钮",
717
+ },
718
+ {
719
+ value: "button",
720
+ label: "按钮",
721
+ },
722
+ {
723
+ value: "editTreeButtonGroup",
724
+ label: "编辑行按钮组",
725
+ },
726
+ {
727
+ value: "widgetRender",
728
+ label: "自定义组件",
729
+ },
730
+ ],
354
731
  },
355
732
  {
356
- label: '树控件',
733
+ label: "树控件",
357
734
  options: [
358
735
  {
359
- value: 'addSiblingEditRow',
360
- label: '新增兄弟节点'
736
+ value: "addSiblingEditRow",
737
+ label: "新增兄弟节点",
361
738
  },
362
739
  {
363
- value: 'addChildTreeRow',
364
- label: '新增子节点'
740
+ value: "addChildTreeRow",
741
+ label: "新增子节点",
365
742
  },
366
743
  {
367
- value: 'moveUpRow',
368
- label: '上移'
744
+ value: "moveUpRow",
745
+ label: "上移",
369
746
  },
370
747
  {
371
- value: 'moveDownRow',
372
- label: '下移'
748
+ value: "moveDownRow",
749
+ label: "下移",
373
750
  },
374
751
  {
375
- value: 'removeTreeRow',
376
- label: '删除树节点'
377
- }
378
- ]
752
+ value: "removeTreeRow",
753
+ label: "删除树节点",
754
+ },
755
+ ],
756
+ },
757
+
758
+ {
759
+ label: "业务模块",
760
+ options: businessOptions,
379
761
  },
380
762
  {
381
- label: 'Date Format',
763
+ label: "Date Format",
382
764
  options: [
383
765
  {
384
- value: 'd1',
385
- label: 'yyyy-MM-dd'
766
+ value: "d1",
767
+ label: "yyyy-MM-dd",
386
768
  },
387
769
  {
388
- value: 'd2',
389
- label: 'yyyy/MM/dd'
770
+ value: "d2",
771
+ label: "yyyy/MM/dd",
390
772
  },
391
773
  {
392
- value: 'd3',
393
- label: 'yyyy年MM月dd日'
774
+ value: "d3",
775
+ label: "yyyy年MM月dd日",
394
776
  },
395
777
  {
396
- value: 'd4',
397
- label: 'yyyy-MM-dd HH:mm:ss'
778
+ value: "d4",
779
+ label: "yyyy-MM-dd HH:mm:ss",
398
780
  },
399
781
  {
400
- value: 'd5',
401
- label: 'yyyy-MM-dd hh:mm:ss'
402
- }
403
- ]
782
+ value: "d5",
783
+ label: "yyyy-MM-dd hh:mm:ss",
784
+ },
785
+ ],
404
786
  },
405
787
  {
406
- label: 'Number Format',
788
+ label: "Number Format",
407
789
  options: [
408
790
  {
409
- value: 'n1',
410
- label: '###,###,###,##0.######'
791
+ value: "n1",
792
+ label: "###,###,###,##0.######",
411
793
  },
412
794
  {
413
- value: 'n2',
414
- label: '###,###,###,##0.00####'
795
+ value: "n2",
796
+ label: "###,###,###,##0.00####",
415
797
  },
416
798
  {
417
- value: 'n3',
418
- label: '###,###,###,##0.000000'
799
+ value: "n3",
800
+ label: "###,###,###,##0.000000",
419
801
  },
420
802
  {
421
- value: 'n4',
422
- label: '###,###,###,##0.000'
803
+ value: "n4",
804
+ label: "###,###,###,##0.000",
423
805
  },
424
806
  {
425
- value: 'n5',
426
- label: '###,###,###,##0.00'
807
+ value: "n5",
808
+ label: "###,###,###,##0.00",
427
809
  },
428
810
  {
429
- value: 'n6',
430
- label: '###,###,###,##0'
811
+ value: "n6",
812
+ label: "###,###,###,##0",
431
813
  },
432
814
  {
433
- value: 'n7',
434
- label: '###,##0.00##%'
435
- }
436
- ]
437
- }
815
+ value: "n7",
816
+ label: "###,##0.00##%",
817
+ },
818
+ ],
819
+ },
438
820
  ],
439
821
  editOp: [
440
822
  {
441
- value: 'editInput',
442
- label: '文本输入框'
823
+ value: "editInput",
824
+ label: "文本输入框",
443
825
  },
444
826
  {
445
- value: 'editNumber',
446
- label: '数字输入框'
827
+ value: "editNumber",
828
+ label: "数字输入框",
447
829
  },
448
830
  {
449
- value: 'editDate',
450
- label: '日期输入框'
831
+ value: "editDate",
832
+ label: "日期输入框",
451
833
  },
452
834
  {
453
- value: 'editSelect',
454
- label: '下拉框'
835
+ value: "editSelect",
836
+ label: "下拉框",
455
837
  },
456
838
  {
457
- value: 'editAttachment',
458
- label: '附件'
839
+ value: "editAttachment",
840
+ label: "附件",
459
841
  },
460
842
  {
461
- value: 'editSearch',
462
- label: '搜索框'
463
- }
843
+ value: "editSearch",
844
+ label: "搜索框",
845
+ },
464
846
  ],
465
847
  showRenderDialogFlag: !1,
466
- renderJson: '',
848
+ renderJson: "",
467
849
  currentTableColumn: null,
850
+ sourceData: null,
468
851
 
469
852
  hideAfter: 1500,
470
853
  openDelay: 500,
471
- tableData: [],//树形结构数据转的数组
854
+ tableData: [], //树形结构数据转的数组
472
855
  tableDataArray: [],
473
856
  dragSort: null,
474
- columnFormatMap: {
475
- editInput: 'input',
476
- editNumber: 'number',
477
- editDate: 'date',
478
- editSelect: 'select',
479
- editSearch: 'vabsearch',
480
- editAttachment: 'baseAttachment',
481
- editStatus: 'status',
482
- aText: 'a-text',
483
- aLink: 'a-link',
484
- editDelete: 'a-link',
485
- editButton: 'a-link',
486
- button: 'button',
487
- addSiblingEditRow: 'a-link',
488
- addChildTreeRow: 'a-link',
489
- moveUpRow: 'a-link',
490
- moveDownRow: 'a-link',
491
- removeTreeRow: 'a-link'
857
+ columnFormatMap,
858
+
859
+ showFormEventDialogFlag: false,
860
+ formEventHandlerCode: "",
861
+ curEventName: "",
862
+ curEventRow: null,
863
+
864
+ eventParamsMap: {
865
+ footerMethodConfg: "footerMethodConfg(dataId,formCode,param) {",
492
866
  },
493
- }
867
+
868
+ showColumnRenderDialog: false,
869
+
870
+ editRowData: null,
871
+ rowData: null,
872
+ rowDataIndex: 0,
873
+ showRowEditDialog: false,
874
+ };
494
875
  },
495
876
  beforeDestroy() {
496
- if (this.dragSort) this.dragSort.destroy()
497
- },
498
- created() {
499
-
877
+ if (this.dragSort) this.dragSort.destroy();
500
878
  },
879
+ created() {},
501
880
  mounted() {
502
881
  this.init();
503
882
  },
504
883
  methods: {
884
+ editFormEventHandler(row, index, eventName) {
885
+ this.curEventRow = row;
886
+ this.curEventName = eventName;
887
+ this.curEventIndex = index;
888
+ this.formEventHandlerCode = row[eventName];
889
+ this.showFormEventDialogFlag = true;
890
+ },
891
+
892
+ saveFormEventHandler() {
893
+ const codeHints = this.$refs.ecEditor.getEditorAnnotations();
894
+ let syntaxErrorFlag = false;
895
+ if (!!codeHints && codeHints.length > 0) {
896
+ codeHints.forEach((chItem) => {
897
+ if (chItem.type === "error") {
898
+ syntaxErrorFlag = true;
899
+ }
900
+ });
901
+
902
+ if (syntaxErrorFlag) {
903
+ this.$message.error(this.i18nt("designer.setting.syntaxCheckWarning"));
904
+ return;
905
+ }
906
+ }
907
+ this.curEventRow[this.curEventName] = this.formEventHandlerCode;
908
+ this.showFormEventDialogFlag = false;
909
+ },
505
910
  init() {
506
- this.tableData = this.$baseLodash.cloneDeep(this.optionModel.tableColumns);
507
- this.$nextTick(() => {
911
+ setTimeout(() => {
912
+ this.tableData = this.$baseLodash.cloneDeep(this.optionModel.tableColumns);
913
+ this.$nextTick(() => {
914
+ this.rowDrop();
915
+ setTimeout(() => {
916
+ this.pictLoading = false;
917
+ }, 200);
918
+ });
919
+ }, 10);
920
+
921
+ /*this.$nextTick(() => {
508
922
  this.rowDrop();
509
- });
923
+ });*/
510
924
  },
511
925
  colSubmit() {
512
926
  this.dialogVisible = !1;
513
927
  this.optionModel.tableColumns = this.tableData;
514
928
  this.closeHandle();
515
929
  },
930
+ openWidgetRenderDialog(row, sourceData) {
931
+ this.currentTableColumn = row;
932
+ this.sourceData = sourceData;
933
+
934
+ // this.widgetList =
935
+
936
+ // this.designer.widgetList
937
+
938
+ this.showColumnRenderDialog = true;
939
+ },
940
+ confirmWidgetRenderDialog(widgetList) {
941
+ this.currentTableColumn.widgetList = widgetList;
942
+ this.showColumnRenderDialog = false;
943
+ },
516
944
  showRenderDialog: function (e) {
517
- (this.currentTableColumn = e), (this.renderJson = e.render || ''), (this.showRenderDialogFlag = !0);
945
+ /*if(e.formatS == 'widgetRender'){
946
+ this.openWidgetRenderDialog(e);
947
+ return
948
+ }*/
949
+
950
+ (this.currentTableColumn = e),
951
+ (this.renderJson = e.render || ""),
952
+ (this.showRenderDialogFlag = !0);
518
953
  },
519
954
  saveColumnRender: function () {
520
- this.$set(this.currentTableColumn, 'render', this.renderJson), (this.showRenderDialogFlag = !1);
955
+ this.$set(this.currentTableColumn, "render", this.renderJson),
956
+ (this.showRenderDialogFlag = !1);
521
957
  },
522
958
  closeHandle() {
523
- this.$emit('update:visiable', false);
524
- this.$emit('close');
959
+ this.$emit("update:visiable", false);
960
+ this.$emit("close");
525
961
  },
526
962
  // 添加同级节点
527
963
  onAddSibling(row, index) {
528
- console.log('onAddSibling', row, index)
529
- const parentId = row.parentId || null
964
+ console.log("onAddSibling", row, index);
965
+ const parentId = row.parentId || null;
530
966
  // 先判断是不是根节点
531
967
  if (!parentId) {
532
968
  // 当前节点直接添加
533
969
  // this.tableData.push(this.generateRow(parentId))
534
- let addIndex = this.tableData.filter(item => !item.parentId).findIndex(item => item.columnId == row.columnId) + 1;
535
- this.tableData.splice(addIndex, 0, this.generateRow(parentId))
970
+ let addIndex =
971
+ this.tableData
972
+ .filter((item) => !item.parentId)
973
+ .findIndex((item) => item.columnId == row.columnId) + 1;
974
+ this.tableData.splice(addIndex, 0, this.generateRow(parentId));
536
975
  } else {
537
- this.handleAddOneRow(row, index, 'SIBLING')
976
+ this.handleAddOneRow(row, index, "SIBLING");
538
977
  }
539
978
  },
540
979
  // 添加子节点 todo
541
980
  onAddChild(row, index) {
542
- this.handleAddOneRow(row, index, 'CHILD')
981
+ this.handleAddOneRow(row, index, "CHILD");
543
982
  },
544
983
  /**
545
984
  * 处理添加一行数据
@@ -548,36 +987,35 @@ export default {
548
987
  * @param {string} type 操作类型 SIBLING 同级 / CHILD 子级
549
988
  */
550
989
  handleAddOneRow(row, index, type) {
551
-
552
- const {parentId, columnId} = row
553
- const curId = type === 'SIBLING' ? parentId : columnId
554
- let curRow = {}
990
+ const { parentId, columnId } = row;
991
+ const curId = type === "SIBLING" ? parentId : columnId;
992
+ let curRow = {};
555
993
  // 在 tableData 中,找到当前节点
556
994
  const findRow = (data) => {
557
995
  data.forEach((item) => {
558
996
  if (item.columnId === curId) {
559
- curRow = item
997
+ curRow = item;
560
998
  }
561
999
  if (item.children && item.children.length) {
562
- findRow(item.children)
1000
+ findRow(item.children);
563
1001
  }
564
- })
565
- }
1002
+ });
1003
+ };
566
1004
 
567
- findRow(this.tableData)
1005
+ findRow(this.tableData);
568
1006
 
569
- const {columnId: generateParentId, children} = curRow
1007
+ const { columnId: generateParentId, children } = curRow;
570
1008
 
571
- let newRow = this.generateRow(generateParentId)
1009
+ let newRow = this.generateRow(generateParentId);
572
1010
  if (children) {
573
- if (type === 'SIBLING') {
574
- let addIndex = children.findIndex(item => item.columnId == row.columnId) + 1;
575
- children.splice(addIndex, 0, newRow)
1011
+ if (type === "SIBLING") {
1012
+ let addIndex = children.findIndex((item) => item.columnId == row.columnId) + 1;
1013
+ children.splice(addIndex, 0, newRow);
576
1014
  } else {
577
- children.push(newRow)
1015
+ children.push(newRow);
578
1016
  }
579
1017
  } else {
580
- this.$set(curRow, 'children', [newRow])
1018
+ this.$set(curRow, "children", [newRow]);
581
1019
  }
582
1020
  },
583
1021
  getUuid() {
@@ -587,7 +1025,7 @@ export default {
587
1025
  * 生成一行数据
588
1026
  */
589
1027
  generateRow(parentId) {
590
- let tmpId = 'column' + generateId();
1028
+ let tmpId = "column" + generateId();
591
1029
  let uuid = this.getUuid();
592
1030
  var row = {
593
1031
  columnId: uuid,
@@ -597,46 +1035,50 @@ export default {
597
1035
  width: 150,
598
1036
  prop: tmpId,
599
1037
  label: tmpId,
600
- align: 'left',
1038
+ align: "left",
601
1039
  show: true,
602
1040
  sortable: true,
603
-
1041
+ filterable: true,
1042
+ exportType: null,
1043
+ footerDataType: null,
1044
+ footerMethodConfg: null,
1045
+ widgetList: [],
1046
+ labelColor: null,
604
1047
  // treeNode: false,
605
-
606
1048
  };
607
1049
  return row;
608
1050
  },
609
1051
  // 添加根节点
610
1052
  onAddRoot() {
611
- this.tableData.push(this.generateRow())
1053
+ this.tableData.push(this.generateRow());
612
1054
  },
613
1055
  // 删除当前节点及对应子节点数据
614
1056
  onDelete(row) {
615
- const {parentId, columnId} = row
1057
+ const { parentId, columnId } = row;
616
1058
  // 根节点直接删除
617
1059
  if (!parentId) {
618
- const delIndex = this.tableData.findIndex((item) => item.columnId === columnId)
619
- this.tableData.splice(delIndex, 1)
1060
+ const delIndex = this.tableData.findIndex((item) => item.columnId === columnId);
1061
+ this.tableData.splice(delIndex, 1);
620
1062
  } else {
621
1063
  // 找到父节点,通过父节点删除
622
- let parentRow = {}
1064
+ let parentRow = {};
623
1065
  const findRow = (data) => {
624
1066
  data.forEach((item) => {
625
1067
  if (item.columnId === parentId) {
626
- parentRow = {...item}
1068
+ parentRow = { ...item };
627
1069
  }
628
1070
  if (item.children && item.children.length) {
629
- findRow(item.children)
1071
+ findRow(item.children);
630
1072
  }
631
- })
632
- }
633
- findRow(this.tableData)
1073
+ });
1074
+ };
1075
+ findRow(this.tableData);
634
1076
 
635
- const {children} = parentRow
1077
+ const { children } = parentRow;
636
1078
 
637
- const delIndex = children.findIndex((item) => item.columnId === columnId)
1079
+ const delIndex = children.findIndex((item) => item.columnId === columnId);
638
1080
 
639
- children.splice(delIndex, 1)
1081
+ children.splice(delIndex, 1);
640
1082
  }
641
1083
  },
642
1084
  // 数据准备 生成 id 和 parentId
@@ -644,30 +1086,34 @@ export default {
644
1086
  const tableFormat = (tableData, parentId) => {
645
1087
  tableData.forEach((item) => {
646
1088
  // item.parentId = parentId || null
647
- if (!item.kid) item.kid = item.columnId
1089
+ if (!item.kid) item.kid = item.columnId;
648
1090
  if (item.children && item.children.length > 0) {
649
- tableFormat(item.children, item.columnId)
1091
+ tableFormat(item.children, item.columnId);
650
1092
  }
651
- })
652
- }
1093
+ });
1094
+ };
653
1095
 
654
- tableFormat(data)
655
- return data
1096
+ tableFormat(data);
1097
+ return data;
656
1098
  },
657
1099
  //drag begin
658
1100
  //行拖拽
659
1101
  rowDrop() {
660
- if (this.dragSort) this.dragSort.destroy() // 防止在Dom上重复绑定事件
1102
+ if (this.dragSort) this.dragSort.destroy(); // 防止在Dom上重复绑定事件
661
1103
  // const tbody = document.querySelector('.drag .el-table__body-wrapper tbody');
662
- var tbody = this.$refs.singleTable.$el.querySelectorAll('.el-table__fixed-body-wrapper > table > tbody')[0];
1104
+ var tbody = this.$refs.singleTable.$el.querySelectorAll(
1105
+ ".el-table__fixed-body-wrapper > table > tbody"
1106
+ )[0];
663
1107
  const _this = this;
664
1108
  this.dragSort = Sortable.create(tbody, {
665
- ghostClass: 'sortable-ghost',
1109
+ ghostClass: "sortable-ghost",
1110
+ // draggable: ".drag-option", // 修改可拖拽元素
1111
+ handle: ".drag-option", // 指定拖动按钮
666
1112
  setData: function (e) {
667
- e.setData('Text', '');
1113
+ e.setData("Text", "");
668
1114
  },
669
- onEnd({newIndex, oldIndex}) {
670
- _this.rowDropEnd(newIndex, oldIndex)
1115
+ onEnd({ newIndex, oldIndex }) {
1116
+ _this.rowDropEnd(newIndex, oldIndex);
671
1117
  },
672
1118
  });
673
1119
  },
@@ -678,7 +1124,7 @@ export default {
678
1124
  data.forEach((item) => {
679
1125
  const loop = (data) => {
680
1126
  result.push({
681
- ...data
1127
+ ...data,
682
1128
  });
683
1129
  let child = data.children;
684
1130
  if (child) {
@@ -732,13 +1178,7 @@ export default {
732
1178
  let newRow = this.tableDataArray[newIndex];
733
1179
 
734
1180
  //判断是否把该行 拖拽到 自己的底级中
735
- if (
736
- this.isTreeBottom(
737
- this.tableData,
738
- oldRow.columnId,
739
- newRow.columnId
740
- )
741
- ) {
1181
+ if (this.isTreeBottom(this.tableData, oldRow.columnId, newRow.columnId)) {
742
1182
  this.$message({
743
1183
  type: "error",
744
1184
  message: "不能放到子节点",
@@ -784,72 +1224,106 @@ export default {
784
1224
  let isButtontCell = false;
785
1225
  let widgetType = this.columnFormatMap[formatS];
786
1226
  if (widgetType) {
787
- isButtontCell = widgetType === 'a-link' || widgetType === 'button';
1227
+ isButtontCell = widgetType === "a-link" || widgetType === "button";
788
1228
  }
789
1229
  return isButtontCell;
790
1230
  },
791
1231
  //drag end
792
- changeFormatS(row) {
793
- let isButtontCell = this.getIsButtontCell(row.formatS);
794
- let columnWidgetConfig = this.getColumnWidgetConfig(row, true);
795
- let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
796
- if (columnSelectedWidget) {
797
- row.columnOption = columnSelectedWidget.options;
798
- } else {
799
- row.columnOption = {}
800
- }
801
-
802
- if (row.formatS == 'editTreeButtonGroup') {
803
- row.prop = null;
804
- row.label = null;
805
- row.sortable = false;
806
- row.width = 150;
807
- } else if (isButtontCell) {
808
- if (row.formatS == 'aLink' || row.formatS == 'button') {
809
- if (!row.width || row.width == 47) row.width = 150;
1232
+ changeFormatS(row, isEdit) {
1233
+ let formatS = isEdit ? row.editFormatS : row.formatS;
1234
+ let isButtontCell = this.getIsButtontCell(formatS);
1235
+ // let columnWidgetConfig = this.getColumnWidgetConfig(row, true, isEdit);
1236
+ // let { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
1237
+ let attachmentPrefix = this.designer.getAttachmentPrefix();
1238
+ let columnSelectedWidget = this.designer.createColumnWidget(row, isEdit);
1239
+ if (!isEdit) {
1240
+ //格式化类型
1241
+ if (columnSelectedWidget) {
1242
+ row.columnOption = columnSelectedWidget.options;
1243
+ row.widget = columnSelectedWidget;
810
1244
  } else {
811
- row.width = 47;
1245
+ row.columnOption = {};
1246
+ row.widget = null;
812
1247
  }
813
- row.prop = null;
814
- row.label = null;
815
- row.sortable = false;
816
1248
  } else {
817
- let tmpId = 'column' + generateId();
818
- if (!row.width || row.width == 47) row.width = 150;
819
- if (!row.prop) row.prop = tmpId;
820
- if (!row.label) row.label = tmpId;
821
- row.sortable = true;
1249
+ if (row.prop && row.prop.startsWith(attachmentPrefix)) {
1250
+ let suffix = row.prop.replace(attachmentPrefix, "");
1251
+ columnSelectedWidget.options.keyName = row.prop;
1252
+ columnSelectedWidget.options.keyNameSuffix = suffix;
1253
+ }
1254
+ //编辑插槽类型
1255
+ if (columnSelectedWidget) {
1256
+ row.columnOption = columnSelectedWidget.options;
1257
+ row.editWidget = columnSelectedWidget;
1258
+ } else {
1259
+ row.editColumnOption = {};
1260
+ row.editWidget = null;
1261
+ }
1262
+ }
822
1263
 
823
- if (row.formatS == 'editAttachment') {
824
- row.prop = this.designer.createAttachmentKeyName();
1264
+ if (!isEdit) {
1265
+ if (row.formatS == "editTreeButtonGroup") {
1266
+ row.prop = null;
1267
+ row.label = null;
1268
+ row.sortable = false;
1269
+ row.width = 150;
1270
+ } else if (isButtontCell) {
1271
+ if (row.formatS == "aLink" || row.formatS == "button") {
1272
+ if (!row.width || row.width == 47) row.width = 150;
1273
+ } else {
1274
+ row.width = 47;
1275
+ }
1276
+ row.prop = null;
1277
+ row.label = null;
1278
+ row.sortable = false;
825
1279
  } else {
826
- let attachmentPrefix = this.designer.getAttachmentPrefix();
827
- row.prop = row.prop.replaceAll(attachmentPrefix, "");
1280
+ let tmpId = "column" + generateId();
1281
+ if (!row.width || row.width == 47) row.width = 150;
1282
+ if (!row.prop) row.prop = tmpId;
1283
+ if (!row.label) row.label = tmpId;
1284
+
1285
+ if (this.userFields.includes(row.formatS)) {
1286
+ let item = this.businessOptions.find((item) => item.value == row.formatS);
1287
+ if (item) {
1288
+ row.prop = item.value;
1289
+ row.label = item.label;
1290
+ }
1291
+ }
1292
+
1293
+ row.sortable = true;
1294
+
1295
+ if (!isEdit) {
1296
+ if (formatS == "editAttachment") {
1297
+ row.prop = columnSelectedWidget.options.keyName;
1298
+ } else {
1299
+ row.prop = row.prop.replaceAll(attachmentPrefix, "");
1300
+ }
1301
+ }
828
1302
  }
829
1303
  }
830
1304
  },
831
1305
  getColumnWidgetConfig(row, isChange, isEdit) {
832
- let formatS = isEdit ? row.editFormatS : row.formatS
1306
+ let formatS = isEdit ? row.editFormatS : row.formatS;
833
1307
  let columnSelectedWidget = null;
834
1308
  let columnEditFields = null;
835
1309
 
836
1310
  let type = this.columnFormatMap[formatS];
837
- /*if (type == 'date') {
838
- columnEditFields = ['type', 'format', 'valueFormat']
839
- } else if (type == 'select') {
840
-
841
- }
842
- if (type == 'vabsearch') {
843
- columnEditFields = ['vabSearchField', 'formCode', 'formVersion', 'required', 'showFormField', 'onSearchConfirm', 'onSearchClear']
844
- }*/
845
1311
 
846
1312
  if (type) {
847
1313
  // columnSelectedWidget = this.$baseLodash.cloneDeep(this.designer.getFieldWidgetByType(type));
848
- columnSelectedWidget = this.designer.copyNewFieldWidget(this.designer.getFieldWidgetByType(type));
1314
+ columnSelectedWidget = this.designer.copyNewFieldWidget(
1315
+ this.designer.getFieldWidgetByType(type)
1316
+ );
849
1317
  /*let tmpId = generateId();
850
1318
  let idVal = row.prop ? row.prop : (type + tmpId);*/
851
1319
  /*columnSelectedWidget.id = idVal;*/
852
1320
  // columnSelectedWidget.options.name = idVal;
1321
+ /*if (isEdit) {
1322
+ columnSelectedWidget.id = "edit_" + row.columnId;
1323
+ } else {
1324
+ columnSelectedWidget.id = row.columnId;
1325
+ }*/
1326
+ // columnSelectedWidget.id = row.columnId;
853
1327
  let columnOption;
854
1328
  if (!isEdit) {
855
1329
  columnOption = row.columnOption;
@@ -859,61 +1333,70 @@ export default {
859
1333
  if (!isChange && columnOption && Object.keys(columnOption).length) {
860
1334
  columnOption.required = row.required || false;
861
1335
  columnSelectedWidget.options = columnOption;
862
- if ('editDelete' == formatS) {
863
- columnSelectedWidget.options.hiddenByWf = columnSelectedWidget.options.hiddenByWf ?? true;
864
- columnSelectedWidget.options.prefixIcon = columnSelectedWidget.options.prefixIcon || "el-icon-delete";
865
- } else if ('editButton' == formatS) {
866
- columnSelectedWidget.options.prefixIcon = columnSelectedWidget.options.prefixIcon || "el-icon-edit";
1336
+ if ("editDelete" == formatS) {
1337
+ columnSelectedWidget.options.hiddenByWf =
1338
+ columnSelectedWidget.options.hiddenByWf ?? true;
1339
+ columnSelectedWidget.options.prefixIcon =
1340
+ columnSelectedWidget.options.prefixIcon || "el-icon-delete";
1341
+ } else if ("editButton" == formatS) {
1342
+ columnSelectedWidget.options.prefixIcon =
1343
+ columnSelectedWidget.options.prefixIcon || "el-icon-edit";
867
1344
  }
868
1345
  } else {
869
1346
  columnSelectedWidget.options.required = row.required || false;
870
1347
 
871
- if ('editDelete' == formatS) {
1348
+ if ("editDelete" == formatS) {
872
1349
  columnSelectedWidget.options.prefixIcon = "el-icon-delete";
873
1350
  columnSelectedWidget.options.label = "删除";
874
1351
  columnSelectedWidget.options.labelHidden = true;
875
1352
  columnSelectedWidget.options.hiddenByWf = true;
876
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.deleteRow(tableParam.row,tableParam.rowIndex);";
877
- } else if ('editButton' == formatS) {
1353
+ columnSelectedWidget.options.onClick =
1354
+ "let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.deleteRow(tableParam.row,tableParam.rowIndex);";
1355
+ } else if ("editButton" == formatS) {
878
1356
  columnSelectedWidget.options.prefixIcon = "el-icon-edit";
879
1357
  columnSelectedWidget.options.label = "查看";
880
1358
  columnSelectedWidget.options.labelHidden = true;
881
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.openEditDialog(tableParam.row)";
882
- } else if ('addSiblingEditRow' == formatS) {
1359
+ columnSelectedWidget.options.onClick =
1360
+ "let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.openEditDialog(tableParam.row)";
1361
+ } else if ("addSiblingEditRow" == formatS) {
883
1362
  columnSelectedWidget.options.prefixIcon = "el-icon-plus";
884
1363
  columnSelectedWidget.options.label = "新增兄弟节点";
885
1364
  columnSelectedWidget.options.labelHidden = false;
886
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().addSiblingTreeRow(null,tableParam);";
887
- } else if ('addChildTreeRow' == formatS) {
1365
+ columnSelectedWidget.options.onClick =
1366
+ "let tableParam = this.tableParam;\nthis.getParentTarget().addSiblingTreeRow(null,tableParam);";
1367
+ } else if ("addChildTreeRow" == formatS) {
888
1368
  columnSelectedWidget.options.prefixIcon = "el-icon-plus";
889
1369
  columnSelectedWidget.options.label = "新增子节点";
890
1370
  columnSelectedWidget.options.labelHidden = false;
891
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().addChildTreeRow(null,tableParam);";
892
- } else if ('moveUpRow' == formatS) {
1371
+ columnSelectedWidget.options.onClick =
1372
+ "let tableParam = this.tableParam;\nthis.getParentTarget().addChildTreeRow(null,tableParam);";
1373
+ } else if ("moveUpRow" == formatS) {
893
1374
  // columnSelectedWidget.options.prefixIcon = "el-icon-plus";
894
1375
  columnSelectedWidget.options.label = "↑上移";
895
1376
  columnSelectedWidget.options.labelHidden = false;
896
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().moveUpRow(tableParam);";
897
- } else if ('moveDownRow' == formatS) {
1377
+ columnSelectedWidget.options.onClick =
1378
+ "let tableParam = this.tableParam;\nthis.getParentTarget().moveUpRow(tableParam);";
1379
+ } else if ("moveDownRow" == formatS) {
898
1380
  // columnSelectedWidget.options.prefixIcon = "el-icon-plus";
899
1381
  columnSelectedWidget.options.label = "↓下移";
900
1382
  columnSelectedWidget.options.labelHidden = false;
901
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().moveDownRow(tableParam);";
902
- } else if ('removeTreeRow' == formatS) {
1383
+ columnSelectedWidget.options.onClick =
1384
+ "let tableParam = this.tableParam;\nthis.getParentTarget().moveDownRow(tableParam);";
1385
+ } else if ("removeTreeRow" == formatS) {
903
1386
  columnSelectedWidget.options.prefixIcon = "el-icon-delete";
904
1387
  columnSelectedWidget.options.label = "删除";
905
1388
  columnSelectedWidget.options.labelHidden = true;
906
- columnSelectedWidget.options.onClick = "let tableParam = this.tableParam;\nthis.getParentTarget().removeTreeRow(tableParam);";
1389
+ columnSelectedWidget.options.onClick =
1390
+ "let tableParam = this.tableParam;\nthis.getParentTarget().removeTreeRow(tableParam);";
907
1391
  }
908
1392
 
909
1393
  columnOption = columnSelectedWidget.options;
910
-
911
1394
  }
912
1395
 
913
1396
  // columnSelectedWidget.options.name = isEdit? (type + row.columnId) : row.prop;
914
1397
  // columnSelectedWidget.options.name = type + row.columnId;
915
1398
  // columnSelectedWidget.options.name = row.prop;
916
- if (columnSelectedWidget.options.hasOwnProperty('keyName')) {
1399
+ if (columnSelectedWidget.options.hasOwnProperty("keyName")) {
917
1400
  columnSelectedWidget.options.keyName = row.prop;
918
1401
  columnSelectedWidget.options.keyNameEnabled = true;
919
1402
  } else {
@@ -925,10 +1408,69 @@ export default {
925
1408
  columnSelectedWidget.options.labelHidden = true;
926
1409
  }
927
1410
  }
928
- return {columnSelectedWidget, columnEditFields};
1411
+ return { columnSelectedWidget, columnEditFields };
1412
+ },
1413
+ findColumnByColumnId(columnList, columnId) {
1414
+ let result = null;
1415
+ if (columnList) {
1416
+ let column = columnList.find((item) => item.columnId == columnId);
1417
+ if (!column) {
1418
+ }
1419
+ for (let column of columnList) {
1420
+ if (column.columnId == columnId) {
1421
+ result = column;
1422
+ break;
1423
+ } else if (column.children && column.children.length) {
1424
+ let subColumn = this.findColumnByColumnId(column.children, children);
1425
+ if (subColumn) {
1426
+ result = subColumn;
1427
+ break;
1428
+ }
1429
+ }
1430
+ }
1431
+ }
1432
+ return result;
1433
+ },
1434
+
1435
+ getRowWidget(row) {
1436
+ let widget = row.widget;
1437
+ if (!widget) {
1438
+ widget.options.a = a;
1439
+ widget.options.a = a;
1440
+ }
1441
+ return widget;
929
1442
  },
930
1443
  openFormatConfigDialog(row, index) {
931
- let option = row.columnOption;
1444
+ if (row.formatS == "widgetRender") {
1445
+ let formWidgetList = deepClone(this.designer.widgetList);
1446
+ let tableData = deepClone(this.tableData);
1447
+ let columnId = row.columnId;
1448
+
1449
+ let dataTableName = this.optionModel.name;
1450
+
1451
+ let targetColumn = null;
1452
+ loopHandleWidget(formWidgetList, (item) => {
1453
+ if (item.options.name == dataTableName) {
1454
+ item.options.tableColumns = tableData;
1455
+ targetColumn = this.findColumnByColumnId(item.options.tableColumns, columnId);
1456
+ }
1457
+ });
1458
+ let getWidgetList = (subWidgetList = []) => {
1459
+ targetColumn.widgetList = this.$baseLodash.cloneDeep(subWidgetList);
1460
+ return formWidgetList;
1461
+ };
1462
+ let sourceData = {
1463
+ formWidgetList,
1464
+ dataTableName,
1465
+ columnId,
1466
+ getWidgetList,
1467
+ };
1468
+
1469
+ this.openWidgetRenderDialog(row, sourceData);
1470
+ return;
1471
+ }
1472
+
1473
+ /*let option = row.columnOption;
932
1474
  let selectedWidget;
933
1475
  let columnWidgetConfig = this.getColumnWidgetConfig(row);
934
1476
  let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
@@ -936,35 +1478,45 @@ export default {
936
1478
  option = columnSelectedWidget.options;
937
1479
  selectedWidget = columnSelectedWidget;
938
1480
  } else {
939
- option = {}
1481
+ option = {};
940
1482
  selectedWidget = {};
941
1483
  }
942
1484
 
943
1485
  let columnOption = this.$baseLodash.cloneDeep(option);
944
- row.columnOption = columnOption;
1486
+ row.columnOption = columnOption;*/
1487
+ let selectedWidget = row.widget;
945
1488
  this.operateIndex = index;
946
1489
 
1490
+ let tableColumns = this.tableData;
947
1491
  this.openWidgetPropertyDialog({
948
1492
  row: row,
949
1493
  columnSelectedWidget: selectedWidget,
1494
+ tableColumns,
950
1495
  index: index,
951
- columnEditFields: columnEditFields,
1496
+ // columnEditFields: columnEditFields,
952
1497
  callback: (columnOption) => {
953
- this.confirmFormatConfigDialog(columnOption);
954
- }
955
- })
1498
+ this.confirmFormatConfigDialog(columnOption, row);
1499
+ },
1500
+ });
956
1501
  },
957
1502
  getFieldKeyNameByOptions(options) {
958
1503
  let o = options.name;
959
- return (
960
- (options.keyNameEnabled
961
- && options.keyName)
962
- || o
963
- );
1504
+ return (options.keyNameEnabled && options.keyName) || o;
964
1505
  },
965
- confirmFormatConfigDialog(columnOption) {
966
- let row = this.tableData[this.operateIndex];
1506
+ confirmFormatConfigDialog(columnOption, row) {
1507
+ // let row = this.tableData[this.operateIndex];
967
1508
  row.columnOption = columnOption;
1509
+
1510
+ if (row.widget) {
1511
+ row.widget.options = columnOption;
1512
+ } else {
1513
+ let type = this.columnFormatMap[row.formatS];
1514
+ let fieldWidget = this.designer.createColumnWidget(row, false);
1515
+ fieldWidget.options = columnOption;
1516
+ row.widget = fieldWidget;
1517
+ this.$forceUpdate();
1518
+ }
1519
+
968
1520
  let isButtontCell = this.getIsButtontCell(row.formatS);
969
1521
  if (!isButtontCell) {
970
1522
  row.prop = this.getFieldKeyNameByOptions(columnOption);
@@ -973,74 +1525,137 @@ export default {
973
1525
  }
974
1526
  },
975
1527
  openEditFormatConfigDialog(row, index) {
976
- let option = row.columnOption;
977
- let selectedWidget;
978
- let columnWidgetConfig = this.getColumnWidgetConfig(row, null, true);
979
- let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
980
- if (columnSelectedWidget) {
981
- option = columnSelectedWidget.options;
982
- selectedWidget = columnSelectedWidget;
983
- } else {
984
- option = {}
985
- selectedWidget = {};
986
- }
987
-
988
- let columnOption = this.$baseLodash.cloneDeep(option);
989
- row.editColumnOption = columnOption;
1528
+ let selectedWidget = row.editWidget;
990
1529
  this.operateIndex = index;
991
1530
 
1531
+ let tableColumns = this.tableData;
992
1532
  this.openWidgetPropertyDialog({
993
1533
  row: row,
1534
+ tableColumns,
994
1535
  columnSelectedWidget: selectedWidget,
995
1536
  index: index,
996
- columnEditFields: columnEditFields,
1537
+ // columnEditFields: columnEditFields,
997
1538
  callback: (columnOption) => {
998
- this.confirmEditFormatConfigDialog(columnOption);
999
- }
1000
- })
1539
+ this.confirmEditFormatConfigDialog(columnOption, row);
1540
+ },
1541
+ });
1001
1542
  },
1002
- confirmEditFormatConfigDialog(columnOption) {
1003
- let row = this.tableData[this.operateIndex];
1543
+ confirmEditFormatConfigDialog(columnOption, row) {
1544
+ // let row = this.tableData[this.operateIndex];
1004
1545
  row.editColumnOption = columnOption;
1546
+ // row.editWidget.options = columnOption;
1547
+
1548
+ if (row.editWidget) {
1549
+ row.editWidget.options = columnOption;
1550
+ } else {
1551
+ let type = this.columnFormatMap[row.editFormatS];
1552
+ let fieldWidget = this.designer.createColumnWidget(row, true);
1553
+ fieldWidget.options = columnOption;
1554
+ row.editWidget = fieldWidget;
1555
+ this.$forceUpdate();
1556
+ }
1557
+
1005
1558
  /*row.prop = columnOption.name;
1006
1559
  row.label = columnOption.label;
1007
1560
  row.required = columnOption.required;*/
1008
1561
  },
1009
1562
  openTableColumnConfigDialog(row, index) {
1010
1563
  this.operateIndex = index;
1564
+ this.currentTableColumn = row;
1011
1565
  let eventName = "tableColumnConfig";
1012
- let eventParams = ["dataId", "formCode"]
1013
- this.tableColumnConfigHeader = `${this.optionModel.name}.${eventName}(${eventParams.join(', ')}) {`;
1014
- this.tableColumnConfigCode = this.$baseLodash.cloneDeep(row.tableColumnConfig || '');
1566
+ let eventParams = ["dataId", "formCode"];
1567
+ this.tableColumnConfigHeader = `${
1568
+ this.optionModel.name
1569
+ }.${eventName}(${eventParams.join(", ")}) {`;
1570
+ this.tableColumnConfigCode = this.$baseLodash.cloneDeep(
1571
+ row.tableColumnConfig || ""
1572
+ );
1015
1573
 
1016
1574
  this.tableColumnConfigTitle = `自定义表格列属性配置(${row.label})`;
1017
1575
  this.showTableColumnConfigDialog = true;
1018
1576
  },
1019
1577
  saveTableColumnConfigDialog() {
1020
- let row = this.tableData[this.operateIndex];
1578
+ // let row = this.tableData[this.operateIndex];
1579
+ let row = this.currentTableColumn;
1021
1580
  const codeHints = this.$refs.ecEditor.getEditorAnnotations();
1022
1581
  let syntaxErrorFlag = false;
1023
1582
  if (!!codeHints && codeHints.length > 0) {
1024
- codeHints.forEach(chItem => {
1025
- if (chItem.type === 'error') {
1583
+ codeHints.forEach((chItem) => {
1584
+ if (chItem.type === "error") {
1026
1585
  syntaxErrorFlag = true;
1027
1586
  }
1028
1587
  });
1029
1588
 
1030
1589
  if (syntaxErrorFlag) {
1031
- this.$message.error(this.i18nt('designer.setting.syntaxCheckWarning'));
1590
+ this.$message.error(this.i18nt("designer.setting.syntaxCheckWarning"));
1032
1591
  return;
1033
1592
  }
1034
1593
  }
1035
- this.$set(row, 'tableColumnConfig', this.$baseLodash.cloneDeep(this.tableColumnConfigCode))
1594
+ this.$set(
1595
+ row,
1596
+ "tableColumnConfig",
1597
+ this.$baseLodash.cloneDeep(this.tableColumnConfigCode)
1598
+ );
1036
1599
  this.showTableColumnConfigDialog = false;
1600
+ },
1601
+ changeRowLabel(row) {
1602
+ this.setRowWidgetAttars(row, "label", row.label);
1603
+ },
1604
+ changeRowProp(row) {
1605
+ this.setRowWidgetAttars(row, "keyName", row.prop);
1606
+ },
1607
+ changeRowRequired(row) {
1608
+ this.setRowWidgetAttars(row, "required", row.required);
1609
+ },
1610
+ setRowWidgetAttars(row, key, value) {
1611
+ let type1 = this.columnFormatMap[row.formatS];
1612
+ let type2 = this.columnFormatMap[row.editFormatS];
1613
+ let newWidget = type1
1614
+ ? this.designer.copyNewFieldWidget(this.designer.getFieldWidgetByType(type1))
1615
+ : null;
1616
+
1617
+ let newEditWidget = type2
1618
+ ? this.designer.copyNewFieldWidget(this.designer.getFieldWidgetByType(type2))
1619
+ : null;
1037
1620
 
1621
+ if (newWidget.formItemFlag) {
1622
+ if (row.widget) {
1623
+ if (row.widget.options[key] !== undefined) row.widget.options[key] = value;
1624
+ }
1625
+ if (row.columnOption) {
1626
+ if (row.columnOption[key] !== undefined) row.columnOption[key] = value;
1627
+ }
1628
+ }
1629
+
1630
+ if (newWidget.formItemFlag) {
1631
+ if (row.editWidget) {
1632
+ if (row.editWidget.options[key] !== undefined)
1633
+ row.editWidget.options[key] = value;
1634
+ }
1635
+ if (row.editColumnOption) {
1636
+ if (row.editColumnOption[key] !== undefined) row.editColumnOption[key] = value;
1637
+ }
1638
+ }
1038
1639
  },
1039
- }
1040
- }
1640
+ openRowEditDialog(row, index) {
1641
+ this.editRowData = row;
1642
+ this.rowData = this.$baseLodash.cloneDeep(row);
1643
+ this.rowDataIndex = index;
1644
+ this.showRowEditDialog = true;
1645
+ },
1646
+ submitRowEditDialog() {
1647
+ Object.assign(this.editRowData, this.$baseLodash.cloneDeep(this.rowData));
1648
+ // this.editRowData = this.$baseLodash.cloneDeep(this.rowData);
1649
+ this.showRowEditDialog = false;
1650
+ },
1651
+ closeRowEditDialog() {
1652
+ this.showRowEditDialog = false;
1653
+ },
1654
+ },
1655
+ };
1041
1656
  </script>
1042
1657
  <style scoped lang="scss">
1043
1658
  .icon-drag:before {
1044
- content: '\e61d';
1659
+ content: "\e61d";
1045
1660
  }
1046
1661
  </style>