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