cloud-web-corejs 1.0.54-dev.21 → 1.0.54-dev.211

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