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