cloud-web-corejs 1.0.54-dev.44 → 1.0.54-dev.440

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