@epxing/designer 0.0.0-stage → 5.3.0-beta.2
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/API.md +160 -0
- package/README.md +45 -2
- package/dist/_virtual/_plugin-vue_export-helper.js +10 -0
- package/dist/_virtual/preload-helper.js +88 -0
- package/dist/assets/default-icon-2193FMjv.png +0 -0
- package/dist/assets/technology_bg-oWIS2awO.jpg +0 -0
- package/dist/assets/theme_black-Ctdygcr4.png +0 -0
- package/dist/assets/theme_technology-DJk-2e7g.png +0 -0
- package/dist/assets/theme_white-uMQ6JYml.png +0 -0
- package/dist/src/assets/images/dashboard/theme_black.png.js +4 -0
- package/dist/src/assets/images/dashboard/theme_technology.png.js +4 -0
- package/dist/src/assets/images/dashboard/theme_white.png.js +4 -0
- package/dist/src/assets/images/default-icon.png.js +4 -0
- package/dist/src/index.js +53 -0
- package/dist/src/page-designer/PageConfigPreview.js +102 -0
- package/dist/src/page-designer/PageDesigner.js +844 -0
- package/dist/src/page-designer/designer.js +1120 -0
- package/dist/src/page-designer/index.js +52 -0
- package/dist/src/page-designer/mixins/dragSourceMixin.js +95 -0
- package/dist/src/page-designer/page-variable-panel/JsonEditor.js +106 -0
- package/dist/src/page-designer/page-variable-panel/PageVariablePanel.js +939 -0
- package/dist/src/page-designer/page-variable-panel/index.js +7 -0
- package/dist/src/page-designer/page-variable-panel/jsonlint.js +230 -0
- package/dist/src/page-designer/previews/add-form/Preview.js +8 -0
- package/dist/src/page-designer/previews/add-form/Preview.vue.js +328 -0
- package/dist/src/page-designer/previews/add-form-item/Preview.js +194 -0
- package/dist/src/page-designer/previews/button/Preview.js +30 -0
- package/dist/src/page-designer/previews/card/Preview.js +87 -0
- package/dist/src/page-designer/previews/carousel/CarouselItemPreview.js +33 -0
- package/dist/src/page-designer/previews/carousel/Preview.js +61 -0
- package/dist/src/page-designer/previews/collapse/CollapseItemPreview.js +118 -0
- package/dist/src/page-designer/previews/collapse/Preview.js +35 -0
- package/dist/src/page-designer/previews/dropdown/Preview.js +68 -0
- package/dist/src/page-designer/previews/entity-list/Preview.js +522 -0
- package/dist/src/page-designer/previews/entity-sub-list/Preview.js +352 -0
- package/dist/src/page-designer/previews/entity-virtual-list/Preview.js +11 -0
- package/dist/src/page-designer/previews/form-field/preview/Checkbox.js +91 -0
- package/dist/src/page-designer/previews/form-field/preview/Date.js +77 -0
- package/dist/src/page-designer/previews/form-field/preview/Input.js +74 -0
- package/dist/src/page-designer/previews/form-field/preview/InputNumber.js +74 -0
- package/dist/src/page-designer/previews/form-field/preview/Object.js +77 -0
- package/dist/src/page-designer/previews/form-field/preview/Radio.js +146 -0
- package/dist/src/page-designer/previews/form-field/preview/Select.js +78 -0
- package/dist/src/page-designer/previews/form-field/preview/Textarea.js +78 -0
- package/dist/src/page-designer/previews/grid/Preview.js +139 -0
- package/dist/src/page-designer/previews/html/Preview.js +18 -0
- package/dist/src/page-designer/previews/icon/Preview.js +20 -0
- package/dist/src/page-designer/previews/image/Preview.js +36 -0
- package/dist/src/page-designer/previews/index.js +74 -0
- package/dist/src/page-designer/previews/layout/ColumnPreview.js +47 -0
- package/dist/src/page-designer/previews/layout/Preview.js +110 -0
- package/dist/src/page-designer/previews/num/Preview.js +132 -0
- package/dist/src/page-designer/previews/page-tabs/Preview.js +75 -0
- package/dist/src/page-designer/previews/step/Preview.js +207 -0
- package/dist/src/page-designer/previews/tabs/Preview.js +95 -0
- package/dist/src/page-designer/previews/tabs/tab-pane/Preview.js +33 -0
- package/dist/src/page-designer/previews/text/Preview.js +38 -0
- package/dist/src/page-designer/previews/text-editor/Preview.js +23 -0
- package/dist/src/page-designer/previews/video/Preview.js +10 -0
- package/dist/src/page-designer/setting-panel/Advance.js +281 -0
- package/dist/src/page-designer/setting-panel/CodeEditor.js +94 -0
- package/dist/src/page-designer/setting-panel/Property.js +165 -0
- package/dist/src/page-designer/setting-panel/Setting.js +296 -0
- package/dist/src/page-designer/setting-panel/Style.js +1591 -0
- package/dist/src/page-designer/setting-panel/css-editor/CssEditor.js +98 -0
- package/dist/src/page-designer/setting-panel/css-editor/css-hint.js +84 -0
- package/dist/src/page-designer/setting-panel/index.js +11 -0
- package/dist/src/page-designer/template-attribute-panel/TemplateAttributePanel.js +487 -0
- package/dist/src/page-designer/template-attribute-panel/index.js +5 -0
- package/dist/src/page-designer/template-library/Library.js +219 -0
- package/dist/src/page-designer/template-library/index.js +5 -0
- package/dist/src/page-designer/widget-library/Base.js +170 -0
- package/dist/src/page-designer/widget-library/Library.js +213 -0
- package/dist/src/page-designer/widget-library/index.js +7 -0
- package/dist/src/page-designer/widget-preview/Container.js +80 -0
- package/dist/src/page-designer/widget-preview/DragGhost.js +54 -0
- package/dist/src/page-designer/widget-preview/DropZoneOverlay.js +42 -0
- package/dist/src/page-designer/widget-preview/HoverOverlay.js +61 -0
- package/dist/src/page-designer/widget-preview/Mixin.js +260 -0
- package/dist/src/page-designer/widget-preview/Placeholder.js +28 -0
- package/dist/src/page-designer/widget-preview/Preview.js +277 -0
- package/dist/src/page-designer/widget-preview/PreviewItem.js +83 -0
- package/dist/src/page-designer/widget-preview/SelectedOverlay.js +332 -0
- package/dist/src/page-designer/widget-preview/Template.js +66 -0
- package/dist/src/page-designer/widget-preview/WidgetWrapper.js +170 -0
- package/dist/src/page-designer/widget-preview/directive.js +159 -0
- package/dist/src/page-designer/widget-preview/dropPosition.js +50 -0
- package/dist/src/page-designer/widget-preview/index.js +23 -0
- package/dist/src/page-designer/widget-preview/overlayPositionMixin.js +87 -0
- package/dist/src/page-designer/widget-preview/resolvePreviewName.js +32 -0
- package/dist/src/page-designer/widget-tree/Item.js +580 -0
- package/dist/src/page-designer/widget-tree/Tree.js +855 -0
- package/dist/src/page-designer/widget-tree/index.js +7 -0
- package/dist/src/visual/AddForm.js +172 -0
- package/dist/src/visual/AddFormItem.js +480 -0
- package/dist/src/visual/AppIndex.js +243 -0
- package/dist/src/visual/ApplyForm.js +135 -0
- package/dist/src/visual/AttributeList.js +344 -0
- package/dist/src/visual/BasePage.js +77 -0
- package/dist/src/visual/Button.js +5 -0
- package/dist/src/visual/Button.vue.js +89 -0
- package/dist/src/visual/CardNum.js +74 -0
- package/dist/src/visual/CategoryList.js +569 -0
- package/dist/src/visual/Chart.js +27 -0
- package/dist/src/visual/ChartNew.js +5 -0
- package/dist/src/visual/ChartNew.vue.js +54 -0
- package/dist/src/visual/CheckForm.js +110 -0
- package/dist/src/visual/ClientList.js +41 -0
- package/dist/src/visual/CodeManage.js +113 -0
- package/dist/src/visual/Component.js +6 -0
- package/dist/src/visual/Component.vue.js +1332 -0
- package/dist/src/visual/ComponentList.js +280 -0
- package/dist/src/visual/Config.js +8 -0
- package/dist/src/visual/Config.vue.js +862 -0
- package/dist/src/visual/ConfigItem.js +8 -0
- package/dist/src/visual/ConfigItem.vue.js +192 -0
- package/dist/src/visual/ConfigSelectItems.js +8 -0
- package/dist/src/visual/ConfigSelectItems.vue.js +260 -0
- package/dist/src/visual/CreatePage.js +389 -0
- package/dist/src/visual/DashboardDiv.js +58 -0
- package/dist/src/visual/DashboardTabs.js +9 -0
- package/dist/src/visual/DashboardTabs.vue.js +127 -0
- package/dist/src/visual/DashboardWidget.js +5 -0
- package/dist/src/visual/DashboardWidget.vue.js +62 -0
- package/dist/src/visual/DblogList.js +82 -0
- package/dist/src/visual/EntityAddPage.js +49 -0
- package/dist/src/visual/EntityApplyPage.js +54 -0
- package/dist/src/visual/EntityCardList.js +455 -0
- package/dist/src/visual/EntityCheckPage.js +66 -0
- package/dist/src/visual/EntityFindPage.js +45 -0
- package/dist/src/visual/EntityList.js +6 -0
- package/dist/src/visual/EntityList.vue.js +1221 -0
- package/dist/src/visual/EntityListPage.js +43 -0
- package/dist/src/visual/EntityNoSubmitSubList.js +267 -0
- package/dist/src/visual/EntityRightSubList.js +29 -0
- package/dist/src/visual/EntitySubAdd.js +10 -0
- package/dist/src/visual/EntitySubGridItem.js +66 -0
- package/dist/src/visual/EntitySubList.js +434 -0
- package/dist/src/visual/EntityTreeFindPage.js +32 -0
- package/dist/src/visual/EntityTreeManage.js +49 -0
- package/dist/src/visual/EntityTreePage.js +42 -0
- package/dist/src/visual/ExcelPreview.js +10 -0
- package/dist/src/visual/FormField.js +5 -0
- package/dist/src/visual/FormField.vue.js +121 -0
- package/dist/src/visual/HeaderNew.js +161 -0
- package/dist/src/visual/Html.js +8 -0
- package/dist/src/visual/Html.vue.js +109 -0
- package/dist/src/visual/Import.js +53 -0
- package/dist/src/visual/InterfaceSubList.js +21 -0
- package/dist/src/visual/ListFirst.js +704 -0
- package/dist/src/visual/MEntityAddPage.js +66 -0
- package/dist/src/visual/MEntityList.js +485 -0
- package/dist/src/visual/MEntityListPage.js +40 -0
- package/dist/src/visual/MEntitySubList.js +237 -0
- package/dist/src/visual/MetaList.js +23 -0
- package/dist/src/visual/ModuleIndexPage.js +67 -0
- package/dist/src/visual/ModuleList.js +47 -0
- package/dist/src/visual/NavAddForm.js +173 -0
- package/dist/src/visual/NavFormCatalogItem.js +44 -0
- package/dist/src/visual/NumItem.js +70 -0
- package/dist/src/visual/NumStatistic.js +6 -0
- package/dist/src/visual/NumStatistic.vue.js +81 -0
- package/dist/src/visual/OrgChart.js +107 -0
- package/dist/src/visual/PageCatalog.js +27 -0
- package/dist/src/visual/PageConfig.js +223 -0
- package/dist/src/visual/PageTabs.js +49 -0
- package/dist/src/visual/Progress.js +40 -0
- package/dist/src/visual/ProgressItem.js +44 -0
- package/dist/src/visual/SystemManager.js +77 -0
- package/dist/src/visual/Title.js +45 -0
- package/dist/src/visual/TodoList.js +14 -0
- package/dist/src/visual/UserFormItem.js +41 -0
- package/dist/src/visual/UserManage.js +35 -0
- package/dist/src/visual/chart/CircularPie.js +9 -0
- package/dist/src/visual/chart/Column.js +70 -0
- package/dist/src/visual/chart/HoriColumn.js +9 -0
- package/dist/src/visual/chart/Line.js +9 -0
- package/dist/src/visual/chart/Pie.js +9 -0
- package/dist/src/visual/config/Background.js +526 -0
- package/dist/src/visual/config/Chart.js +154 -0
- package/dist/src/visual/config/Checkbox.js +63 -0
- package/dist/src/visual/config/Color.js +41 -0
- package/dist/src/visual/config/DesignReport.js +24 -0
- package/dist/src/visual/config/Event.js +304 -0
- package/dist/src/visual/config/Field.js +520 -0
- package/dist/src/visual/config/Font.js +202 -0
- package/dist/src/visual/config/FormItem.js +23 -0
- package/dist/src/visual/config/Function.js +114 -0
- package/dist/src/visual/config/Html.js +111 -0
- package/dist/src/visual/config/Image.js +102 -0
- package/dist/src/visual/config/Input.js +177 -0
- package/dist/src/visual/config/Input.vue.js +479 -0
- package/dist/src/visual/config/LazyDialog.js +41 -0
- package/dist/src/visual/config/List.js +65 -0
- package/dist/src/visual/config/ListField.js +2080 -0
- package/dist/src/visual/config/MField.js +733 -0
- package/dist/src/visual/config/Number.js +37 -0
- package/dist/src/visual/config/Object.js +168 -0
- package/dist/src/visual/config/Operate.js +1109 -0
- package/dist/src/visual/config/OperateItem.js +1186 -0
- package/dist/src/visual/config/Options.js +8 -0
- package/dist/src/visual/config/Options.vue.js +278 -0
- package/dist/src/visual/config/OrderField.js +505 -0
- package/dist/src/visual/config/Page.js +76 -0
- package/dist/src/visual/config/Params.js +353 -0
- package/dist/src/visual/config/Radio.js +127 -0
- package/dist/src/visual/config/Row.js +104 -0
- package/dist/src/visual/config/Scope.js +350 -0
- package/dist/src/visual/config/Select.js +95 -0
- package/dist/src/visual/config/Switch.js +37 -0
- package/dist/src/visual/config/Textarea.js +175 -0
- package/dist/src/visual/config/Textarea.vue.js +507 -0
- package/dist/src/visual/config/Tree.js +138 -0
- package/dist/src/visual/config/remote-cache.js +30 -0
- package/dist/src/visual/config/show-condition.js +20 -0
- package/dist/src/visual/config/variable-sources.js +27 -0
- package/dist/src/visual/config/wait-ref.js +19 -0
- package/dist/src/visual/config-page/ComponentLibrary.js +170 -0
- package/dist/src/visual/config-page/ComponentLibraryDialog.js +250 -0
- package/dist/src/visual/config-page/ComponentList.js +9 -0
- package/dist/src/visual/config-page/ComponentList.vue.js +292 -0
- package/dist/src/visual/config-page/ComponentPreview.js +8 -0
- package/dist/src/visual/config-page/ComponentPreview.vue.js +151 -0
- package/dist/src/visual/config-page/ConfigOption.js +13 -0
- package/dist/src/visual/config-page/ConfigPanel.js +302 -0
- package/dist/src/visual/config-page/Dashboard.js +2160 -0
- package/dist/src/visual/config-page/DashboardDesign.js +606 -0
- package/dist/src/visual/config-page/DashboardGlobalConfig.js +6 -0
- package/dist/src/visual/config-page/DashboardGlobalConfig.vue.js +292 -0
- package/dist/src/visual/config-page/DashboardMobile.js +1115 -0
- package/dist/src/visual/config-page/DashboardSetting.js +86 -0
- package/dist/src/visual/config-page/PagePreview.js +8 -0
- package/dist/src/visual/config-page/PagePreview.vue.js +72 -0
- package/dist/src/visual/config-page/StyleConfig.js +979 -0
- package/dist/src/visual/config-page/VisualConfigPage.js +645 -0
- package/dist/src/visual/config-page/dashboard-theme-setting/Background.js +180 -0
- package/dist/src/visual/config-page/dashboard-theme-setting/Border.js +314 -0
- package/dist/src/visual/config-page/dashboard-theme-setting/Font.js +192 -0
- package/dist/src/visual/config-page/dashboard-theme-setting/Index.js +545 -0
- package/dist/src/visual/config-page/dashboard-theme-setting/Shadow.js +174 -0
- package/dist/src/visual/config-page/index.js +90 -0
- package/dist/src/visual/index.js +151 -0
- package/dist/src/visual/mixins/innerGridMixin.js +122 -0
- package/dist/src/visual/search/Filter.js +49 -0
- package/dist/src/visual/step/Index.js +8 -0
- package/dist/src/visual/step/Index.vue.js +485 -0
- package/dist/src/visual/step/Item.js +139 -0
- package/dist/src/visual/widgets/CardFormItemVisual.js +45 -0
- package/dist/src/visual/widgets/CarouselVisual.js +8 -0
- package/dist/src/visual/widgets/CarouselVisual.vue.js +303 -0
- package/dist/src/visual/widgets/CollapseVisual.js +8 -0
- package/dist/src/visual/widgets/CollapseVisual.vue.js +202 -0
- package/dist/src/visual/widgets/DropdownVisual.js +8 -0
- package/dist/src/visual/widgets/DropdownVisual.vue.js +955 -0
- package/dist/src/visual/widgets/LayoutConfig.js +8 -0
- package/dist/src/visual/widgets/LayoutConfig.vue.js +168 -0
- package/dist/src/visual/widgets/ListVisual.js +349 -0
- package/dist/src/visual/widgets/MEntityListFindVisual.js +76 -0
- package/dist/src/visual/widgets/ProcessFormItemVisual.js +5 -0
- package/dist/src/visual/widgets/ProcessFormItemVisual.vue.js +45 -0
- package/dist/src/visual/widgets/TabsConfig.js +8 -0
- package/dist/src/visual/widgets/TabsConfig.vue.js +343 -0
- package/dist/style.css +9907 -0
- package/package.json +104 -3
- package/src/index.js +27 -0
- package/src/page-designer/PageConfigPreview.vue +103 -0
- package/src/page-designer/PageDesigner.vue +1017 -0
- package/src/page-designer/designer.js +1299 -0
- package/src/page-designer/index.js +38 -0
- package/src/page-designer/mixins/dragSourceMixin.js +113 -0
- package/src/page-designer/page-variable-panel/JsonEditor.vue +109 -0
- package/src/page-designer/page-variable-panel/PageVariablePanel.vue +781 -0
- package/src/page-designer/page-variable-panel/index.js +6 -0
- package/src/page-designer/page-variable-panel/jsonlint.js +2 -0
- package/src/page-designer/previews/add-form/Preview.vue +331 -0
- package/src/page-designer/previews/add-form-item/Preview.vue +167 -0
- package/src/page-designer/previews/button/Preview.vue +27 -0
- package/src/page-designer/previews/card/Preview.vue +78 -0
- package/src/page-designer/previews/carousel/CarouselItemPreview.vue +32 -0
- package/src/page-designer/previews/carousel/Preview.vue +36 -0
- package/src/page-designer/previews/collapse/CollapseItemPreview.vue +136 -0
- package/src/page-designer/previews/collapse/Preview.vue +28 -0
- package/src/page-designer/previews/dropdown/Preview.vue +21 -0
- package/src/page-designer/previews/entity-list/Preview.vue +382 -0
- package/src/page-designer/previews/entity-sub-list/Preview.vue +283 -0
- package/src/page-designer/previews/entity-virtual-list/Preview.vue +14 -0
- package/src/page-designer/previews/form-field/preview/Checkbox.vue +57 -0
- package/src/page-designer/previews/form-field/preview/Date.vue +56 -0
- package/src/page-designer/previews/form-field/preview/Input.vue +53 -0
- package/src/page-designer/previews/form-field/preview/InputNumber.vue +53 -0
- package/src/page-designer/previews/form-field/preview/Object.vue +53 -0
- package/src/page-designer/previews/form-field/preview/Radio.vue +69 -0
- package/src/page-designer/previews/form-field/preview/Select.vue +55 -0
- package/src/page-designer/previews/form-field/preview/Textarea.vue +57 -0
- package/src/page-designer/previews/grid/Preview.vue +156 -0
- package/src/page-designer/previews/html/Preview.vue +11 -0
- package/src/page-designer/previews/icon/Preview.vue +12 -0
- package/src/page-designer/previews/image/Preview.vue +37 -0
- package/src/page-designer/previews/index.js +74 -0
- package/src/page-designer/previews/layout/ColumnPreview.vue +89 -0
- package/src/page-designer/previews/layout/Preview.vue +96 -0
- package/src/page-designer/previews/num/Preview.vue +100 -0
- package/src/page-designer/previews/page-tabs/Preview.vue +53 -0
- package/src/page-designer/previews/step/Preview.vue +190 -0
- package/src/page-designer/previews/tabs/Preview.vue +66 -0
- package/src/page-designer/previews/tabs/tab-pane/Preview.vue +32 -0
- package/src/page-designer/previews/text/Preview.vue +26 -0
- package/src/page-designer/previews/text-editor/Preview.vue +14 -0
- package/src/page-designer/previews/video/Preview.vue +9 -0
- package/src/page-designer/setting-panel/Advance.vue +175 -0
- package/src/page-designer/setting-panel/CodeEditor.vue +88 -0
- package/src/page-designer/setting-panel/Property.vue +163 -0
- package/src/page-designer/setting-panel/Setting.vue +271 -0
- package/src/page-designer/setting-panel/Style.vue +1096 -0
- package/src/page-designer/setting-panel/css-editor/CssEditor.vue +93 -0
- package/src/page-designer/setting-panel/css-editor/css-hint.js +58 -0
- package/src/page-designer/setting-panel/index.js +10 -0
- package/src/page-designer/template-attribute-panel/TemplateAttributePanel.vue +383 -0
- package/src/page-designer/template-attribute-panel/index.js +2 -0
- package/src/page-designer/template-library/Library.vue +153 -0
- package/src/page-designer/template-library/index.js +4 -0
- package/src/page-designer/widget-library/Base.vue +156 -0
- package/src/page-designer/widget-library/Library.vue +282 -0
- package/src/page-designer/widget-library/index.js +6 -0
- package/src/page-designer/widget-preview/Container.vue +89 -0
- package/src/page-designer/widget-preview/DragGhost.vue +83 -0
- package/src/page-designer/widget-preview/DropZoneOverlay.vue +51 -0
- package/src/page-designer/widget-preview/HoverOverlay.vue +85 -0
- package/src/page-designer/widget-preview/Mixin.js +285 -0
- package/src/page-designer/widget-preview/Placeholder.vue +22 -0
- package/src/page-designer/widget-preview/Preview.vue +322 -0
- package/src/page-designer/widget-preview/PreviewItem.vue +162 -0
- package/src/page-designer/widget-preview/SelectedOverlay.vue +340 -0
- package/src/page-designer/widget-preview/Template.vue +77 -0
- package/src/page-designer/widget-preview/WidgetWrapper.vue +197 -0
- package/src/page-designer/widget-preview/directive.js +258 -0
- package/src/page-designer/widget-preview/dropPosition.js +51 -0
- package/src/page-designer/widget-preview/index.js +23 -0
- package/src/page-designer/widget-preview/overlayPositionMixin.js +88 -0
- package/src/page-designer/widget-preview/resolvePreviewName.js +33 -0
- package/src/page-designer/widget-tree/Item.vue +719 -0
- package/src/page-designer/widget-tree/Tree.vue +995 -0
- package/src/page-designer/widget-tree/index.js +6 -0
- package/src/visual/AddForm.vue +172 -0
- package/src/visual/AddFormItem.vue +482 -0
- package/src/visual/AppIndex.vue +245 -0
- package/src/visual/ApplyForm.vue +140 -0
- package/src/visual/AttributeList.vue +344 -0
- package/src/visual/BasePage.vue +76 -0
- package/src/visual/Button.vue +80 -0
- package/src/visual/CardNum.vue +73 -0
- package/src/visual/CategoryList.vue +563 -0
- package/src/visual/Chart.vue +29 -0
- package/src/visual/ChartNew.vue +49 -0
- package/src/visual/CheckForm.vue +106 -0
- package/src/visual/ClientList.vue +42 -0
- package/src/visual/CodeManage.vue +116 -0
- package/src/visual/Component.vue +1342 -0
- package/src/visual/ComponentList.vue +280 -0
- package/src/visual/Config.vue +881 -0
- package/src/visual/ConfigItem.vue +218 -0
- package/src/visual/ConfigSelectItems.vue +445 -0
- package/src/visual/CreatePage.vue +389 -0
- package/src/visual/DashboardDiv.vue +197 -0
- package/src/visual/DashboardTabs.vue +118 -0
- package/src/visual/DashboardWidget.vue +55 -0
- package/src/visual/DblogList.vue +84 -0
- package/src/visual/EntityAddPage.vue +52 -0
- package/src/visual/EntityApplyPage.vue +57 -0
- package/src/visual/EntityCardList.vue +449 -0
- package/src/visual/EntityCheckPage.vue +69 -0
- package/src/visual/EntityFindPage.vue +55 -0
- package/src/visual/EntityList.vue +838 -0
- package/src/visual/EntityListPage.vue +97 -0
- package/src/visual/EntityNoSubmitSubList.vue +273 -0
- package/src/visual/EntityRightSubList.vue +32 -0
- package/src/visual/EntitySubAdd.vue +11 -0
- package/src/visual/EntitySubGridItem.vue +67 -0
- package/src/visual/EntitySubList.vue +440 -0
- package/src/visual/EntityTreeFindPage.vue +36 -0
- package/src/visual/EntityTreeManage.vue +50 -0
- package/src/visual/EntityTreePage.vue +45 -0
- package/src/visual/ExcelPreview.vue +11 -0
- package/src/visual/FormField.vue +113 -0
- package/src/visual/HeaderNew.vue +176 -0
- package/src/visual/Html.vue +104 -0
- package/src/visual/Import.vue +55 -0
- package/src/visual/InterfaceSubList.vue +23 -0
- package/src/visual/ListFirst.vue +614 -0
- package/src/visual/MEntityAddPage.vue +71 -0
- package/src/visual/MEntityList.vue +488 -0
- package/src/visual/MEntityListPage.vue +46 -0
- package/src/visual/MEntitySubList.vue +237 -0
- package/src/visual/MetaList.vue +24 -0
- package/src/visual/ModuleIndexPage.vue +70 -0
- package/src/visual/ModuleList.vue +46 -0
- package/src/visual/NavAddForm.vue +177 -0
- package/src/visual/NavFormCatalogItem.vue +47 -0
- package/src/visual/NumItem.vue +69 -0
- package/src/visual/NumStatistic.vue +242 -0
- package/src/visual/OrgChart.vue +113 -0
- package/src/visual/PageCatalog.vue +26 -0
- package/src/visual/PageConfig.vue +278 -0
- package/src/visual/PageTabs.vue +55 -0
- package/src/visual/Progress.vue +39 -0
- package/src/visual/ProgressItem.vue +43 -0
- package/src/visual/SystemManager.vue +80 -0
- package/src/visual/Title.vue +44 -0
- package/src/visual/TodoList.vue +18 -0
- package/src/visual/UserFormItem.vue +49 -0
- package/src/visual/UserManage.vue +36 -0
- package/src/visual/chart/CircularPie.vue +7 -0
- package/src/visual/chart/Column.vue +73 -0
- package/src/visual/chart/HoriColumn.vue +7 -0
- package/src/visual/chart/Line.vue +7 -0
- package/src/visual/chart/Pie.vue +7 -0
- package/src/visual/config/Background.vue +398 -0
- package/src/visual/config/Chart.vue +139 -0
- package/src/visual/config/Checkbox.vue +64 -0
- package/src/visual/config/Color.vue +40 -0
- package/src/visual/config/DesignReport.vue +20 -0
- package/src/visual/config/Event.vue +220 -0
- package/src/visual/config/Field.vue +597 -0
- package/src/visual/config/Font.vue +149 -0
- package/src/visual/config/FormItem.vue +25 -0
- package/src/visual/config/Function.vue +78 -0
- package/src/visual/config/Html.vue +98 -0
- package/src/visual/config/Image.vue +132 -0
- package/src/visual/config/Input.vue +712 -0
- package/src/visual/config/LazyDialog.vue +44 -0
- package/src/visual/config/List.vue +68 -0
- package/src/visual/config/ListField.vue +1714 -0
- package/src/visual/config/MField.vue +601 -0
- package/src/visual/config/Number.vue +41 -0
- package/src/visual/config/Object.vue +177 -0
- package/src/visual/config/Operate.vue +1083 -0
- package/src/visual/config/OperateItem.vue +917 -0
- package/src/visual/config/Options.vue +330 -0
- package/src/visual/config/OrderField.vue +587 -0
- package/src/visual/config/Page.vue +45 -0
- package/src/visual/config/Params.vue +228 -0
- package/src/visual/config/Radio.vue +93 -0
- package/src/visual/config/Row.vue +78 -0
- package/src/visual/config/Scope.vue +363 -0
- package/src/visual/config/Select.vue +93 -0
- package/src/visual/config/Switch.vue +36 -0
- package/src/visual/config/Textarea.vue +754 -0
- package/src/visual/config/Tree.vue +135 -0
- package/src/visual/config/remote-cache.js +35 -0
- package/src/visual/config/show-condition.js +21 -0
- package/src/visual/config/variable-sources.js +27 -0
- package/src/visual/config/wait-ref.js +17 -0
- package/src/visual/config-page/ComponentLibrary.vue +220 -0
- package/src/visual/config-page/ComponentLibraryDialog.vue +262 -0
- package/src/visual/config-page/ComponentList.vue +580 -0
- package/src/visual/config-page/ComponentPreview.vue +206 -0
- package/src/visual/config-page/ConfigOption.vue +16 -0
- package/src/visual/config-page/ConfigPanel.vue +301 -0
- package/src/visual/config-page/Dashboard.vue +2331 -0
- package/src/visual/config-page/DashboardDesign.vue +656 -0
- package/src/visual/config-page/DashboardGlobalConfig.vue +158 -0
- package/src/visual/config-page/DashboardMobile.vue +1118 -0
- package/src/visual/config-page/DashboardSetting.vue +47 -0
- package/src/visual/config-page/PagePreview.vue +105 -0
- package/src/visual/config-page/StyleConfig.vue +656 -0
- package/src/visual/config-page/VisualConfigPage.vue +746 -0
- package/src/visual/config-page/dashboard-theme-setting/Background.vue +98 -0
- package/src/visual/config-page/dashboard-theme-setting/Border.vue +185 -0
- package/src/visual/config-page/dashboard-theme-setting/Font.vue +101 -0
- package/src/visual/config-page/dashboard-theme-setting/Index.vue +471 -0
- package/src/visual/config-page/dashboard-theme-setting/Shadow.vue +102 -0
- package/src/visual/config-page/index.js +93 -0
- package/src/visual/index.js +23 -0
- package/src/visual/mixins/innerGridMixin.js +128 -0
- package/src/visual/search/Filter.vue +50 -0
- package/src/visual/step/Index.vue +361 -0
- package/src/visual/step/Item.vue +140 -0
- package/src/visual/widgets/CardFormItemVisual.vue +46 -0
- package/src/visual/widgets/CarouselVisual.vue +291 -0
- package/src/visual/widgets/CollapseVisual.vue +203 -0
- package/src/visual/widgets/DropdownVisual.vue +541 -0
- package/src/visual/widgets/LayoutConfig.vue +186 -0
- package/src/visual/widgets/ListVisual.vue +349 -0
- package/src/visual/widgets/MEntityListFindVisual.vue +77 -0
- package/src/visual/widgets/ProcessFormItemVisual.vue +58 -0
- package/src/visual/widgets/TabsConfig.vue +266 -0
- package/types/index.d.ts +22 -0
- package/types/page-designer.d.ts +3 -0
- package/types/visual-component.d.ts +1 -0
- package/types/visual-entity-list.d.ts +1 -0
- package/types/visual-entity-sub-list.d.ts +1 -0
|
@@ -0,0 +1,656 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="['epx-dashboard', 'epx-dashboard-'+ pageId ,'dashboard-design', 'dashboard-design--'+ theme, { 'is-mobile-preview': mobilePreview }]" :style="dashboardStyle" ref="dashboard">
|
|
3
|
+
<epx-dashboard-design-grid
|
|
4
|
+
v-if="layout.length>0"
|
|
5
|
+
ref="designGrid"
|
|
6
|
+
:items="layout"
|
|
7
|
+
:grid="gridParams"
|
|
8
|
+
:body-height="bodyHeight"
|
|
9
|
+
:min-height="canvasHeight"
|
|
10
|
+
:show-grid-lines="!!globalConfigs.showGridLines"
|
|
11
|
+
@change="onLayoutChange"
|
|
12
|
+
@transfer-out="onTransferOut"
|
|
13
|
+
@transfer-in="onTransferIn"
|
|
14
|
+
>
|
|
15
|
+
<template #item="{ item }">
|
|
16
|
+
<!-- floatable:整页悬浮模式下逐项悬浮没有意义,不显示操作条上的悬浮切换 -->
|
|
17
|
+
<epx-dashboard-design-item :item="item" :active="design.isActive(item)" :floatable="gridParams.mode !== 'float'" @select="openConfigPanel">
|
|
18
|
+
<!-- 渲染组件 -->
|
|
19
|
+
<div v-if="item.contentType && !reloadComponent[item.id]" class="drag-component">
|
|
20
|
+
<epx-component
|
|
21
|
+
v-if="item.contentType==='entity-list' || item.contentType === 'num-statistic'"
|
|
22
|
+
class="epx-dashboard__component"
|
|
23
|
+
:name="`${item.contentType}--preview`"
|
|
24
|
+
:ref="`component_${item.i}`"
|
|
25
|
+
:widget="item"
|
|
26
|
+
:designer="previewDesigner"
|
|
27
|
+
:component-style="componentStyle(item)"
|
|
28
|
+
is-dashboard
|
|
29
|
+
design-mode
|
|
30
|
+
:theme="theme"
|
|
31
|
+
>
|
|
32
|
+
</epx-component>
|
|
33
|
+
<epx-component
|
|
34
|
+
v-else
|
|
35
|
+
class="epx-dashboard__component"
|
|
36
|
+
:name="item.contentType"
|
|
37
|
+
:ref="`component_${item.i}`"
|
|
38
|
+
:items="item.items"
|
|
39
|
+
:itemConfigs="itemConfigs"
|
|
40
|
+
is-dashboard
|
|
41
|
+
design-mode
|
|
42
|
+
:key="item.id"
|
|
43
|
+
:dashboard-id="upCompId"
|
|
44
|
+
:comp-id="upCompId? upCompId+ '-'+item.id: item.id"
|
|
45
|
+
:comp-item="item"
|
|
46
|
+
:comp-title="item.title"
|
|
47
|
+
:comp-style="componentStyle(item)"
|
|
48
|
+
:comp-configs="getCompConfigs(item, item.id)" :theme="theme" mode="design"
|
|
49
|
+
:comp-grid="containerGrid(item)"
|
|
50
|
+
:allComponentList="allComponentList"
|
|
51
|
+
:themeChartConfig="themeChartConfig"
|
|
52
|
+
@changeItems="v=>changeSubItems(item, v)"
|
|
53
|
+
@open-config="openConfig"
|
|
54
|
+
></epx-component>
|
|
55
|
+
</div>
|
|
56
|
+
<span v-else>{{item.id}}</span>
|
|
57
|
+
<!-- 操作条:按钮先选中本项再执行,保证 activeComponent 指向被操作的项 -->
|
|
58
|
+
<template #operates>
|
|
59
|
+
<i class="component-operate__item el-icon-edit-outline" v-if="item.contentType==='report-chart'" @click="openConfigPanel(item); designReport()"></i>
|
|
60
|
+
<i class="component-operate__item el-icon-edit-outline" v-if="item.contentType==='report-html'" @click="openConfigPanel(item); designForm()"></i>
|
|
61
|
+
<i class="component-operate__item el-icon-setting" @click="openConfigPanel(item); editComponent()"></i>
|
|
62
|
+
<i class="component-operate__item el-icon-copy-document" v-if="item.contentType==='report-chart'" @click="openConfigPanel(item); copyReport()"></i>
|
|
63
|
+
<i class="component-operate__item el-icon-copy-document" v-else @click="copyComponent(item)"></i>
|
|
64
|
+
<el-dropdown class="componnet-dropdown" @command="command => { openConfigPanel(item); deleteReport(command) }" v-if="item.contentType==='report-chart'">
|
|
65
|
+
<i class="component-operate__item el-icon-delete"></i>
|
|
66
|
+
<template v-slot:dropdown><el-dropdown-menu>
|
|
67
|
+
<el-dropdown-item command="only">仅从仪表盘中删除</el-dropdown-item>
|
|
68
|
+
<el-dropdown-item command="all">从仪表盘和报表库中删除</el-dropdown-item>
|
|
69
|
+
</el-dropdown-menu></template>
|
|
70
|
+
</el-dropdown>
|
|
71
|
+
<i class="component-operate__item el-icon-delete" v-else @click="deleteComponent(item, true)"></i>
|
|
72
|
+
</template>
|
|
73
|
+
</epx-dashboard-design-item>
|
|
74
|
+
</template>
|
|
75
|
+
</epx-dashboard-design-grid>
|
|
76
|
+
<div class="null-component" v-else>
|
|
77
|
+
<div class="add-component-btn" @click="$emit('add-report')">
|
|
78
|
+
<i class="epx-icon-color-tianjiabaobiao"></i>
|
|
79
|
+
<span>添加报表</span>
|
|
80
|
+
</div>
|
|
81
|
+
<div class="add-component-btn" @click="$emit('add-component')">
|
|
82
|
+
<i class="epx-icon-color-tianjiazujian"></i>
|
|
83
|
+
<span>添加组件</span>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</template>
|
|
88
|
+
|
|
89
|
+
<script>
|
|
90
|
+
import { defineAsyncComponent } from 'vue'
|
|
91
|
+
import { buildThemeCss, buildThemeChartConfig } from '@epxing/dashboard/src/theme-style'
|
|
92
|
+
import { normalizeGridItem } from '@epxing/dashboard/src/layout-util'
|
|
93
|
+
import { getPageGrid, getContainerGrid, isLegacyConfig, isContainerType } from '@epxing/dashboard/src/grid/model'
|
|
94
|
+
import { createDesignState } from '@epxing/dashboard/src/grid/designState'
|
|
95
|
+
import DesignItem from '@epxing/dashboard/src/DesignItem.vue'
|
|
96
|
+
import { chartConfigRequiresReload } from '@epxing/utils/src/chart-config-update'
|
|
97
|
+
export default {
|
|
98
|
+
name: 'epx-visual-config-dashboard-design',
|
|
99
|
+
components: {
|
|
100
|
+
// 设计态画布(gridstack 封装)按需加载,运行态不拉 gridstack
|
|
101
|
+
'epx-dashboard-design-grid': defineAsyncComponent(() => import('@epxing/dashboard/src/DesignGrid.vue')),
|
|
102
|
+
'epx-dashboard-design-item': DesignItem
|
|
103
|
+
},
|
|
104
|
+
props: {
|
|
105
|
+
pageMetaId: String,
|
|
106
|
+
pageId: String,
|
|
107
|
+
upCompId: String,
|
|
108
|
+
globalConfigs: {
|
|
109
|
+
type: Object,
|
|
110
|
+
default () {
|
|
111
|
+
return {}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
allComponentList: {
|
|
115
|
+
type: Array,
|
|
116
|
+
default () {
|
|
117
|
+
return []
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
itemConfigs: {
|
|
121
|
+
type: Object,
|
|
122
|
+
default () {
|
|
123
|
+
return {}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
componentList: {
|
|
127
|
+
type: Array,
|
|
128
|
+
default () {
|
|
129
|
+
return []
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
theme: {
|
|
133
|
+
type: String,
|
|
134
|
+
default: 'light'
|
|
135
|
+
},
|
|
136
|
+
themeStyles: Object,
|
|
137
|
+
// 主题面板处于"移动端"编辑态:加 .is-mobile-preview 类,桌面宽画布也预览移动端覆盖
|
|
138
|
+
mobilePreview: Boolean
|
|
139
|
+
},
|
|
140
|
+
provide () {
|
|
141
|
+
return {
|
|
142
|
+
upPage: this,
|
|
143
|
+
pageMetaId: this.pageMetaId,
|
|
144
|
+
pageId: this.pageId,
|
|
145
|
+
changeItemConfigs: this.changeItemConfigs,
|
|
146
|
+
// 主题图表配置下发,跨容器层注入到图表组件,保持响应式(设计器实时调色板)
|
|
147
|
+
getThemeChartConfig: () => this.themeChartConfig,
|
|
148
|
+
// 设计态共享选中态:容器内网格与页面级画布共用同一份,选中项只有一个
|
|
149
|
+
epxDashboardDesign: this.design,
|
|
150
|
+
// 配置是否旧版(与运行态 Dashboard.vue 同一 provide):容器里的嵌套容器据此选历史写死值 / 继承本容器网格
|
|
151
|
+
getDashboardLegacy: () => isLegacyConfig(this.globalConfigs)
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
inject: ['changeItemConfigs'],
|
|
155
|
+
data () {
|
|
156
|
+
return {
|
|
157
|
+
reloadComponent: {},
|
|
158
|
+
oldItemConfigs: {},
|
|
159
|
+
layout: [],
|
|
160
|
+
// 设计态选中态(activeComponent 由它派生),provide 给容器内网格共用
|
|
161
|
+
design: createDesignState(),
|
|
162
|
+
// 'auto' 行高 / 间距(旧 autoHeight)的换算基准:document.body 高度
|
|
163
|
+
bodyHeight: 0,
|
|
164
|
+
// 画布可视高度:根网格按它撑满画布,指针移到空白处才不会触发库的「离开网格」
|
|
165
|
+
canvasHeight: 0
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
computed: {
|
|
169
|
+
getCompConfigs () {
|
|
170
|
+
return (component) => {
|
|
171
|
+
// 如果是页面 查找页面默认配置
|
|
172
|
+
const { configs = {}, id, title, contentType, ...otherConfigs } = component
|
|
173
|
+
// this.upCompId ? this.upCompId + '-' + id :
|
|
174
|
+
const compId = id
|
|
175
|
+
const itemConfig = this.itemConfigs[compId] || {}
|
|
176
|
+
const _configs = { ...otherConfigs, ...configs, ...itemConfig }
|
|
177
|
+
if (title) {
|
|
178
|
+
_configs.componentName = title
|
|
179
|
+
}
|
|
180
|
+
return _configs
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
componentStyle () {
|
|
184
|
+
return component => {
|
|
185
|
+
const componentStyle = component.style || {}
|
|
186
|
+
// if (this.themeStyles.component?.border) {
|
|
187
|
+
// componentStyle = { ...this.themeStyles.component.border, ...componentStyle }
|
|
188
|
+
// }
|
|
189
|
+
return componentStyle
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
dashboardStyle () {
|
|
193
|
+
const { backgroundColor, backgroundImage } = this.globalConfigs
|
|
194
|
+
return {
|
|
195
|
+
backgroundColor,
|
|
196
|
+
backgroundImage: backgroundImage ? `url(${this.$util.getFileUrl(backgroundImage)})` : null
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
themeChartConfig () {
|
|
200
|
+
// 移动端预览态用 mobile.chart 覆盖,让图表配色在设计器也能预览移动端方案
|
|
201
|
+
return buildThemeChartConfig(this.themeStyles || {}, this.mobilePreview)
|
|
202
|
+
},
|
|
203
|
+
// 页面级网格参数:与运行态同一取法(旧配置的 autoHeight ⇒ rowHeight / gap 'auto'),几何才能一致
|
|
204
|
+
gridParams () {
|
|
205
|
+
return getPageGrid(this.globalConfigs)
|
|
206
|
+
},
|
|
207
|
+
// 容器项内部网格参数(与运行态 pageGridMixin.containerGrid 同源):显式 grid 优先,旧配置用历史写死值,v3 无 grid 继承页面网格;非容器 undefined
|
|
208
|
+
containerGrid () {
|
|
209
|
+
return component => (isContainerType(component.contentType)
|
|
210
|
+
? getContainerGrid(component, this.gridParams, isLegacyConfig(this.globalConfigs))
|
|
211
|
+
: undefined)
|
|
212
|
+
},
|
|
213
|
+
// 预览类组件(entity-list / num-statistic 的 --preview)要的 designer 契约:页面对象、组件配置,
|
|
214
|
+
// 以及按内容类型查组件记录(预览 mixin 挂载时读 widgetInfo.CONTAINER,缺了会抛错打断 Vue 调度,R24)。
|
|
215
|
+
// dragState 与拖放方法是给预览 mixin 的兜底:它对 items !== undefined 的项(外壳给每项补了 items: [],num-statistic 也算容器)
|
|
216
|
+
// 绑 HTML5 dragenter / dragover / drop 事件并读 dragState、调这些方法;看板设计器没有组件库 HTML5 拖拽,空实现即可
|
|
217
|
+
previewDesigner () {
|
|
218
|
+
const noop = () => {}
|
|
219
|
+
return {
|
|
220
|
+
page: { metaId: this.pageMetaId },
|
|
221
|
+
widgetConfig: this.itemConfigs,
|
|
222
|
+
getWidgetByType: code => this.allComponentList.find(item => item.CODE === code) || null,
|
|
223
|
+
dragState: {},
|
|
224
|
+
setDragOverTarget: noop,
|
|
225
|
+
setDragOverTargetElement: noop,
|
|
226
|
+
setPreviewDragTarget: noop,
|
|
227
|
+
clearDragOverTarget: noop,
|
|
228
|
+
clearDragInsertLine: noop,
|
|
229
|
+
clearPreviewDragTarget: noop,
|
|
230
|
+
handleDrop: noop
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
// 行高 / 间距按视口等比(旧 autoHeight 或 v3 显式 'auto')时才需要随窗口维护 bodyHeight
|
|
234
|
+
autoGrid () {
|
|
235
|
+
return this.gridParams.rowHeight === 'auto' || this.gridParams.padding === 'auto'
|
|
236
|
+
},
|
|
237
|
+
activeComponent () {
|
|
238
|
+
return this.design.state.activeItem
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
watch: {
|
|
242
|
+
componentList: {
|
|
243
|
+
handler (v) {
|
|
244
|
+
this.layout = [...v]
|
|
245
|
+
},
|
|
246
|
+
immediate: true
|
|
247
|
+
},
|
|
248
|
+
itemConfigs: {
|
|
249
|
+
handler (v) {
|
|
250
|
+
for (const key in this.itemConfigs) {
|
|
251
|
+
const compConfig = this.itemConfigs[key] || {}
|
|
252
|
+
const oldCompConfig = this.oldItemConfigs[key] || {}
|
|
253
|
+
if (!this.$_.isEqual(compConfig, oldCompConfig)) {
|
|
254
|
+
const findItem = (key, arr = this.componentList) => {
|
|
255
|
+
for (const item of arr) {
|
|
256
|
+
if (item.id === key) {
|
|
257
|
+
return item
|
|
258
|
+
} else if (item.children) {
|
|
259
|
+
const childItem = findItem(key, item.children)
|
|
260
|
+
if (childItem) return childItem
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
const item = findItem(key) || {}
|
|
265
|
+
if ((item.contentType !== 'report-chart' && item.contentType !== 'chart') || compConfig.id !== oldCompConfig.id) {
|
|
266
|
+
this.reloadComponent[key] = true
|
|
267
|
+
this.$nextTick(() => {
|
|
268
|
+
this.reloadComponent[key] = false
|
|
269
|
+
})
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
this.oldItemConfigs = this.$_.cloneDeep(this.itemConfigs)
|
|
274
|
+
},
|
|
275
|
+
deep: true
|
|
276
|
+
},
|
|
277
|
+
theme () {
|
|
278
|
+
// this.layout.forEach(item => {
|
|
279
|
+
// this.$set(this.reloadComponent, item.id, true)
|
|
280
|
+
// this.$nextTick(() => {
|
|
281
|
+
// this.$set(this.reloadComponent, item.id, false)
|
|
282
|
+
// })
|
|
283
|
+
// })
|
|
284
|
+
},
|
|
285
|
+
layout: {
|
|
286
|
+
// Vue3 起浅层 watcher 不响应 push/splice,而设计器新增 / 删除组件走的正是 push/splice
|
|
287
|
+
deep: 1,
|
|
288
|
+
handler (v) {
|
|
289
|
+
for (const item of v) {
|
|
290
|
+
if (!item) continue
|
|
291
|
+
// x/y/w/h 必须是数字(网格引擎按数值布局)
|
|
292
|
+
normalizeGridItem(item)
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
immediate: true
|
|
296
|
+
},
|
|
297
|
+
autoGrid: {
|
|
298
|
+
handler (v) {
|
|
299
|
+
if (v) {
|
|
300
|
+
this.calculateHeight()
|
|
301
|
+
window.addEventListener('resize', this.calculateHeight)
|
|
302
|
+
} else {
|
|
303
|
+
window.removeEventListener('resize', this.calculateHeight)
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
immediate: true
|
|
307
|
+
},
|
|
308
|
+
themeStyles: {
|
|
309
|
+
handler (v) {
|
|
310
|
+
if (v) {
|
|
311
|
+
// 设计器中 page.background 直接作用于根节点,containerSelector 置空
|
|
312
|
+
// 设计器组件被 pointer-events:none,自身 :hover 不触发,悬浮预览改用祖先 .drag-component:hover 触发
|
|
313
|
+
// mobilePreview: 额外输出 .is-mobile-preview 作用域的移动端规则,配合根节点类做桌面宽预览
|
|
314
|
+
const styles = buildThemeCss(v, `.epx-dashboard-${this.pageId}`, path => this.$util.getFileUrl(path), { containerSelector: '', hoverAncestor: '.drag-component', mobilePreview: true })
|
|
315
|
+
let styleElement = document.head.querySelector(`#dashboard-${this.pageId}`)
|
|
316
|
+
if (!styleElement) {
|
|
317
|
+
styleElement = document.createElement('style')
|
|
318
|
+
styleElement.id = `dashboard-${this.pageId}`
|
|
319
|
+
styleElement.type = 'text/css'
|
|
320
|
+
styleElement.textContent = styles
|
|
321
|
+
document.head.appendChild(styleElement)
|
|
322
|
+
} else {
|
|
323
|
+
styleElement.textContent = styles
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
deep: true
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
},
|
|
331
|
+
mounted () {
|
|
332
|
+
this.measureCanvas()
|
|
333
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
334
|
+
this.canvasObserver = new ResizeObserver(() => this.measureCanvas())
|
|
335
|
+
this.canvasObserver.observe(this.$refs.dashboard)
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
beforeUnmount () {
|
|
339
|
+
window.removeEventListener('resize', this.calculateHeight)
|
|
340
|
+
if (this.canvasObserver) this.canvasObserver.disconnect()
|
|
341
|
+
},
|
|
342
|
+
methods: {
|
|
343
|
+
// upPage 契约:设计器内组件 $refeshPage() / 外壳 $refesh() 会调到这里;画布由网格引擎维护,无需刷新
|
|
344
|
+
$refesh () {
|
|
345
|
+
},
|
|
346
|
+
// 库改了坐标(拖拽 / 缩放 / 推挤 / 首次对账):画布已就地写回 item.x/y/w/h,只需通知外壳保存
|
|
347
|
+
onLayoutChange () {
|
|
348
|
+
this.$emit('change-items', this.layout)
|
|
349
|
+
},
|
|
350
|
+
// 跨网格搬出(项被拖进容器):源侧必须同步移出数据,否则下一次同步会把壳重新加回来
|
|
351
|
+
onTransferOut (item) {
|
|
352
|
+
this.deleteComponent(item, false)
|
|
353
|
+
},
|
|
354
|
+
// 跨网格搬入(容器内项拖回页面):画布已按本网格换算过 w/h
|
|
355
|
+
onTransferIn (item) {
|
|
356
|
+
this.layout.push(item)
|
|
357
|
+
this.$emit('change-items', this.layout)
|
|
358
|
+
},
|
|
359
|
+
openConfig (...props) {
|
|
360
|
+
this.$emit('open-config', ...props)
|
|
361
|
+
},
|
|
362
|
+
openConfigPanel (component) {
|
|
363
|
+
this.design.select(component, 'page')
|
|
364
|
+
// const componentInfo = this.allComponentList.find(item => item.CODE === component.contentType) || { CODE: component.contentType }
|
|
365
|
+
// const configs = this.getCompConfigs(component, component.id)
|
|
366
|
+
// this.$emit('open-config', component.id, componentInfo, configs)
|
|
367
|
+
},
|
|
368
|
+
setChartConfig (v) {
|
|
369
|
+
const that = this
|
|
370
|
+
const id = that.activeComponent.id
|
|
371
|
+
const before = that.getCompConfigs(that.activeComponent, id)
|
|
372
|
+
const reload = chartConfigRequiresReload(before, v, that.$_.isEqual)
|
|
373
|
+
that.changeItemConfigs(id, that.$_.cloneDeep(v), null, 'cover')
|
|
374
|
+
if (reload) {
|
|
375
|
+
that.reloadComponent[id] = true
|
|
376
|
+
that.$nextTick(() => { that.reloadComponent[id] = false })
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
that.$forceUpdate()
|
|
380
|
+
},
|
|
381
|
+
editComponent () {
|
|
382
|
+
const componentInfo = this.allComponentList.find(item => item.CODE === this.activeComponent.contentType) || { CODE: this.activeComponent.contentType }
|
|
383
|
+
const configs = this.getCompConfigs(this.activeComponent, this.activeComponent.id)
|
|
384
|
+
|
|
385
|
+
if (componentInfo.CODE === 'chart') {
|
|
386
|
+
this.$createPage({
|
|
387
|
+
metaId: 'FM_REPORT_BASE',
|
|
388
|
+
openType: '2',
|
|
389
|
+
defaultFullscreen: true,
|
|
390
|
+
withHeader: false,
|
|
391
|
+
component: 'chart-design',
|
|
392
|
+
chartConfigs: configs,
|
|
393
|
+
setChartConfig: this.setChartConfig.bind(this)
|
|
394
|
+
})
|
|
395
|
+
} else {
|
|
396
|
+
this.$emit('open-config', this.activeComponent.id, componentInfo, configs)
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
designReport () {
|
|
400
|
+
const configs = this.getCompConfigs(this.activeComponent, this.activeComponent.id)
|
|
401
|
+
this.goPage({
|
|
402
|
+
openMode: '2',
|
|
403
|
+
component: 'report-design',
|
|
404
|
+
params: {
|
|
405
|
+
defaultFullscreen: true,
|
|
406
|
+
withHeader: false,
|
|
407
|
+
id: configs.id,
|
|
408
|
+
callback: () => {
|
|
409
|
+
this.reloadComponent[this.activeComponent.id] = true
|
|
410
|
+
this.$nextTick(() => {
|
|
411
|
+
this.reloadComponent[this.activeComponent.id] = false
|
|
412
|
+
})
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
})
|
|
417
|
+
},
|
|
418
|
+
designForm () {
|
|
419
|
+
const configs = this.getCompConfigs(this.activeComponent, this.activeComponent.id)
|
|
420
|
+
if (configs.id) {
|
|
421
|
+
this.$http.get({
|
|
422
|
+
entityId: 'FM_FORM',
|
|
423
|
+
id: configs.id
|
|
424
|
+
})
|
|
425
|
+
.then(data => {
|
|
426
|
+
this.goPage({
|
|
427
|
+
component: data.data.TYPE === 'excelReport' ? 'excel-design' : 'form-design',
|
|
428
|
+
metaId: 'FM_FORM',
|
|
429
|
+
params: {
|
|
430
|
+
id: configs.id,
|
|
431
|
+
callback: () => {
|
|
432
|
+
this.reloadComponent[this.activeComponent.id] = true
|
|
433
|
+
this.$nextTick(() => {
|
|
434
|
+
this.reloadComponent[this.activeComponent.id] = false
|
|
435
|
+
})
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
})
|
|
439
|
+
})
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
copyReport () {
|
|
443
|
+
this.$prompt('请输入报表名称', '复制报表', {
|
|
444
|
+
confirmButtonText: this.$t('confirm'),
|
|
445
|
+
cancelButtonText: this.$t('cancel'),
|
|
446
|
+
inputPattern: /.+/,
|
|
447
|
+
inputErrorMessage: '请输入报表名称'
|
|
448
|
+
}).then(({ value }) => {
|
|
449
|
+
const configs = this.getCompConfigs(this.activeComponent, this.activeComponent.id)
|
|
450
|
+
this.$http.get({
|
|
451
|
+
entityId: 'FM_REPORT_BASE',
|
|
452
|
+
id: configs.id
|
|
453
|
+
})
|
|
454
|
+
.then(oldData => {
|
|
455
|
+
const form = {}
|
|
456
|
+
for (const key in oldData.data) {
|
|
457
|
+
if (!key.includes('#')) form['bean.' + key] = oldData.data[key]
|
|
458
|
+
}
|
|
459
|
+
this.$http.save({
|
|
460
|
+
action: 'copy',
|
|
461
|
+
entityId: 'FM_REPORT_BASE',
|
|
462
|
+
oldRecordId: configs.id,
|
|
463
|
+
...form,
|
|
464
|
+
'bean.NAME': value,
|
|
465
|
+
'bean.ID': ''
|
|
466
|
+
})
|
|
467
|
+
.then(data => {
|
|
468
|
+
this.$emit('add-report-to-dashboard', data, { w: this.activeComponent.w, h: this.activeComponent.h })
|
|
469
|
+
this.$message.success('复制成功')
|
|
470
|
+
})
|
|
471
|
+
.catch(err => {
|
|
472
|
+
this.$message.error(err.message)
|
|
473
|
+
})
|
|
474
|
+
})
|
|
475
|
+
.catch(err => {
|
|
476
|
+
this.$message.error(err.message)
|
|
477
|
+
})
|
|
478
|
+
})
|
|
479
|
+
},
|
|
480
|
+
copyComponent (item) {
|
|
481
|
+
const configs = this.getCompConfigs(item, item.id)
|
|
482
|
+
const newItem = {
|
|
483
|
+
CODE: item.contentType,
|
|
484
|
+
TITLE: item.title,
|
|
485
|
+
...item
|
|
486
|
+
}
|
|
487
|
+
this.$emit('add-component-to-dashboard', newItem, configs)
|
|
488
|
+
},
|
|
489
|
+
deleteComponent (component, deleteConfig) {
|
|
490
|
+
const activeComponent = component || this.activeComponent
|
|
491
|
+
const index = this.layout.findIndex(item => item.id === activeComponent.id)
|
|
492
|
+
if (activeComponent.contentType === 'report-chat') {
|
|
493
|
+
const configs = this.getCompConfigs(activeComponent, activeComponent.id)
|
|
494
|
+
this.$http.removeMulti({
|
|
495
|
+
entityId: 'FM_REPORT_BASE',
|
|
496
|
+
ids: configs.id
|
|
497
|
+
})
|
|
498
|
+
}
|
|
499
|
+
if (index !== -1) {
|
|
500
|
+
this.layout.splice(index, 1)
|
|
501
|
+
this.$emit('change-items', this.layout)
|
|
502
|
+
// 删除对应的配置信息
|
|
503
|
+
if (deleteConfig) this.$emit('delete-configs', activeComponent.id)
|
|
504
|
+
// 被删的正是选中项:清掉共享选中态(与容器侧对齐)
|
|
505
|
+
if (this.design.isActive(activeComponent)) this.design.clear()
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
deleteReport (command) {
|
|
509
|
+
// 先取住被删项:activeComponent 由共享选中态派生,末尾 clear 后就是 null,删报表库记录那一支还要用它
|
|
510
|
+
const activeComponent = this.activeComponent
|
|
511
|
+
const index = this.layout.findIndex(item => item.id === activeComponent.id)
|
|
512
|
+
|
|
513
|
+
if (index !== -1) {
|
|
514
|
+
this.layout.splice(index, 1)
|
|
515
|
+
this.$emit('change-items', this.layout)
|
|
516
|
+
this.$emit('delete-configs', activeComponent.id)
|
|
517
|
+
}
|
|
518
|
+
if (command === 'all') {
|
|
519
|
+
const configs = this.getCompConfigs(activeComponent, activeComponent.id)
|
|
520
|
+
this.$http.removeMulti({
|
|
521
|
+
entityId: 'FM_REPORT_BASE',
|
|
522
|
+
ids: configs.id
|
|
523
|
+
})
|
|
524
|
+
}
|
|
525
|
+
// 被删的正是选中项:清掉共享选中态(与容器侧对齐)
|
|
526
|
+
this.design.clear()
|
|
527
|
+
},
|
|
528
|
+
changeSubItems (item, v) {
|
|
529
|
+
const index = this.layout.findIndex(layoutItem => layoutItem.id === item.id)
|
|
530
|
+
if (index !== -1) this.layout.splice(index, 1, { ...(this.layout[index]), items: v })
|
|
531
|
+
this.$emit('change-items', this.layout)
|
|
532
|
+
},
|
|
533
|
+
calculateHeight () {
|
|
534
|
+
this.bodyHeight = document.body.offsetHeight
|
|
535
|
+
},
|
|
536
|
+
measureCanvas () {
|
|
537
|
+
if (this.$refs.dashboard) this.canvasHeight = this.$refs.dashboard.clientHeight
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
</script>
|
|
542
|
+
|
|
543
|
+
<style lang="scss" scoped>
|
|
544
|
+
.dashboard-design {
|
|
545
|
+
width: 100%;
|
|
546
|
+
height: 100%;
|
|
547
|
+
overflow-y: auto;
|
|
548
|
+
// background: #F2F3F7;
|
|
549
|
+
// 根节点同时是 .epx-dashboard(flex 列容器):网格宿主不参与压缩,内容超过一屏时它(网格线背景)随内容延伸
|
|
550
|
+
> .epx-dashboard-design-grid {
|
|
551
|
+
flex: none;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
// .dashboard-design--dark {
|
|
555
|
+
// background: #151C3D;
|
|
556
|
+
// .drag-border {
|
|
557
|
+
// background: none;
|
|
558
|
+
// }
|
|
559
|
+
// .drag-component {
|
|
560
|
+
// >div {
|
|
561
|
+
// // background: rgba(255,255,255, .1)
|
|
562
|
+
// }
|
|
563
|
+
// }
|
|
564
|
+
// }
|
|
565
|
+
// .dashboard-design--technology {
|
|
566
|
+
// background: url('@/assets/images/dashboard/technology_bg.jpg') no-repeat center;
|
|
567
|
+
// background-size: cover;
|
|
568
|
+
// .drag-border {
|
|
569
|
+
// background: rgba(255, 255, 255, 0.1);
|
|
570
|
+
// }
|
|
571
|
+
// // .drag-component {
|
|
572
|
+
// // position: relative;
|
|
573
|
+
// // &::before {
|
|
574
|
+
// // content: '';
|
|
575
|
+
// // position: absolute;
|
|
576
|
+
// // top: 0;
|
|
577
|
+
// // display: block;
|
|
578
|
+
// // width: 100%;
|
|
579
|
+
// // height: 1px;
|
|
580
|
+
// // background: linear-gradient(90deg, rgba(45, 164, 247, 0) 0%, #2DA4F7 50%, rgba(45, 164, 247, 0) 100%);
|
|
581
|
+
// // opacity: 0.5;
|
|
582
|
+
// // }
|
|
583
|
+
// // &::after {
|
|
584
|
+
// // content: '';
|
|
585
|
+
// // position: absolute;
|
|
586
|
+
// // bottom: 0;
|
|
587
|
+
// // display: block;
|
|
588
|
+
// // width: 100%;
|
|
589
|
+
// // height: 1px;
|
|
590
|
+
// // background: linear-gradient(90deg, rgba(45, 164, 247, 0) 0%, #2DA4F7 50%, rgba(45, 164, 247, 0) 100%);
|
|
591
|
+
// // opacity: 0.5;
|
|
592
|
+
// // }
|
|
593
|
+
// // >div {
|
|
594
|
+
// // background: rgba(255,255,255, .1);
|
|
595
|
+
// // backdrop-filter: blur(4px);
|
|
596
|
+
// // }
|
|
597
|
+
// // }
|
|
598
|
+
// }
|
|
599
|
+
.drag-component {
|
|
600
|
+
width: 100%;
|
|
601
|
+
height: 100%;
|
|
602
|
+
// 不裁剪卡片 box-shadow,使设计器画布也能预览阴影;滚动下移到组件自身
|
|
603
|
+
overflow: visible;
|
|
604
|
+
>.epx-dashboard__component {
|
|
605
|
+
height: 100%;
|
|
606
|
+
// 自身内容溢出仍滚动;元素自身 box-shadow 不受自身 overflow 裁剪
|
|
607
|
+
overflow: auto;
|
|
608
|
+
}
|
|
609
|
+
>:not(.epx-chart) {
|
|
610
|
+
pointer-events: none;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
// 操作条按钮:横排在 epx-dashboard-design-item__operates 里
|
|
614
|
+
.component-operate__item {
|
|
615
|
+
display: block;
|
|
616
|
+
font-size: var(--epx-font-size-base);
|
|
617
|
+
color: #fff;
|
|
618
|
+
line-height: 20px;
|
|
619
|
+
text-align: center;
|
|
620
|
+
cursor: pointer;
|
|
621
|
+
margin: 2px 0;
|
|
622
|
+
}
|
|
623
|
+
.componnet-dropdown {
|
|
624
|
+
.component-operate__item {
|
|
625
|
+
width: 20px;
|
|
626
|
+
margin-top: 0;
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
.null-component {
|
|
630
|
+
width: 100%;
|
|
631
|
+
height: 100%;
|
|
632
|
+
display: flex;
|
|
633
|
+
justify-content: center;
|
|
634
|
+
align-items: center;
|
|
635
|
+
}
|
|
636
|
+
.add-component-btn {
|
|
637
|
+
background: var(--epx-bg-card);
|
|
638
|
+
width: 240px;
|
|
639
|
+
height: 240px;
|
|
640
|
+
margin: 0 20px;
|
|
641
|
+
border-radius: var(--epx-radius-l);
|
|
642
|
+
cursor: pointer;
|
|
643
|
+
display: flex;
|
|
644
|
+
flex-direction: column;
|
|
645
|
+
justify-content: center;
|
|
646
|
+
align-items: center;
|
|
647
|
+
font-size: var(--epx-font-size-l);
|
|
648
|
+
color: #444;
|
|
649
|
+
i {
|
|
650
|
+
font-size: 56px;
|
|
651
|
+
}
|
|
652
|
+
&:hover {
|
|
653
|
+
box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.15);
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
</style>
|