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