cloud-web-corejs 1.0.54-dev.27 → 1.0.54-dev.272

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