cloud-web-corejs 1.0.54-dev.32 → 1.0.54-dev.320

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