@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,2160 @@
|
|
|
1
|
+
import '../../../style.css';
|
|
2
|
+
import { __vitePreload as __epxPackagePreload } from "../../../_virtual/preload-helper.js";
|
|
3
|
+
import __cjsReq0 from "../../assets/images/dashboard/theme_white.png.js";
|
|
4
|
+
import __cjsReq1 from "../../assets/images/dashboard/theme_black.png.js";
|
|
5
|
+
import __cjsReq2 from "../../assets/images/dashboard/theme_technology.png.js";
|
|
6
|
+
import DashboardThemeSetting from "./dashboard-theme-setting/Index.js";
|
|
7
|
+
import { selectableChartTypes } from "@epxing/utils/src/chart-registry";
|
|
8
|
+
import DashboardMobile from "./DashboardMobile.js";
|
|
9
|
+
import DashboardPreview from "@epxing/dashboard/src/Dashboard.vue";
|
|
10
|
+
import { DEFAULT_DASHBOARD_THEME, removeDashboardItem, createDashboardConfig, getDashboardDesignTarget } from "@epxing/dashboard/src/design-target";
|
|
11
|
+
import { indexDashboardItems } from "@epxing/dashboard/src/mobile-design";
|
|
12
|
+
import { mapGetters, mapState } from "vuex";
|
|
13
|
+
import { stripDashboardConfig, mergeGridConfigs, rescaleItemsToColNum, normalizeDashboardConfig, CONFIG_VERSION } from "@epxing/dashboard/src/grid/model";
|
|
14
|
+
import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createBlock, withCtx, createTextVNode, createCommentVNode, Fragment, renderList, createVNode, withModifiers, withDirectives, vShow, resolveDynamicComponent, normalizeStyle } from "vue";
|
|
15
|
+
/* empty css */
|
|
16
|
+
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
17
|
+
function ensureGridItemKey(items) {
|
|
18
|
+
if (!Array.isArray(items)) return items;
|
|
19
|
+
items.forEach((item) => {
|
|
20
|
+
if (item && typeof item === "object") {
|
|
21
|
+
if (item.contentType && item.i == null && item.id != null) item.i = item.id;
|
|
22
|
+
if (Array.isArray(item.items)) ensureGridItemKey(item.items);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
return items;
|
|
26
|
+
}
|
|
27
|
+
const _sfc_main = {
|
|
28
|
+
name: "epx-visual-config-dashboard",
|
|
29
|
+
$componentType: "component",
|
|
30
|
+
components: {
|
|
31
|
+
DashboardThemeSetting,
|
|
32
|
+
DashboardMobile,
|
|
33
|
+
DashboardPreview
|
|
34
|
+
},
|
|
35
|
+
navConfigs: {
|
|
36
|
+
flag: false
|
|
37
|
+
},
|
|
38
|
+
provide() {
|
|
39
|
+
const { id } = this.$query;
|
|
40
|
+
return {
|
|
41
|
+
pageMetaId: this.currentMetaId,
|
|
42
|
+
pageId: id,
|
|
43
|
+
pageConfigs: this.page_config,
|
|
44
|
+
getAllComponentList: () => this.componentList,
|
|
45
|
+
getItemConfigs: () => this.allComponentConfigs,
|
|
46
|
+
// 当前 items 树(含容器子项):属性面板「布局」分组按 id 找真实 item 读初值
|
|
47
|
+
getComponentItems: () => this.selectComponentList,
|
|
48
|
+
getDefaultContainerItems: () => this.defaultContainerItems,
|
|
49
|
+
setContainerDefaultItems: this.setContainerDefaultItems,
|
|
50
|
+
changeItemConfigs: this.changeItemConfigs,
|
|
51
|
+
getPageMetaId: () => {
|
|
52
|
+
return this.currentMetaId;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
props: {
|
|
57
|
+
newWindow: Boolean
|
|
58
|
+
},
|
|
59
|
+
data() {
|
|
60
|
+
return {
|
|
61
|
+
// 页面配置版本:加载时经 normalizeDashboardConfig 升到 v3(补 grid / 容器 grid),保存时写回;这是 '3.0' 唯一的写入点
|
|
62
|
+
version: CONFIG_VERSION,
|
|
63
|
+
configReady: false,
|
|
64
|
+
chooseDesignTarget: false,
|
|
65
|
+
choosingDesignTarget: false,
|
|
66
|
+
mobileDirty: false,
|
|
67
|
+
mobileSaving: false,
|
|
68
|
+
mobileRevision: 0,
|
|
69
|
+
mobileAddParent: null,
|
|
70
|
+
mobilePreviewVisible: false,
|
|
71
|
+
previewSuspended: false,
|
|
72
|
+
previewPopupTimer: null,
|
|
73
|
+
previewViewportWidth: window.innerWidth,
|
|
74
|
+
previewViewportHeight: window.innerHeight,
|
|
75
|
+
styleType: "presets",
|
|
76
|
+
componentList: [],
|
|
77
|
+
selectComponentList: [],
|
|
78
|
+
selectComponent: null,
|
|
79
|
+
showPanel: "componentLibrary",
|
|
80
|
+
pageGlobalConfigs: {},
|
|
81
|
+
allComponentConfigs: {},
|
|
82
|
+
pageMetaId: null,
|
|
83
|
+
upCompId: null,
|
|
84
|
+
relationList: [],
|
|
85
|
+
pageParams: [],
|
|
86
|
+
scopeConfigs: {},
|
|
87
|
+
addReportDialog: false,
|
|
88
|
+
addComponentDialog: false,
|
|
89
|
+
copyComponentDialog: false,
|
|
90
|
+
pageSettingDrawer: false,
|
|
91
|
+
activeTheme: DEFAULT_DASHBOARD_THEME,
|
|
92
|
+
themeStyles: null,
|
|
93
|
+
themeMobilePreview: false,
|
|
94
|
+
// 主题面板处于"移动端"编辑态:设计器加 .is-mobile-preview 预览移动端覆盖
|
|
95
|
+
themeList: [
|
|
96
|
+
{ key: "light", name: "经典白", preview: __cjsReq0 },
|
|
97
|
+
{ key: "dark", name: "经典黑", preview: __cjsReq1 },
|
|
98
|
+
{ key: "technology", name: "科幻大屏", preview: __cjsReq2 }
|
|
99
|
+
],
|
|
100
|
+
reportList: [],
|
|
101
|
+
selectedReportList: [],
|
|
102
|
+
currentReportPage: 1,
|
|
103
|
+
reportTotal: 0,
|
|
104
|
+
dashboardList: [],
|
|
105
|
+
selectedDashboardCompList: [],
|
|
106
|
+
currentDashboardPage: 1,
|
|
107
|
+
dashboardTotal: 0,
|
|
108
|
+
foldDashboardMap: {},
|
|
109
|
+
reportIconMap: {
|
|
110
|
+
1: "epx-icon-tongjibiao",
|
|
111
|
+
pie: "epx-icon-bingzhuangtu",
|
|
112
|
+
line: "epx-icon-zhexiantu",
|
|
113
|
+
column: "epx-icon-zhuzhuangtu",
|
|
114
|
+
funnel: "epx-icon-loudoutu"
|
|
115
|
+
},
|
|
116
|
+
selectedReportDataList: [],
|
|
117
|
+
selectedDashboardCompDataList: [],
|
|
118
|
+
reportScopeParams: [],
|
|
119
|
+
dashboardScopeParams: [],
|
|
120
|
+
reportLoading: true,
|
|
121
|
+
dashboardLoading: true,
|
|
122
|
+
addReportForm: {},
|
|
123
|
+
reportTypeList: [
|
|
124
|
+
...selectableChartTypes.map(({ type, text, icon }) => ({ icon, text, type: type === "table" ? "1" : "2", chartType: type === "table" ? "" : type })),
|
|
125
|
+
{ icon: "epx-icon-a-numbercard", text: "数字统计", type: "numStatistic" },
|
|
126
|
+
{ icon: "epx-icon-dianzibiaodan", text: "电子表单", type: "form" },
|
|
127
|
+
{ icon: "epx-icon-biaoti", text: "标题", type: "dashboardTitle" },
|
|
128
|
+
{ icon: "epx-icon-container", text: "容器", type: "dashboardDiv" }
|
|
129
|
+
],
|
|
130
|
+
reportMap: {},
|
|
131
|
+
saveThemeDialog: false,
|
|
132
|
+
themeFormData: {},
|
|
133
|
+
editTheme: null
|
|
134
|
+
};
|
|
135
|
+
},
|
|
136
|
+
computed: {
|
|
137
|
+
isMobileDashboard() {
|
|
138
|
+
return getDashboardDesignTarget(this.pageGlobalConfigs) === "mobile";
|
|
139
|
+
},
|
|
140
|
+
mobileCanvasWidth() {
|
|
141
|
+
return Number(this.pageGlobalConfigs.mobileCanvasWidth) || 375;
|
|
142
|
+
},
|
|
143
|
+
mobilePreviewPhoneHeight() {
|
|
144
|
+
return Math.round(this.mobileCanvasWidth * 812 / 375) + 12;
|
|
145
|
+
},
|
|
146
|
+
mobilePreviewScale() {
|
|
147
|
+
return Math.max(0.1, Math.min(1, (this.previewViewportWidth - 80) / (this.mobileCanvasWidth + 12), (this.previewViewportHeight - 160) / this.mobilePreviewPhoneHeight));
|
|
148
|
+
},
|
|
149
|
+
mobileDesignSource() {
|
|
150
|
+
return { componentList: this.selectComponentList, itemConfigs: this.allComponentConfigs, globalConfigs: this.pageGlobalConfigs, theme: this.activeTheme, themeStyles: this.themeStyles };
|
|
151
|
+
},
|
|
152
|
+
...mapState({
|
|
153
|
+
showMenu: (state) => state.config.showMenu,
|
|
154
|
+
showAppNav: (state) => state.config.showAppNav
|
|
155
|
+
}),
|
|
156
|
+
...mapGetters([
|
|
157
|
+
"getMeta",
|
|
158
|
+
"getPageById"
|
|
159
|
+
]),
|
|
160
|
+
$meta() {
|
|
161
|
+
if (this.$metaId) {
|
|
162
|
+
const meta = this.getMeta(this.$metaId);
|
|
163
|
+
return meta;
|
|
164
|
+
} else {
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
$metaKey() {
|
|
169
|
+
if (this.$meta) {
|
|
170
|
+
return this.$meta.getKey() || "ID";
|
|
171
|
+
} else {
|
|
172
|
+
return "ID";
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
currentPage() {
|
|
176
|
+
const page = this.getPageById(this.$query.id);
|
|
177
|
+
return page || {};
|
|
178
|
+
},
|
|
179
|
+
currentMetaId() {
|
|
180
|
+
return this.$query.entityId || this.pageMetaId;
|
|
181
|
+
},
|
|
182
|
+
currentMeta() {
|
|
183
|
+
return this.metas[this.currentMetaId] || null;
|
|
184
|
+
},
|
|
185
|
+
page_config() {
|
|
186
|
+
const { config = "{}" } = this.$query;
|
|
187
|
+
if (typeof config === "string") {
|
|
188
|
+
try {
|
|
189
|
+
return eval("(" + config + ")");
|
|
190
|
+
} catch (error) {
|
|
191
|
+
return {};
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return config;
|
|
195
|
+
},
|
|
196
|
+
pageComponentConfigs() {
|
|
197
|
+
const configs = { ...this.pageGlobalConfigs };
|
|
198
|
+
if (configs.title) {
|
|
199
|
+
configs.componentName = configs.title;
|
|
200
|
+
}
|
|
201
|
+
return configs;
|
|
202
|
+
},
|
|
203
|
+
title() {
|
|
204
|
+
const { title } = this.pageGlobalConfigs;
|
|
205
|
+
return title || this.currentPage.title || this.$query.title;
|
|
206
|
+
},
|
|
207
|
+
isDashboardSelectAll() {
|
|
208
|
+
return (dashboard) => {
|
|
209
|
+
return dashboard.children.every((item) => this.selectedDashboardCompList.includes(dashboard.ID + "-" + item.id));
|
|
210
|
+
};
|
|
211
|
+
},
|
|
212
|
+
isDashboardSelect() {
|
|
213
|
+
return (dashboard) => {
|
|
214
|
+
return !dashboard.children.every((item) => this.selectedDashboardCompList.includes(dashboard.ID + "-" + item.id)) && dashboard.children.some((item) => this.selectedDashboardCompList.includes(dashboard.ID + "-" + item.id));
|
|
215
|
+
};
|
|
216
|
+
},
|
|
217
|
+
compTitle() {
|
|
218
|
+
return (comp) => {
|
|
219
|
+
if (comp.contentType === "report-chart") {
|
|
220
|
+
const report = this.reportMap[comp.configs.id] || {};
|
|
221
|
+
return report.NAME || comp.title;
|
|
222
|
+
}
|
|
223
|
+
return comp.title;
|
|
224
|
+
};
|
|
225
|
+
},
|
|
226
|
+
compIcon() {
|
|
227
|
+
return (comp) => {
|
|
228
|
+
if (comp.contentType === "report-chart") {
|
|
229
|
+
const report = this.reportMap[comp.configs.id] || {};
|
|
230
|
+
return this.reportIconMap[report.CHART_TYPE || report.TYPE] || "epx-icon-component";
|
|
231
|
+
}
|
|
232
|
+
return "epx-icon-component";
|
|
233
|
+
};
|
|
234
|
+
},
|
|
235
|
+
showConfigPanel: {
|
|
236
|
+
get() {
|
|
237
|
+
return !!this.selectComponent;
|
|
238
|
+
},
|
|
239
|
+
set() {
|
|
240
|
+
this.selectComponent = null;
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
themeFields() {
|
|
244
|
+
return this.$route.params.system === "epxing-frame" ? ["CODE", "NAME", "THUMBNAIL", "SCOPE"] : ["CODE", "NAME", "THUMBNAIL"];
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
methods: {
|
|
248
|
+
async selectDesignTarget(target) {
|
|
249
|
+
var _a, _b;
|
|
250
|
+
if (this.choosingDesignTarget || this.selectComponentList.length) return;
|
|
251
|
+
this.choosingDesignTarget = true;
|
|
252
|
+
if (this.timer) {
|
|
253
|
+
clearTimeout(this.timer);
|
|
254
|
+
this.timer = null;
|
|
255
|
+
}
|
|
256
|
+
const previous = this.pageGlobalConfigs;
|
|
257
|
+
try {
|
|
258
|
+
const firstChoice = !["pc", "mobile"].includes((_b = (_a = this.currentPage) == null ? void 0 : _a.config) == null ? void 0 : _b.designTarget);
|
|
259
|
+
const grid = firstChoice ? { ...previous.grid, colNum: 24 } : previous.grid;
|
|
260
|
+
const configs = createDashboardConfig({ ...previous, grid, items: [] }, target);
|
|
261
|
+
delete configs.items;
|
|
262
|
+
if (target === "pc" && previous.designTarget === "mobile") {
|
|
263
|
+
configs.grid = { ...normalizeDashboardConfig({}).grid, colNum: 24 };
|
|
264
|
+
configs.autoHeight = configs.grid.rowHeight === "auto";
|
|
265
|
+
}
|
|
266
|
+
this.pageGlobalConfigs = mergeGridConfigs(configs).configs;
|
|
267
|
+
await this.$nextTick();
|
|
268
|
+
if (await this.saveConfigs() !== true) {
|
|
269
|
+
this.pageGlobalConfigs = previous;
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
this.$store.commit("DELETE_PAGE", { pageId: this.$query.id });
|
|
273
|
+
this.mobileDirty = false;
|
|
274
|
+
this.chooseDesignTarget = false;
|
|
275
|
+
} catch (e) {
|
|
276
|
+
this.pageGlobalConfigs = previous;
|
|
277
|
+
this.$message.error(e.message || "保存设计端失败,请重试");
|
|
278
|
+
} finally {
|
|
279
|
+
await this.$nextTick();
|
|
280
|
+
this.choosingDesignTarget = false;
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
addMobileInto(item) {
|
|
284
|
+
this.mobileAddParent = item.id;
|
|
285
|
+
this.addComponentDialog = true;
|
|
286
|
+
},
|
|
287
|
+
selectMobileItem(item, tab) {
|
|
288
|
+
if (!item) return;
|
|
289
|
+
const info = this.componentList.find((component) => component.CODE === item.contentType) || { CODE: item.contentType };
|
|
290
|
+
const configs = { ...item, ...item.configs, ...this.allComponentConfigs[item.id] };
|
|
291
|
+
this.clickComponent(item.id, info, configs, void 0, tab);
|
|
292
|
+
},
|
|
293
|
+
editMobileData(item) {
|
|
294
|
+
this.selectMobileItem(item);
|
|
295
|
+
const configs = { ...item.configs, ...this.allComponentConfigs[item.id] };
|
|
296
|
+
const callback = () => {
|
|
297
|
+
const owner = this.selectComponentList.find((root) => indexDashboardItems([root]).has(String(item.id))) || item;
|
|
298
|
+
this.$refs.dashboardDesign.reloadComponent[owner.id] = true;
|
|
299
|
+
this.$nextTick(() => {
|
|
300
|
+
this.$refs.dashboardDesign.reloadComponent[owner.id] = false;
|
|
301
|
+
});
|
|
302
|
+
};
|
|
303
|
+
if (item.contentType === "report-chart") {
|
|
304
|
+
this.goPage({ openMode: "2", component: "report-design", params: { defaultFullscreen: true, withHeader: false, id: configs.id, callback } });
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
if (item.contentType === "report-html") {
|
|
308
|
+
if (!configs.id) return;
|
|
309
|
+
return this.$http.get({ entityId: "FM_FORM", id: configs.id }).then((result) => this.goPage({ component: result.data.TYPE === "excelReport" ? "excel-design" : "form-design", metaId: "FM_FORM", params: { id: configs.id, callback } })).catch((e) => this.$message.error(e.message || "打开报表设计失败"));
|
|
310
|
+
}
|
|
311
|
+
if (item.contentType !== "chart") return;
|
|
312
|
+
this.$createPage({
|
|
313
|
+
metaId: "FM_REPORT_BASE",
|
|
314
|
+
openType: "2",
|
|
315
|
+
defaultFullscreen: true,
|
|
316
|
+
withHeader: false,
|
|
317
|
+
component: "chart-design",
|
|
318
|
+
chartConfigs: configs,
|
|
319
|
+
setChartConfig: (configs2) => {
|
|
320
|
+
this.changeItemConfigs(item.id, this.$_.cloneDeep(configs2), null, "cover");
|
|
321
|
+
callback();
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
},
|
|
325
|
+
async deleteMobileItem(item) {
|
|
326
|
+
try {
|
|
327
|
+
await this.$confirm("删除该组件及其内部组件?", "删除组件", { type: "warning" });
|
|
328
|
+
} catch (e) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
removeDashboardItem(this.selectComponentList, item.id, this.allComponentConfigs);
|
|
332
|
+
this.selectComponent = null;
|
|
333
|
+
this.$refs.dashboardDesign.selectComponent = null;
|
|
334
|
+
},
|
|
335
|
+
async saveMobileDashboard() {
|
|
336
|
+
if (this.mobileSaving) return false;
|
|
337
|
+
this.mobileSaving = true;
|
|
338
|
+
const revision = this.mobileRevision;
|
|
339
|
+
try {
|
|
340
|
+
const saved = await this.saveConfigs();
|
|
341
|
+
if (saved) {
|
|
342
|
+
if (revision === this.mobileRevision) this.mobileDirty = false;
|
|
343
|
+
this.$store.commit("DELETE_PAGE", { pageId: this.$query.id });
|
|
344
|
+
this.$message.success("移动端看板已保存");
|
|
345
|
+
}
|
|
346
|
+
return saved;
|
|
347
|
+
} catch (e) {
|
|
348
|
+
this.$message.error(e.message || "保存移动端看板失败");
|
|
349
|
+
return false;
|
|
350
|
+
} finally {
|
|
351
|
+
this.mobileSaving = false;
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
warnUnsavedMobile(event) {
|
|
355
|
+
if (this.isMobileDashboard && this.mobileDirty) {
|
|
356
|
+
event.preventDefault();
|
|
357
|
+
event.returnValue = "";
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
async confirmLeaveMobile() {
|
|
361
|
+
if (!this.isMobileDashboard || !this.mobileDirty) return true;
|
|
362
|
+
try {
|
|
363
|
+
await this.$confirm("移动端看板有未保存的修改,是否离开?", "未保存修改", { confirmButtonText: "离开", cancelButtonText: "继续设计", type: "warning", customClass: "dashboard-leave-confirm", closeOnClickModal: false });
|
|
364
|
+
return true;
|
|
365
|
+
} catch (e) {
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
$refesh() {
|
|
370
|
+
if (this.$refs.dashboardDesign) this.$refs.dashboardDesign.$refesh();
|
|
371
|
+
},
|
|
372
|
+
getPageInfo() {
|
|
373
|
+
return this.getPageId().then((page) => {
|
|
374
|
+
const { metaId } = page;
|
|
375
|
+
if (metaId) this.pageMetaId = metaId;
|
|
376
|
+
this.getMetaId().then(() => {
|
|
377
|
+
this.getDefaultConfig();
|
|
378
|
+
this.getThemeList().then(() => {
|
|
379
|
+
this.getConfigThemeStyles();
|
|
380
|
+
});
|
|
381
|
+
this.loadConfig = true;
|
|
382
|
+
});
|
|
383
|
+
return page;
|
|
384
|
+
});
|
|
385
|
+
},
|
|
386
|
+
getPageId() {
|
|
387
|
+
if (!this.$query.id || !this.$_.isEmpty(this.currentPage)) {
|
|
388
|
+
return Promise.resolve(this.currentPage);
|
|
389
|
+
}
|
|
390
|
+
return this.$store.dispatch({
|
|
391
|
+
type: "ADD_PAGE",
|
|
392
|
+
pageId: this.$query.id
|
|
393
|
+
});
|
|
394
|
+
},
|
|
395
|
+
getMetaId() {
|
|
396
|
+
if (!this.currentMetaId || this.currentMeta) {
|
|
397
|
+
return Promise.resolve(this.currentMeta);
|
|
398
|
+
} else {
|
|
399
|
+
return this.$store.dispatch({
|
|
400
|
+
type: "ADD_META",
|
|
401
|
+
metaId: this.currentMetaId
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
getComponetName(component) {
|
|
406
|
+
if (component && component.PATH) {
|
|
407
|
+
let project = "frame";
|
|
408
|
+
let pathName = "";
|
|
409
|
+
const pagePath = component.PATH;
|
|
410
|
+
const rootMatch = pagePath.match(/^@\/\w+\//);
|
|
411
|
+
if (rootMatch) {
|
|
412
|
+
project = rootMatch[0].replace(/[@|/]/g, "");
|
|
413
|
+
pathName = pagePath.split(rootMatch)[1].replace(".vue", "");
|
|
414
|
+
}
|
|
415
|
+
const componentPath = pathName.replace("views/", "").replace("components/", "").replace("packages/", "").replace(/\//g, "-").replace(/(\w)([A-Z])/g, "$1-$2").toLowerCase();
|
|
416
|
+
const componentName = (project === "frame" ? "" : project + "-") + componentPath;
|
|
417
|
+
return componentName;
|
|
418
|
+
}
|
|
419
|
+
return null;
|
|
420
|
+
},
|
|
421
|
+
getVisualComponent(component) {
|
|
422
|
+
if (component && component.VISUAL_CONFIG_PATH) {
|
|
423
|
+
let pathName = "";
|
|
424
|
+
const pagePath = component.VISUAL_CONFIG_PATH;
|
|
425
|
+
const rootMatch = pagePath.match(/^@\/(frame\/|product\/|project\/)?/);
|
|
426
|
+
if (rootMatch) {
|
|
427
|
+
pathName = pagePath.split(rootMatch[0])[1].replace(".vue", "");
|
|
428
|
+
}
|
|
429
|
+
const componentPath = pathName.replace("views/", "").replace("components/", "").replace("packages/", "").replace(/\//g, "-").replace(/(\w)([A-Z])/g, "$1-$2").toLowerCase();
|
|
430
|
+
const componentName = componentPath;
|
|
431
|
+
return componentName;
|
|
432
|
+
}
|
|
433
|
+
return null;
|
|
434
|
+
},
|
|
435
|
+
getComponentList() {
|
|
436
|
+
this.$http.list({
|
|
437
|
+
entityId: "FM_PAGE",
|
|
438
|
+
"scope.TYPE": "01",
|
|
439
|
+
order_field: "ORDER_NUM",
|
|
440
|
+
order_mode: "asc"
|
|
441
|
+
}).then((data) => {
|
|
442
|
+
const componentList = data.entitys;
|
|
443
|
+
componentList.forEach((item) => {
|
|
444
|
+
item.componentName = item.CODE;
|
|
445
|
+
if (item.COMPONENT_TYPE === "page") {
|
|
446
|
+
const componentName = this.getComponetName(item);
|
|
447
|
+
item.componentName = componentName;
|
|
448
|
+
}
|
|
449
|
+
const visualComponentName = this.getVisualComponent(item);
|
|
450
|
+
item.visualComponentName = visualComponentName;
|
|
451
|
+
});
|
|
452
|
+
this.componentList = [...componentList];
|
|
453
|
+
});
|
|
454
|
+
},
|
|
455
|
+
getDefaultConfig() {
|
|
456
|
+
const { dashboardType, compId, componentInfo = {}, itemConfigs: queryItemConfigs = {} } = this.$query;
|
|
457
|
+
const { config: pageConfigs = {} } = this.currentPage || {};
|
|
458
|
+
this.chooseDesignTarget = dashboardType !== "component" && !(pageConfigs.items || []).length && !["pc", "mobile"].includes(pageConfigs.designTarget);
|
|
459
|
+
if (dashboardType === "component") {
|
|
460
|
+
this.upCompId = compId;
|
|
461
|
+
const { config: config2 = {} } = componentInfo;
|
|
462
|
+
const { items = [], ...globalConfigs } = normalizeDashboardConfig({ ...config2, ...queryItemConfigs[compId] || {} });
|
|
463
|
+
this.selectComponentList = ensureGridItemKey(items);
|
|
464
|
+
this.pageGlobalConfigs = mergeGridConfigs(globalConfigs).configs;
|
|
465
|
+
this.allComponentConfigs = this.$_.cloneDeep(queryItemConfigs);
|
|
466
|
+
} else {
|
|
467
|
+
const { itemConfigs = {}, items = [], ...globalConfigs } = normalizeDashboardConfig(pageConfigs);
|
|
468
|
+
this.selectComponentList = ensureGridItemKey(items);
|
|
469
|
+
this.pageGlobalConfigs = mergeGridConfigs(globalConfigs).configs;
|
|
470
|
+
this.allComponentConfigs = itemConfigs;
|
|
471
|
+
if (pageConfigs.version !== this.version) {
|
|
472
|
+
this.upgradePageConfig();
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
if (!this.pageGlobalConfigs.theme) this.pageGlobalConfigs.theme = DEFAULT_DASHBOARD_THEME;
|
|
476
|
+
this.getScopeConfigs();
|
|
477
|
+
this.getEntityRelation();
|
|
478
|
+
this.$nextTick(() => {
|
|
479
|
+
this.configReady = true;
|
|
480
|
+
});
|
|
481
|
+
},
|
|
482
|
+
upgradePageConfig() {
|
|
483
|
+
const ids = [];
|
|
484
|
+
const upgradeWidget = (arr, parentId) => {
|
|
485
|
+
arr.forEach((item) => {
|
|
486
|
+
const oldId = item.id;
|
|
487
|
+
if (parentId) {
|
|
488
|
+
while (ids.includes(item.id)) {
|
|
489
|
+
const code = item.contentType.replace(/-/g, "_");
|
|
490
|
+
item.id = code + "_" + this.$util.genId();
|
|
491
|
+
}
|
|
492
|
+
ids.push(item.id);
|
|
493
|
+
item.i = item.id;
|
|
494
|
+
const oldWidgetConifg = this.allComponentConfigs[parentId + "-" + oldId];
|
|
495
|
+
if (oldWidgetConifg) {
|
|
496
|
+
delete this.allComponentConfigs[parentId + "-" + oldId];
|
|
497
|
+
this.allComponentConfigs = { ...this.allComponentConfigs, [item.id]: { ...oldWidgetConifg } };
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
if (item.items) {
|
|
501
|
+
upgradeWidget(item.items, parentId ? parentId + "-" + oldId : oldId);
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
};
|
|
505
|
+
upgradeWidget(this.selectComponentList);
|
|
506
|
+
this.pageGlobalConfigs.version = this.version;
|
|
507
|
+
},
|
|
508
|
+
getReportList() {
|
|
509
|
+
this.reportLoading = true;
|
|
510
|
+
this.$http.list({
|
|
511
|
+
entityId: "FM_REPORT_BASE",
|
|
512
|
+
"scope.SYSTEM": this.SYSTEM,
|
|
513
|
+
scopeParams: JSON.stringify(this.reportScopeParams),
|
|
514
|
+
page: this.currentReportPage,
|
|
515
|
+
limit: 20
|
|
516
|
+
}).then((data) => {
|
|
517
|
+
this.reportList = data.entitys;
|
|
518
|
+
this.reportTotal = data.total;
|
|
519
|
+
this.reportList.forEach((item) => this.reportMap[item.ID] = item);
|
|
520
|
+
setTimeout(() => {
|
|
521
|
+
this.reportLoading = false;
|
|
522
|
+
}, 300);
|
|
523
|
+
}).catch((err) => {
|
|
524
|
+
this.reportLoading = false;
|
|
525
|
+
this.$message.error(err.message);
|
|
526
|
+
});
|
|
527
|
+
},
|
|
528
|
+
getThemeList() {
|
|
529
|
+
return this.$http.list({
|
|
530
|
+
entityId: "FM_CHART_THEME",
|
|
531
|
+
order_field: "SCOPE,ORDER_NUM",
|
|
532
|
+
order_mode: "desc,asc",
|
|
533
|
+
scopeParams: [
|
|
534
|
+
{ field: "SCOPE", values: "frame", link: "or" },
|
|
535
|
+
{ field: "CLIENT", values: this.CLIENT }
|
|
536
|
+
]
|
|
537
|
+
}).then((data) => {
|
|
538
|
+
this.themeList = data.entitys;
|
|
539
|
+
return this.themeList;
|
|
540
|
+
});
|
|
541
|
+
},
|
|
542
|
+
savePreset() {
|
|
543
|
+
this.saveThemeDialog = true;
|
|
544
|
+
const themeItem = this.themeList.find((item) => item.CODE === this.activeTheme);
|
|
545
|
+
this.themeFormData = {
|
|
546
|
+
STYLE: themeItem == null ? void 0 : themeItem.STYLE
|
|
547
|
+
};
|
|
548
|
+
},
|
|
549
|
+
saveTheme() {
|
|
550
|
+
const formData = {
|
|
551
|
+
SCOPE: "client"
|
|
552
|
+
};
|
|
553
|
+
for (const key in this.themeFormData) {
|
|
554
|
+
if (!key.includes("#")) {
|
|
555
|
+
formData[key] = this.themeFormData[key];
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
if (!this.isEditTheme || !this.themeFormData.ID) formData.CONTENT = JSON.stringify(this.themeStyles);
|
|
559
|
+
const params = {
|
|
560
|
+
entityId: "FM_CHART_THEME",
|
|
561
|
+
bean: {
|
|
562
|
+
...formData,
|
|
563
|
+
CLIENT: this.CLIENT,
|
|
564
|
+
SYSTEM: this.SYSTEM
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
if (this.themeFormData.ID) {
|
|
568
|
+
params.action = "update";
|
|
569
|
+
}
|
|
570
|
+
return this.$http.save(params).then(() => {
|
|
571
|
+
this.$message.success(this.$t("save successfully"));
|
|
572
|
+
this.isEditTheme = false;
|
|
573
|
+
this.saveThemeDialog = false;
|
|
574
|
+
this.getThemeList();
|
|
575
|
+
}).catch((err) => {
|
|
576
|
+
this.$message.error(err.message || this.$t("fail to save"));
|
|
577
|
+
});
|
|
578
|
+
},
|
|
579
|
+
themeHandleCommand(theme, command) {
|
|
580
|
+
if (command === "edit") {
|
|
581
|
+
this.saveThemeDialog = true;
|
|
582
|
+
this.isEditTheme = true;
|
|
583
|
+
this.themeFormData = { ...theme };
|
|
584
|
+
} else if (command === "remove") {
|
|
585
|
+
this.$confirm("是否删除该预设?", "提示", {
|
|
586
|
+
confirmButtonText: "确定",
|
|
587
|
+
cancelButtonText: "取消",
|
|
588
|
+
type: "warning"
|
|
589
|
+
}).then(() => {
|
|
590
|
+
this.$http.removeMulti({
|
|
591
|
+
entityId: "FM_CHART_THEME",
|
|
592
|
+
ids: theme.ID
|
|
593
|
+
}).then(() => {
|
|
594
|
+
this.$message.success(this.$t("delete successfully"));
|
|
595
|
+
this.getThemeList();
|
|
596
|
+
}).catch((err) => {
|
|
597
|
+
this.$message.error(err.message || this.$t("fail to delete"));
|
|
598
|
+
});
|
|
599
|
+
});
|
|
600
|
+
} else if (command === "config") {
|
|
601
|
+
this.editTheme = theme;
|
|
602
|
+
this.isEditTheme = false;
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
currentReportChange(v) {
|
|
606
|
+
this.currentReportPage = v;
|
|
607
|
+
this.getReportList();
|
|
608
|
+
},
|
|
609
|
+
searchReport(v) {
|
|
610
|
+
this.reportScopeParams = v;
|
|
611
|
+
this.currentReportPage = 1;
|
|
612
|
+
this.getReportList();
|
|
613
|
+
},
|
|
614
|
+
getDashboardList() {
|
|
615
|
+
this.dashboardLoading = true;
|
|
616
|
+
this.$http.list({
|
|
617
|
+
entityId: "FM_PAGE_CONFIG",
|
|
618
|
+
"scope.SYSTEM": this.SYSTEM,
|
|
619
|
+
"scope.PAGE|CODE": "dashboard",
|
|
620
|
+
scopeParams: JSON.stringify(this.dashboardScopeParams),
|
|
621
|
+
page: this.currentDashbaordPage,
|
|
622
|
+
limit: 10
|
|
623
|
+
}).then((data) => {
|
|
624
|
+
this.dashboardTotal = data.total;
|
|
625
|
+
setTimeout(() => {
|
|
626
|
+
this.dashboardLoading = false;
|
|
627
|
+
}, 300);
|
|
628
|
+
data.entitys.forEach((item) => {
|
|
629
|
+
const pageConfig = item.CONTENT ? JSON.parse(item.CONTENT) : {};
|
|
630
|
+
const { items = [], itemConfigs = {} } = pageConfig;
|
|
631
|
+
const children = [];
|
|
632
|
+
items.forEach((comp) => {
|
|
633
|
+
children.push({
|
|
634
|
+
...comp,
|
|
635
|
+
configs: itemConfigs[comp.id] || {}
|
|
636
|
+
});
|
|
637
|
+
if (comp.items) {
|
|
638
|
+
comp.items.forEach((tab) => {
|
|
639
|
+
tab.items.forEach((child) => {
|
|
640
|
+
children.push({
|
|
641
|
+
...child,
|
|
642
|
+
configs: itemConfigs[comp.id + "-" + child.id] || {}
|
|
643
|
+
});
|
|
644
|
+
});
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
item.children = children;
|
|
649
|
+
});
|
|
650
|
+
this.dashboardList = data.entitys.map((item) => {
|
|
651
|
+
item.children = item.children.filter((child) => child.contentType === "chart");
|
|
652
|
+
return item;
|
|
653
|
+
});
|
|
654
|
+
}).catch((err) => {
|
|
655
|
+
this.dashboardLoading = false;
|
|
656
|
+
this.$message.error(err.message);
|
|
657
|
+
});
|
|
658
|
+
},
|
|
659
|
+
currentDashbaordChange(v) {
|
|
660
|
+
this.currentDashboardPage = v;
|
|
661
|
+
this.getDashboardList();
|
|
662
|
+
},
|
|
663
|
+
searchDashboard(v) {
|
|
664
|
+
this.dashboardScopeParams = v;
|
|
665
|
+
this.currentDashboardPage = 1;
|
|
666
|
+
this.getDashboardList();
|
|
667
|
+
},
|
|
668
|
+
selectReport(item) {
|
|
669
|
+
const index = this.selectedReportList.findIndex((report) => report === item.ID);
|
|
670
|
+
if (index !== -1) {
|
|
671
|
+
this.selectedReportList.splice(index, 1);
|
|
672
|
+
this.selectedReportDataList.splice(index, 1);
|
|
673
|
+
} else {
|
|
674
|
+
this.selectedReportList.push(item.ID);
|
|
675
|
+
this.selectedReportDataList.push(item);
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
selectDashboardComp(dashbaord, item) {
|
|
679
|
+
const id = dashbaord.ID + "-" + item.id;
|
|
680
|
+
const index = this.selectedDashboardCompList.findIndex((comp) => comp === id);
|
|
681
|
+
if (index !== -1) {
|
|
682
|
+
this.selectedDashboardCompList.splice(index, 1);
|
|
683
|
+
this.selectedDashboardCompDataList.splice(index, 1);
|
|
684
|
+
} else {
|
|
685
|
+
this.selectedDashboardCompList.push(id);
|
|
686
|
+
this.selectedDashboardCompDataList.push(item);
|
|
687
|
+
}
|
|
688
|
+
},
|
|
689
|
+
changeDashboardSelect(dashboard, v) {
|
|
690
|
+
dashboard.children.forEach((item) => {
|
|
691
|
+
const id = dashboard.ID + "-" + item.id;
|
|
692
|
+
const index = this.selectedDashboardCompList.indexOf(id);
|
|
693
|
+
if (index !== -1) {
|
|
694
|
+
if (!v) this.selectedDashboardCompList.splice(index, 1);
|
|
695
|
+
} else {
|
|
696
|
+
if (v) this.selectedDashboardCompList.push(id);
|
|
697
|
+
}
|
|
698
|
+
});
|
|
699
|
+
},
|
|
700
|
+
switchDashboardFoldFn(dashboard) {
|
|
701
|
+
this.foldDashboardMap[dashboard.ID] = !this.foldDashboardMap[dashboard.ID];
|
|
702
|
+
},
|
|
703
|
+
quoteComp() {
|
|
704
|
+
for (let i = 0; i < this.selectedDashboardCompDataList.length; i++) {
|
|
705
|
+
const comp = this.selectedDashboardCompDataList[i];
|
|
706
|
+
if (comp) {
|
|
707
|
+
this.addComponentToDashboard({
|
|
708
|
+
w: comp.w,
|
|
709
|
+
h: comp.h,
|
|
710
|
+
TITLE: comp.title,
|
|
711
|
+
CODE: comp.contentType
|
|
712
|
+
}, { ...comp.configs });
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
this.copyComponentDialog = false;
|
|
716
|
+
this.selectedDashboardCompDataList = [];
|
|
717
|
+
this.selectedReportDataList = [];
|
|
718
|
+
this.selectedReportList = [];
|
|
719
|
+
this.selectedDashboardCompList = [];
|
|
720
|
+
},
|
|
721
|
+
copyReport(id) {
|
|
722
|
+
return this.$http.save({
|
|
723
|
+
entityId: "FM_REPORT_BASE",
|
|
724
|
+
action: "copy",
|
|
725
|
+
oldRecordId: id
|
|
726
|
+
});
|
|
727
|
+
},
|
|
728
|
+
async copyComp() {
|
|
729
|
+
for (let i = 0; i < this.selectedReportDataList.length; i++) {
|
|
730
|
+
const report = this.selectedReportDataList[i];
|
|
731
|
+
if (report) {
|
|
732
|
+
const data = await this.copyReport(report.ID);
|
|
733
|
+
this.addReportToDashboard({ id: data.id });
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
for (let i = 0; i < this.selectedDashboardCompDataList.length; i++) {
|
|
737
|
+
const comp = this.selectedDashboardCompDataList[i];
|
|
738
|
+
if (comp) {
|
|
739
|
+
if (comp.contentType === "report-chart") {
|
|
740
|
+
const data = await this.copyReport(comp.configs.id);
|
|
741
|
+
this.addComponentToDashboard({
|
|
742
|
+
w: comp.w,
|
|
743
|
+
h: comp.h,
|
|
744
|
+
TITLE: comp.title,
|
|
745
|
+
CODE: comp.contentType
|
|
746
|
+
}, { ...comp.configs, id: data.id });
|
|
747
|
+
} else {
|
|
748
|
+
this.addComponentToDashboard({
|
|
749
|
+
w: comp.w,
|
|
750
|
+
h: comp.h,
|
|
751
|
+
TITLE: comp.title,
|
|
752
|
+
CODE: comp.contentType
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
this.copyComponentDialog = false;
|
|
758
|
+
this.selectedDashboardCompDataList = [];
|
|
759
|
+
this.selectedReportDataList = [];
|
|
760
|
+
this.selectedReportList = [];
|
|
761
|
+
this.selectedDashboardCompList = [];
|
|
762
|
+
},
|
|
763
|
+
setReportType(reportType) {
|
|
764
|
+
this.addReportForm.TYPE = reportType.type;
|
|
765
|
+
if (reportType.type === "1") {
|
|
766
|
+
this.addReportForm.CHART_TYPE = null;
|
|
767
|
+
} else {
|
|
768
|
+
this.addReportForm.CHART_TYPE = reportType.chartType;
|
|
769
|
+
}
|
|
770
|
+
},
|
|
771
|
+
openAddReportDialog() {
|
|
772
|
+
this.addReportDialog = true;
|
|
773
|
+
this.addReportForm.OBJECT = this.currentMetaId;
|
|
774
|
+
},
|
|
775
|
+
saveReport() {
|
|
776
|
+
if (this.addReportForm.TYPE === "numStatistic") {
|
|
777
|
+
const newComp = this.addComponentToDashboard({ TITLE: "数字统计", CODE: "num-statistic" });
|
|
778
|
+
if (this.addReportForm.OBJECT) {
|
|
779
|
+
this.changeItemConfigs(newComp.id, { metaId: this.addReportForm.OBJECT.id });
|
|
780
|
+
}
|
|
781
|
+
this.addReportForm = {};
|
|
782
|
+
this.addReportDialog = false;
|
|
783
|
+
} else if (this.addReportForm.TYPE === "dashboardTitle") {
|
|
784
|
+
this.addComponentToDashboard({ TITLE: "标题", CODE: "dashboard-title", w: 48, h: 3 });
|
|
785
|
+
this.addReportForm = {};
|
|
786
|
+
this.addReportDialog = false;
|
|
787
|
+
} else if (this.addReportForm.TYPE === "dashboardDiv") {
|
|
788
|
+
this.addComponentToDashboard({ TITLE: "容器", CODE: "dashboard-div", w: 10, h: 10 });
|
|
789
|
+
this.addReportForm = {};
|
|
790
|
+
this.addReportDialog = false;
|
|
791
|
+
} else if (this.addReportForm.TYPE === "form") {
|
|
792
|
+
if (!this.addReportForm.FORM_TYPE) {
|
|
793
|
+
this.$message.error("请选择报表类型");
|
|
794
|
+
return;
|
|
795
|
+
}
|
|
796
|
+
this.$http.save({
|
|
797
|
+
entityId: "FM_FORM",
|
|
798
|
+
"bean.CLIENT": this.CLIENT,
|
|
799
|
+
"bean.SYSTEM": this.SYSTEM,
|
|
800
|
+
"bean.TYPE": this.addReportForm.FORM_TYPE
|
|
801
|
+
}).then((data) => {
|
|
802
|
+
this.addComponentToDashboard({ TITLE: "报表", CODE: "report-html" }, { id: data });
|
|
803
|
+
this.addReportForm = {};
|
|
804
|
+
this.addReportDialog = false;
|
|
805
|
+
}).catch((err) => this.$message.error(err.message));
|
|
806
|
+
} else {
|
|
807
|
+
const metaId = this.addReportForm.OBJECT ? this.addReportForm.OBJECT.id || this.addReportForm.OBJECT : "";
|
|
808
|
+
const metaViewId = this.addReportForm.OBJECT_VIEW ? this.addReportForm.OBJECT_VIEW.id || this.addReportForm.OBJECT_VIEW : "";
|
|
809
|
+
this.addChartToDashboard({ type: this.addReportForm.TYPE === "1" ? "table" : this.addReportForm.CHART_TYPE, metaId, metaViewId });
|
|
810
|
+
this.addReportForm = {};
|
|
811
|
+
this.addReportDialog = false;
|
|
812
|
+
}
|
|
813
|
+
},
|
|
814
|
+
async back() {
|
|
815
|
+
if (!await this.confirmLeaveMobile()) return;
|
|
816
|
+
this.mobileDirty = false;
|
|
817
|
+
if (this.newWindow) {
|
|
818
|
+
window.close();
|
|
819
|
+
} else if (this.upCompId) {
|
|
820
|
+
this.backPage();
|
|
821
|
+
} else {
|
|
822
|
+
this.$store.commit("DELETE_PAGE", { pageId: this.$query.id });
|
|
823
|
+
this.backPage({ reload: true });
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
getEntityRelation() {
|
|
827
|
+
this.$http.$get({
|
|
828
|
+
entityId: "FM_ENTITY_RELATION",
|
|
829
|
+
action: "getEntityRelationTree",
|
|
830
|
+
mainEntity: this.currentMetaId
|
|
831
|
+
}).then((data) => {
|
|
832
|
+
data.forEach((relation) => {
|
|
833
|
+
relation.label = relation.title;
|
|
834
|
+
relation.value = relation.flag;
|
|
835
|
+
relation.children = relation.childrens;
|
|
836
|
+
if (relation.childrens) {
|
|
837
|
+
relation.childrens.forEach((childRelation) => {
|
|
838
|
+
childRelation.value = relation.flag + "#" + childRelation.flag;
|
|
839
|
+
childRelation.label = childRelation.title;
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
});
|
|
843
|
+
this.relationList = data;
|
|
844
|
+
});
|
|
845
|
+
},
|
|
846
|
+
/**
|
|
847
|
+
* 获取查询配置
|
|
848
|
+
*/
|
|
849
|
+
getScopeConfigs() {
|
|
850
|
+
this.$http.list({
|
|
851
|
+
action: "getAllSearchConfig",
|
|
852
|
+
entityId: "FM_SEARCH_CONFIG"
|
|
853
|
+
}).then((data) => {
|
|
854
|
+
this.scopeConfigs = data;
|
|
855
|
+
});
|
|
856
|
+
},
|
|
857
|
+
setComponentId(str) {
|
|
858
|
+
return str + "_" + this.$util.genId();
|
|
859
|
+
},
|
|
860
|
+
changeItemConfigs(key, configs = {}, type, mode) {
|
|
861
|
+
if (key === "page") {
|
|
862
|
+
if (configs.componentName !== void 0) {
|
|
863
|
+
configs.title = configs.componentName;
|
|
864
|
+
delete configs.componentName;
|
|
865
|
+
}
|
|
866
|
+
const { configs: next, colNum } = mergeGridConfigs(this.pageGlobalConfigs, configs);
|
|
867
|
+
if (colNum) {
|
|
868
|
+
this.confirmRescale(colNum).then((rescale) => {
|
|
869
|
+
if (rescale) {
|
|
870
|
+
rescaleItemsToColNum(this.selectComponentList, colNum.from, colNum.to);
|
|
871
|
+
this.selectComponentList = [...this.selectComponentList];
|
|
872
|
+
}
|
|
873
|
+
this.pageGlobalConfigs = next;
|
|
874
|
+
});
|
|
875
|
+
return;
|
|
876
|
+
}
|
|
877
|
+
this.pageGlobalConfigs = next;
|
|
878
|
+
} else {
|
|
879
|
+
const compId = key;
|
|
880
|
+
const itemConfig = this.allComponentConfigs[compId] || {};
|
|
881
|
+
const { flex, layout, direction, justify, align, style, componentName: title, visualComponentName, span, xsspan, items, ...otherConfigs } = configs;
|
|
882
|
+
let componentAttris = {
|
|
883
|
+
flex,
|
|
884
|
+
layout,
|
|
885
|
+
direction,
|
|
886
|
+
justify,
|
|
887
|
+
align,
|
|
888
|
+
style,
|
|
889
|
+
title,
|
|
890
|
+
span,
|
|
891
|
+
xsspan,
|
|
892
|
+
items
|
|
893
|
+
};
|
|
894
|
+
if (type !== "component") {
|
|
895
|
+
if (mode === "cover") {
|
|
896
|
+
this.allComponentConfigs[compId] = { ...otherConfigs };
|
|
897
|
+
} else {
|
|
898
|
+
this.allComponentConfigs[compId] = { ...itemConfig, ...otherConfigs };
|
|
899
|
+
}
|
|
900
|
+
} else {
|
|
901
|
+
componentAttris = { ...componentAttris, ...configs };
|
|
902
|
+
}
|
|
903
|
+
const selectComponentList = [...this.selectComponentList];
|
|
904
|
+
const id = key;
|
|
905
|
+
const changeItem = (componentList) => {
|
|
906
|
+
for (const component of componentList) {
|
|
907
|
+
if (component.id === id) {
|
|
908
|
+
for (const attri in componentAttris) {
|
|
909
|
+
if (componentAttris[attri] !== void 0) {
|
|
910
|
+
component[attri] = componentAttris[attri];
|
|
911
|
+
if (component[attri] === null) delete component[attri];
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
if (this.selectComponent && compId === this.selectComponent.id) {
|
|
915
|
+
this.selectComponent = { ...this.selectComponent, ...this.isMobileDashboard ? { config: { ...component, ...component.configs, ...this.allComponentConfigs[compId] } } : { component } };
|
|
916
|
+
}
|
|
917
|
+
} else if (component.items && component.items.length > 0) {
|
|
918
|
+
changeItem(component.items);
|
|
919
|
+
}
|
|
920
|
+
if (!component.items) component.items = [];
|
|
921
|
+
}
|
|
922
|
+
};
|
|
923
|
+
changeItem(selectComponentList);
|
|
924
|
+
this.selectComponentList = [...selectComponentList];
|
|
925
|
+
}
|
|
926
|
+
},
|
|
927
|
+
// 改列数:询问是否按比例换算现有组件的位置与宽度(取消 = 只改参数、坐标不动)。resolve 布尔值,永不 reject
|
|
928
|
+
confirmRescale({ from, to }) {
|
|
929
|
+
return this.$confirm(`列数将从 ${from} 改为 ${to},按比例换算现有组件位置与宽度?(不换算则组件保持原网格坐标)`, "修改列数", {
|
|
930
|
+
confirmButtonText: "换算",
|
|
931
|
+
cancelButtonText: "不换算",
|
|
932
|
+
customClass: "dashboard-grid-rescale-confirm",
|
|
933
|
+
type: "warning",
|
|
934
|
+
closeOnClickModal: false
|
|
935
|
+
}).then(() => true).catch(() => false);
|
|
936
|
+
},
|
|
937
|
+
addComponent(component, upId = "root") {
|
|
938
|
+
const newComp = {
|
|
939
|
+
id: component.id,
|
|
940
|
+
title: component.TITLE,
|
|
941
|
+
contentType: component.componentName || component.CODE
|
|
942
|
+
};
|
|
943
|
+
if (upId === "root") {
|
|
944
|
+
this.selectComponentList.push(newComp);
|
|
945
|
+
} else {
|
|
946
|
+
const selectComponentList = [...this.selectComponentList];
|
|
947
|
+
const ids = upId.split("-");
|
|
948
|
+
const componentList = ids.reduce((componentList2, id) => {
|
|
949
|
+
const componentItem = componentList2.find((item) => item.id === id) || {};
|
|
950
|
+
if (!componentItem.items) componentItem.items = [];
|
|
951
|
+
return componentItem.items;
|
|
952
|
+
}, selectComponentList);
|
|
953
|
+
componentList.push(newComp);
|
|
954
|
+
this.selectComponentList = selectComponentList;
|
|
955
|
+
this.$forceUpdate();
|
|
956
|
+
}
|
|
957
|
+
},
|
|
958
|
+
addComponentToDashboard(component, configs) {
|
|
959
|
+
this.addComponentDialog = false;
|
|
960
|
+
const dashboard = this.$refs.dashboardDesign;
|
|
961
|
+
let max = 0;
|
|
962
|
+
const parent = this.isMobileDashboard && this.mobileAddParent ? indexDashboardItems(this.selectComponentList).get(String(this.mobileAddParent)) : null;
|
|
963
|
+
const destination = parent ? parent.items || (parent.items = []) : this.selectComponentList;
|
|
964
|
+
for (const item of this.isMobileDashboard ? destination : dashboard.layout) {
|
|
965
|
+
if (!max) {
|
|
966
|
+
max = item.y + item.h;
|
|
967
|
+
} else if (item.y + item.h > max) {
|
|
968
|
+
max = item.y + item.h;
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
const id = this.setComponentId(component.CODE);
|
|
972
|
+
const newComp = {
|
|
973
|
+
x: 0,
|
|
974
|
+
y: max,
|
|
975
|
+
// puts it at the bottom
|
|
976
|
+
w: this.isMobileDashboard ? ["num-statistic", "card-num"].includes(component.CODE) ? this.pageGlobalConfigs.grid.colNum / 2 : this.pageGlobalConfigs.grid.colNum : component.w || 10,
|
|
977
|
+
h: component.h || (this.isMobileDashboard && ["chart", "report-chart", "dashboard-tabs", "dashboard-div"].includes(component.CODE) ? 16 : 10),
|
|
978
|
+
i: id,
|
|
979
|
+
id,
|
|
980
|
+
title: component.TITLE,
|
|
981
|
+
contentType: component.CODE
|
|
982
|
+
};
|
|
983
|
+
if (this.isMobileDashboard) {
|
|
984
|
+
if (component.CODE === "dashboard-tabs") newComp.items = [{ id: "tabpane_" + this.$util.genId(), name: "标签项1", items: [] }];
|
|
985
|
+
destination.push(newComp);
|
|
986
|
+
if (configs) this.changeItemConfigs(id, configs);
|
|
987
|
+
this.mobileAddParent = null;
|
|
988
|
+
this.$nextTick(() => dashboard.openConfig(newComp));
|
|
989
|
+
return newComp;
|
|
990
|
+
}
|
|
991
|
+
dashboard.layout.push(newComp);
|
|
992
|
+
this.selectComponentList.push(newComp);
|
|
993
|
+
if (configs) this.changeItemConfigs(id, configs);
|
|
994
|
+
return newComp;
|
|
995
|
+
},
|
|
996
|
+
addChartToDashboard(data, configs = {}) {
|
|
997
|
+
if (data) {
|
|
998
|
+
this.addComponentToDashboard({ CODE: "chart", TITLE: "未命名统计报表", ...configs }, { ...data });
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
addReportToDashboard(data, configs = {}) {
|
|
1002
|
+
if (data) {
|
|
1003
|
+
this.addComponentToDashboard({ CODE: "report-chart", TITLE: "报表", ...configs }, { id: data.id });
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
1006
|
+
addTabsToDashboard() {
|
|
1007
|
+
this.addComponentToDashboard({ CODE: "dashboard-tabs", TITLE: "标签页" });
|
|
1008
|
+
},
|
|
1009
|
+
deleteSelectComponent(id, e) {
|
|
1010
|
+
e && e.stopPropagation();
|
|
1011
|
+
const selectComponentList = [...this.selectComponentList];
|
|
1012
|
+
const ids = id.split("-");
|
|
1013
|
+
ids.reduce((componentList, id2, index) => {
|
|
1014
|
+
if (index === ids.length - 1) {
|
|
1015
|
+
const componentIndex = componentList.findIndex((item) => item.id === id2) || {};
|
|
1016
|
+
componentList.splice(componentIndex, 1);
|
|
1017
|
+
} else {
|
|
1018
|
+
const componentItem = componentList.find((item) => item.id === id2) || {};
|
|
1019
|
+
return componentItem.items;
|
|
1020
|
+
}
|
|
1021
|
+
}, selectComponentList);
|
|
1022
|
+
this.selectComponentList = selectComponentList;
|
|
1023
|
+
this.$forceUpdate();
|
|
1024
|
+
},
|
|
1025
|
+
changeConfigs(id, newConfigs) {
|
|
1026
|
+
const configs = this.componentConfigs[id] || {};
|
|
1027
|
+
this.componentConfigs[id] = { ...configs, ...newConfigs };
|
|
1028
|
+
},
|
|
1029
|
+
deleteConfigs(id) {
|
|
1030
|
+
delete this.allComponentConfigs[id];
|
|
1031
|
+
},
|
|
1032
|
+
pageSetting() {
|
|
1033
|
+
const { visualConfigPath } = this.currentPage;
|
|
1034
|
+
const name = this.getVisualComponent({ VISUAL_CONFIG_PATH: visualConfigPath });
|
|
1035
|
+
this.selectComponent = { type: "page", id: "page", ...this.currentPage, visualComponentName: name, config: this.pageGlobalConfigs };
|
|
1036
|
+
},
|
|
1037
|
+
// tab:抽屉打开时定位的 tab(chart 项操作条的「布局」按钮传 'style',R29);openSeq 每次打开递增,面板据此区分「打开」与配置改动引起的对象替换
|
|
1038
|
+
clickComponent(componentId, componentInfo, component, upId, tab) {
|
|
1039
|
+
this.openSeq = (this.openSeq || 0) + 1;
|
|
1040
|
+
this.selectComponent = { id: componentId, ...componentInfo, config: component, upId, openTab: tab, openSeq: this.openSeq };
|
|
1041
|
+
},
|
|
1042
|
+
scrollToConfig(componentId) {
|
|
1043
|
+
},
|
|
1044
|
+
setComponentConfig(componentList, itemConfigs = {}, upId) {
|
|
1045
|
+
componentList.forEach((component) => {
|
|
1046
|
+
const componentId = upId ? upId + "-" + component.id : component.id;
|
|
1047
|
+
const configComponentOuter = this.$refs[`config-${component.id}`];
|
|
1048
|
+
if (configComponentOuter) {
|
|
1049
|
+
const configComponent = configComponentOuter.$refs.component;
|
|
1050
|
+
if (configComponent) {
|
|
1051
|
+
const configs = configComponent.getConfigs() || {};
|
|
1052
|
+
const { span, flex, componentName } = configs;
|
|
1053
|
+
if (span) component.span = span;
|
|
1054
|
+
delete component.configs;
|
|
1055
|
+
if (componentName) {
|
|
1056
|
+
component.title = componentName;
|
|
1057
|
+
delete configs.componentName;
|
|
1058
|
+
}
|
|
1059
|
+
if (flex) {
|
|
1060
|
+
component.flex = flex;
|
|
1061
|
+
delete configs.flex;
|
|
1062
|
+
}
|
|
1063
|
+
const defaulConfigs = itemConfigs[componentId] || {};
|
|
1064
|
+
itemConfigs[componentId] = { ...defaulConfigs, ...configs };
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
const { items = [] } = component;
|
|
1068
|
+
if (items.length > 0) {
|
|
1069
|
+
this.setComponentConfig(items, itemConfigs, componentId);
|
|
1070
|
+
}
|
|
1071
|
+
});
|
|
1072
|
+
},
|
|
1073
|
+
setContainerDefaultItems(id, items) {
|
|
1074
|
+
if (id === "page") {
|
|
1075
|
+
const { config: pageConfigs = {} } = this.currentPage || {};
|
|
1076
|
+
if (!pageConfigs.items) this.selectComponentList = items;
|
|
1077
|
+
} else {
|
|
1078
|
+
const selectComponentList = [...this.selectComponentList];
|
|
1079
|
+
const ids = id.split("-");
|
|
1080
|
+
ids.reduce((componentList, id2, index) => {
|
|
1081
|
+
const componentItem = componentList.find((item) => item.id === id2) || {};
|
|
1082
|
+
if (!componentItem.items) {
|
|
1083
|
+
if (index === ids.length - 1) componentItem.items = items;
|
|
1084
|
+
else componentItem.items = [];
|
|
1085
|
+
}
|
|
1086
|
+
return componentItem.items;
|
|
1087
|
+
}, selectComponentList);
|
|
1088
|
+
this.selectComponentList = selectComponentList;
|
|
1089
|
+
}
|
|
1090
|
+
},
|
|
1091
|
+
cancelThemePancel() {
|
|
1092
|
+
if (this.editTheme) {
|
|
1093
|
+
this.editTheme = null;
|
|
1094
|
+
} else {
|
|
1095
|
+
this.showPanel = "";
|
|
1096
|
+
this.activeTheme = this.pageGlobalConfigs.theme;
|
|
1097
|
+
}
|
|
1098
|
+
this.getConfigThemeStyles();
|
|
1099
|
+
},
|
|
1100
|
+
selectTheme(theme) {
|
|
1101
|
+
this.activeTheme = theme.CODE;
|
|
1102
|
+
this.changethemeStyles(JSON.parse(theme.CONTENT));
|
|
1103
|
+
},
|
|
1104
|
+
getConfigThemeStyles() {
|
|
1105
|
+
const { theme, themeStyles } = this.pageGlobalConfigs;
|
|
1106
|
+
let selectedTheme = theme || DEFAULT_DASHBOARD_THEME;
|
|
1107
|
+
let themeItem = this.themeList.find((item) => item.CODE === selectedTheme);
|
|
1108
|
+
if (!themeItem && selectedTheme === DEFAULT_DASHBOARD_THEME) {
|
|
1109
|
+
themeItem = this.themeList.find((item) => item.NAME === "经典白" && item.CODE);
|
|
1110
|
+
if (themeItem) selectedTheme = themeItem.CODE;
|
|
1111
|
+
}
|
|
1112
|
+
if (this.pageGlobalConfigs.theme !== selectedTheme) this.pageGlobalConfigs.theme = selectedTheme;
|
|
1113
|
+
this.activeTheme = selectedTheme;
|
|
1114
|
+
if (themeStyles) {
|
|
1115
|
+
this.styleType = "custom";
|
|
1116
|
+
this.themeStyles = themeStyles;
|
|
1117
|
+
} else {
|
|
1118
|
+
this.styleType = "presets";
|
|
1119
|
+
this.themeStyles = (themeItem == null ? void 0 : themeItem.CONTENT) ? typeof themeItem.CONTENT === "string" ? JSON.parse(themeItem.CONTENT) : themeItem.CONTENT : null;
|
|
1120
|
+
}
|
|
1121
|
+
},
|
|
1122
|
+
changethemeStyles(v) {
|
|
1123
|
+
this.themeStyles = v;
|
|
1124
|
+
},
|
|
1125
|
+
setTheme() {
|
|
1126
|
+
if (this.editTheme) {
|
|
1127
|
+
this.themeFormData = { ...this.editTheme };
|
|
1128
|
+
this.saveTheme().then(() => {
|
|
1129
|
+
this.editTheme = null;
|
|
1130
|
+
});
|
|
1131
|
+
} else {
|
|
1132
|
+
this.showPanel = "";
|
|
1133
|
+
if (this.styleType === "custom") {
|
|
1134
|
+
this.changeItemConfigs("page", { themeStyles: this.themeStyles });
|
|
1135
|
+
} else {
|
|
1136
|
+
this.changeItemConfigs("page", { theme: this.activeTheme, themeStyles: null });
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
},
|
|
1140
|
+
delaySaveConfigs() {
|
|
1141
|
+
if (this.chooseDesignTarget || this.choosingDesignTarget) return;
|
|
1142
|
+
if (this.isMobileDashboard) {
|
|
1143
|
+
if (this.configReady) {
|
|
1144
|
+
this.mobileDirty = true;
|
|
1145
|
+
this.mobileRevision++;
|
|
1146
|
+
}
|
|
1147
|
+
return;
|
|
1148
|
+
}
|
|
1149
|
+
if (this.timer) {
|
|
1150
|
+
clearTimeout(this.timer);
|
|
1151
|
+
}
|
|
1152
|
+
this.timer = setTimeout(() => {
|
|
1153
|
+
this.saveConfigs();
|
|
1154
|
+
clearTimeout(this.timer);
|
|
1155
|
+
this.timer = null;
|
|
1156
|
+
}, 1e3);
|
|
1157
|
+
},
|
|
1158
|
+
saveConfigs(event, next, errorFn) {
|
|
1159
|
+
const selectComponentList = [...this.selectComponentList];
|
|
1160
|
+
const rawItemConfigs = { ...this.allComponentConfigs };
|
|
1161
|
+
this.setComponentConfig(selectComponentList, rawItemConfigs, "");
|
|
1162
|
+
const { itemConfigs, ...config2 } = stripDashboardConfig({ ...this.pageGlobalConfigs, version: this.version, items: selectComponentList, itemConfigs: rawItemConfigs });
|
|
1163
|
+
for (const key in itemConfigs) {
|
|
1164
|
+
const itemConfig = itemConfigs[key];
|
|
1165
|
+
for (const itemKey in itemConfig) {
|
|
1166
|
+
if (itemConfig[itemKey] === null || itemConfig[itemKey] === void 0) {
|
|
1167
|
+
delete itemConfig[itemKey];
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
if (this.$_.isEmpty(itemConfig)) {
|
|
1171
|
+
delete itemConfigs[key];
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
this.selectComponentList = [...selectComponentList];
|
|
1175
|
+
if (this.upCompId) {
|
|
1176
|
+
const { setCompConfigs } = this.$query;
|
|
1177
|
+
setCompConfigs(config2, itemConfigs);
|
|
1178
|
+
} else {
|
|
1179
|
+
config2.itemConfigs = itemConfigs;
|
|
1180
|
+
return __epxPackagePreload(() => import(
|
|
1181
|
+
/* webpackChunkName: "standalone" */
|
|
1182
|
+
"@babel/standalone"
|
|
1183
|
+
), true ? [] : void 0, import.meta.url).then((babel) => {
|
|
1184
|
+
const es5 = babel.transform(config2.JS || "", { presets: ["env"] });
|
|
1185
|
+
config2.compileJS = es5.code;
|
|
1186
|
+
for (const key in config2) {
|
|
1187
|
+
if (config2[key] === null) {
|
|
1188
|
+
delete config2[key];
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
return this.savePageConfigs(config2, next, errorFn);
|
|
1192
|
+
});
|
|
1193
|
+
}
|
|
1194
|
+
},
|
|
1195
|
+
saveGlobalConfigs() {
|
|
1196
|
+
this.pageSettingDrawer = false;
|
|
1197
|
+
},
|
|
1198
|
+
savePageConfigs(config2) {
|
|
1199
|
+
let formParams = {};
|
|
1200
|
+
const globalConfig = this.$refs.globalConfig;
|
|
1201
|
+
if (globalConfig) {
|
|
1202
|
+
const formComp = this.getComponentById("form", globalConfig);
|
|
1203
|
+
if (formComp) {
|
|
1204
|
+
formParams = formComp.getFormData();
|
|
1205
|
+
if (!formParams) return;
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
const saveEntityId = this.$query.saveEntityId;
|
|
1209
|
+
const saveField = this.$query.saveField || "CONTENT";
|
|
1210
|
+
return this.$http.update({
|
|
1211
|
+
entityId: saveEntityId || this.$metaId,
|
|
1212
|
+
...formParams,
|
|
1213
|
+
[`bean.${this.$metaKey}`]: this.$query.id,
|
|
1214
|
+
[`bean.${saveField}`]: JSON.stringify(config2, null, " ")
|
|
1215
|
+
}).then((data) => {
|
|
1216
|
+
if (this.newWindow) {
|
|
1217
|
+
if (window.opener) window.opener.postMessage({ pageId: this.$query.id, type: "configPage" }, "/");
|
|
1218
|
+
}
|
|
1219
|
+
return true;
|
|
1220
|
+
}).catch((err) => {
|
|
1221
|
+
this.$message.error(err.message || this.$t("fail to save"));
|
|
1222
|
+
return false;
|
|
1223
|
+
});
|
|
1224
|
+
},
|
|
1225
|
+
switchMobile() {
|
|
1226
|
+
const { mItems } = this.pageGlobalConfigs;
|
|
1227
|
+
this.openSuspendedPopup({
|
|
1228
|
+
component: "visual-config-dashboard-mobile",
|
|
1229
|
+
params: {
|
|
1230
|
+
withHeader: false,
|
|
1231
|
+
componentList: this.selectComponentList,
|
|
1232
|
+
mobileComponentList: mItems,
|
|
1233
|
+
theme: this.activeTheme,
|
|
1234
|
+
themeStyles: this.themeStyles,
|
|
1235
|
+
itemConfigs: this.allComponentConfigs,
|
|
1236
|
+
// 页面全局配置:移动端设计器据其 grid 推网格参数(行高沿用页面、间距换成移动端 [8,8]),与运行态移动端一致
|
|
1237
|
+
globalConfigs: this.pageGlobalConfigs,
|
|
1238
|
+
changeMItems: (v) => {
|
|
1239
|
+
this.pageGlobalConfigs.mItems = v;
|
|
1240
|
+
this.mobileComponentList = v;
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
});
|
|
1244
|
+
},
|
|
1245
|
+
updatePreviewViewport() {
|
|
1246
|
+
this.previewViewportWidth = window.innerWidth;
|
|
1247
|
+
this.previewViewportHeight = window.innerHeight;
|
|
1248
|
+
},
|
|
1249
|
+
openSuspendedPopup(page) {
|
|
1250
|
+
this.previewSuspended = true;
|
|
1251
|
+
this.$nextTick(() => {
|
|
1252
|
+
const previousPopups = new Set(window.openedPopup || []);
|
|
1253
|
+
this.goPage(page);
|
|
1254
|
+
const popup = (window.openedPopup || []).find((item) => !previousPopups.has(item) && !item.closed);
|
|
1255
|
+
if (!popup) {
|
|
1256
|
+
this.previewSuspended = false;
|
|
1257
|
+
return;
|
|
1258
|
+
}
|
|
1259
|
+
if (this.previewPopupTimer) clearInterval(this.previewPopupTimer);
|
|
1260
|
+
this.previewPopupTimer = setInterval(() => {
|
|
1261
|
+
if (!popup.disposed) return;
|
|
1262
|
+
clearInterval(this.previewPopupTimer);
|
|
1263
|
+
this.previewPopupTimer = null;
|
|
1264
|
+
this.previewSuspended = false;
|
|
1265
|
+
}, 200);
|
|
1266
|
+
});
|
|
1267
|
+
},
|
|
1268
|
+
preview() {
|
|
1269
|
+
if (this.isMobileDashboard) {
|
|
1270
|
+
this.updatePreviewViewport();
|
|
1271
|
+
this.mobilePreviewVisible = true;
|
|
1272
|
+
return;
|
|
1273
|
+
}
|
|
1274
|
+
this.$store.commit("DELETE_PAGE", { pageId: this.$query.id });
|
|
1275
|
+
setTimeout(() => {
|
|
1276
|
+
this.openSuspendedPopup({
|
|
1277
|
+
pageId: this.$query.id
|
|
1278
|
+
});
|
|
1279
|
+
}, 100);
|
|
1280
|
+
}
|
|
1281
|
+
},
|
|
1282
|
+
watch: {
|
|
1283
|
+
pageGlobalConfigs: {
|
|
1284
|
+
handler(v) {
|
|
1285
|
+
if (!this.$_.isEqual(this.oldPageGlobalConfigs, v)) {
|
|
1286
|
+
this.delaySaveConfigs();
|
|
1287
|
+
}
|
|
1288
|
+
this.oldPageGlobalConfigs = this.$_.cloneDeep(v);
|
|
1289
|
+
},
|
|
1290
|
+
deep: true
|
|
1291
|
+
},
|
|
1292
|
+
selectComponentList: {
|
|
1293
|
+
handler(v) {
|
|
1294
|
+
if (!this.$_.isEqual(this.oldSelectComponentList, v)) {
|
|
1295
|
+
this.delaySaveConfigs();
|
|
1296
|
+
}
|
|
1297
|
+
this.oldSelectComponentList = this.$_.cloneDeep(v);
|
|
1298
|
+
},
|
|
1299
|
+
deep: true
|
|
1300
|
+
},
|
|
1301
|
+
allComponentConfigs: {
|
|
1302
|
+
handler(v) {
|
|
1303
|
+
if (!this.$_.isEqual(this.oldAllComponentConfigs, v)) {
|
|
1304
|
+
this.delaySaveConfigs();
|
|
1305
|
+
}
|
|
1306
|
+
this.oldAllComponentConfigs = this.$_.cloneDeep(v);
|
|
1307
|
+
},
|
|
1308
|
+
deep: true
|
|
1309
|
+
}
|
|
1310
|
+
},
|
|
1311
|
+
created() {
|
|
1312
|
+
window.addEventListener("resize", this.updatePreviewViewport);
|
|
1313
|
+
window.addEventListener("beforeunload", this.warnUnsavedMobile);
|
|
1314
|
+
this.removeMobileRouteGuard = this.$router.beforeEach(() => this.confirmLeaveMobile());
|
|
1315
|
+
if (this.showMenu) {
|
|
1316
|
+
this.changeMenuFlag = true;
|
|
1317
|
+
this.$store.commit("SWITCH_MENU_SHOW", false);
|
|
1318
|
+
}
|
|
1319
|
+
if (this.showAppNav) {
|
|
1320
|
+
this.changeAppNavFlag = true;
|
|
1321
|
+
this.$store.commit("SWITCH_APP_NAV_SHOW", false);
|
|
1322
|
+
}
|
|
1323
|
+
this.getPageInfo();
|
|
1324
|
+
if (this.$query.dashboardType === "component") {
|
|
1325
|
+
this.getDefaultConfig();
|
|
1326
|
+
}
|
|
1327
|
+
this.getComponentList();
|
|
1328
|
+
this.getReportList();
|
|
1329
|
+
this.getDashboardList();
|
|
1330
|
+
},
|
|
1331
|
+
beforeUnmount() {
|
|
1332
|
+
window.removeEventListener("resize", this.updatePreviewViewport);
|
|
1333
|
+
if (this.previewPopupTimer) clearInterval(this.previewPopupTimer);
|
|
1334
|
+
if (this.timer) clearTimeout(this.timer);
|
|
1335
|
+
window.removeEventListener("beforeunload", this.warnUnsavedMobile);
|
|
1336
|
+
if (this.removeMobileRouteGuard) this.removeMobileRouteGuard();
|
|
1337
|
+
if (this.changeMenuFlag) {
|
|
1338
|
+
this.$store.commit("SWITCH_MENU_SHOW", true);
|
|
1339
|
+
}
|
|
1340
|
+
if (this.changeAppNavFlag) {
|
|
1341
|
+
this.$store.commit("SWITCH_APP_NAV_SHOW", true);
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
};
|
|
1345
|
+
const _hoisted_1 = { class: "page-header" };
|
|
1346
|
+
const _hoisted_2 = { class: "page-title" };
|
|
1347
|
+
const _hoisted_3 = { class: "page-header__title" };
|
|
1348
|
+
const _hoisted_4 = { class: "page-header__operate" };
|
|
1349
|
+
const _hoisted_5 = {
|
|
1350
|
+
key: 2,
|
|
1351
|
+
class: "mobile-save-status"
|
|
1352
|
+
};
|
|
1353
|
+
const _hoisted_6 = {
|
|
1354
|
+
key: 0,
|
|
1355
|
+
class: "design-target-picker"
|
|
1356
|
+
};
|
|
1357
|
+
const _hoisted_7 = { class: "design-target-picker__options" };
|
|
1358
|
+
const _hoisted_8 = {
|
|
1359
|
+
key: 1,
|
|
1360
|
+
class: "page-content"
|
|
1361
|
+
};
|
|
1362
|
+
const _hoisted_9 = { class: "page-tabs" };
|
|
1363
|
+
const _hoisted_10 = { class: "function-panel" };
|
|
1364
|
+
const _hoisted_11 = {
|
|
1365
|
+
key: 0,
|
|
1366
|
+
class: "dashboard-theme"
|
|
1367
|
+
};
|
|
1368
|
+
const _hoisted_12 = { class: "dashboard-theme__title" };
|
|
1369
|
+
const _hoisted_13 = { class: "dashboard-theme__content" };
|
|
1370
|
+
const _hoisted_14 = {
|
|
1371
|
+
key: 0,
|
|
1372
|
+
class: "dashboard-theme__list"
|
|
1373
|
+
};
|
|
1374
|
+
const _hoisted_15 = ["onClick"];
|
|
1375
|
+
const _hoisted_16 = { class: "dashboard-theme__preview" };
|
|
1376
|
+
const _hoisted_17 = ["src"];
|
|
1377
|
+
const _hoisted_18 = { class: "dashboard-theme__name" };
|
|
1378
|
+
const _hoisted_19 = { class: "dashboard-theme__name-text" };
|
|
1379
|
+
const _hoisted_20 = {
|
|
1380
|
+
key: 0,
|
|
1381
|
+
class: "dashboard-theme__name-icon el-icon-user"
|
|
1382
|
+
};
|
|
1383
|
+
const _hoisted_21 = { class: "dashboard-theme__footer" };
|
|
1384
|
+
const _hoisted_22 = {
|
|
1385
|
+
key: 0,
|
|
1386
|
+
class: "page-preview"
|
|
1387
|
+
};
|
|
1388
|
+
const _hoisted_23 = {
|
|
1389
|
+
key: 0,
|
|
1390
|
+
class: "config-panel"
|
|
1391
|
+
};
|
|
1392
|
+
const _hoisted_24 = {
|
|
1393
|
+
key: 0,
|
|
1394
|
+
class: "add-report-body"
|
|
1395
|
+
};
|
|
1396
|
+
const _hoisted_25 = { class: "add-report-item" };
|
|
1397
|
+
const _hoisted_26 = { class: "report-type__list" };
|
|
1398
|
+
const _hoisted_27 = ["onClick"];
|
|
1399
|
+
const _hoisted_28 = { class: "add-report-item" };
|
|
1400
|
+
const _hoisted_29 = { class: "add-report-item" };
|
|
1401
|
+
const _hoisted_30 = { class: "add-report-item" };
|
|
1402
|
+
const _hoisted_31 = { class: "add-report-footer" };
|
|
1403
|
+
const _hoisted_32 = { class: "dashboard-search" };
|
|
1404
|
+
const _hoisted_33 = { class: "dashboard-list" };
|
|
1405
|
+
const _hoisted_34 = { class: "dashboard-header" };
|
|
1406
|
+
const _hoisted_35 = ["onClick"];
|
|
1407
|
+
const _hoisted_36 = { class: "dashboard-body" };
|
|
1408
|
+
const _hoisted_37 = { class: "dashboard-comp__list" };
|
|
1409
|
+
const _hoisted_38 = ["onClick"];
|
|
1410
|
+
const _hoisted_39 = {
|
|
1411
|
+
key: 0,
|
|
1412
|
+
class: "no-data"
|
|
1413
|
+
};
|
|
1414
|
+
const _hoisted_40 = { class: "dialog-footer" };
|
|
1415
|
+
const _hoisted_41 = { class: "page-setting" };
|
|
1416
|
+
const _hoisted_42 = { class: "page-setting__header" };
|
|
1417
|
+
const _hoisted_43 = { class: "page-setting__content" };
|
|
1418
|
+
const _hoisted_44 = { class: "page-setting__footer" };
|
|
1419
|
+
const _hoisted_45 = { class: "mobile-preview-phone__screen" };
|
|
1420
|
+
const _hoisted_46 = ["title"];
|
|
1421
|
+
const _hoisted_47 = { class: "mobile-dashboard-preview" };
|
|
1422
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1423
|
+
const _component_el_tag = resolveComponent("el-tag");
|
|
1424
|
+
const _component_el_button = resolveComponent("el-button");
|
|
1425
|
+
const _component_el_option = resolveComponent("el-option");
|
|
1426
|
+
const _component_el_select = resolveComponent("el-select");
|
|
1427
|
+
const _component_el_radio_button = resolveComponent("el-radio-button");
|
|
1428
|
+
const _component_el_radio_group = resolveComponent("el-radio-group");
|
|
1429
|
+
const _component_el_dropdown_item = resolveComponent("el-dropdown-item");
|
|
1430
|
+
const _component_el_dropdown_menu = resolveComponent("el-dropdown-menu");
|
|
1431
|
+
const _component_el_dropdown = resolveComponent("el-dropdown");
|
|
1432
|
+
const _component_dashboard_theme_setting = resolveComponent("dashboard-theme-setting");
|
|
1433
|
+
const _component_epx_visual_config_panel = resolveComponent("epx-visual-config-panel");
|
|
1434
|
+
const _component_dashboard_mobile = resolveComponent("dashboard-mobile");
|
|
1435
|
+
const _component_epx_visual_config_dashboard_design = resolveComponent("epx-visual-config-dashboard-design");
|
|
1436
|
+
const _component_el_drawer = resolveComponent("el-drawer");
|
|
1437
|
+
const _component_epx_object = resolveComponent("epx-object");
|
|
1438
|
+
const _component_el_radio = resolveComponent("el-radio");
|
|
1439
|
+
const _component_el_dialog = resolveComponent("el-dialog");
|
|
1440
|
+
const _component_epx_visual_component_library_dialog = resolveComponent("epx-visual-component-library-dialog");
|
|
1441
|
+
const _component_epx_search_fields = resolveComponent("epx-search-fields");
|
|
1442
|
+
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
1443
|
+
const _component_el_pagination = resolveComponent("el-pagination");
|
|
1444
|
+
const _component_el_tab_pane = resolveComponent("el-tab-pane");
|
|
1445
|
+
const _component_el_tabs = resolveComponent("el-tabs");
|
|
1446
|
+
const _component_epx_add_form_item = resolveComponent("epx-add-form-item");
|
|
1447
|
+
const _component_dashboard_preview = resolveComponent("dashboard-preview");
|
|
1448
|
+
const _directive_loading = resolveDirective("loading");
|
|
1449
|
+
return openBlock(), createElementBlock("div", {
|
|
1450
|
+
class: normalizeClass(["config-container config-container--dashboard-designer", { "config-container--new-window": $props.newWindow, "config-container--mobile-dashboard": $options.isMobileDashboard }])
|
|
1451
|
+
}, [
|
|
1452
|
+
createElementVNode("div", _hoisted_1, [
|
|
1453
|
+
createElementVNode("i", {
|
|
1454
|
+
class: "page-header__back el-icon-arrow-left",
|
|
1455
|
+
onClick: _cache[0] || (_cache[0] = (...args) => $options.back && $options.back(...args))
|
|
1456
|
+
}),
|
|
1457
|
+
createElementVNode("p", _hoisted_2, [
|
|
1458
|
+
createElementVNode("span", _hoisted_3, toDisplayString($options.title), 1),
|
|
1459
|
+
!$data.chooseDesignTarget ? (openBlock(), createBlock(_component_el_tag, {
|
|
1460
|
+
key: 0,
|
|
1461
|
+
size: "small"
|
|
1462
|
+
}, {
|
|
1463
|
+
default: withCtx(() => [
|
|
1464
|
+
createTextVNode(toDisplayString($options.isMobileDashboard ? "移动端看板" : "PC 看板"), 1)
|
|
1465
|
+
]),
|
|
1466
|
+
_: 1
|
|
1467
|
+
})) : createCommentVNode("", true)
|
|
1468
|
+
]),
|
|
1469
|
+
createElementVNode("div", _hoisted_4, [
|
|
1470
|
+
$data.configReady && !$data.selectComponentList.length ? (openBlock(), createBlock(_component_el_button, {
|
|
1471
|
+
key: 0,
|
|
1472
|
+
size: "small",
|
|
1473
|
+
disabled: $data.choosingDesignTarget,
|
|
1474
|
+
onClick: _cache[1] || (_cache[1] = ($event) => $data.chooseDesignTarget = true)
|
|
1475
|
+
}, {
|
|
1476
|
+
default: withCtx(() => [..._cache[36] || (_cache[36] = [
|
|
1477
|
+
createTextVNode("选择设计端", -1)
|
|
1478
|
+
])]),
|
|
1479
|
+
_: 1
|
|
1480
|
+
}, 8, ["disabled"])) : createCommentVNode("", true),
|
|
1481
|
+
!$data.chooseDesignTarget ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1482
|
+
createElementVNode("p", {
|
|
1483
|
+
class: "header-operate__item",
|
|
1484
|
+
onClick: _cache[2] || (_cache[2] = ($event) => $data.showPanel = "style")
|
|
1485
|
+
}, [..._cache[37] || (_cache[37] = [
|
|
1486
|
+
createElementVNode("i", { class: "epx-icon-yangshi" }, null, -1),
|
|
1487
|
+
createTextVNode("样式", -1)
|
|
1488
|
+
])]),
|
|
1489
|
+
!$options.isMobileDashboard ? (openBlock(), createElementBlock("p", {
|
|
1490
|
+
key: 0,
|
|
1491
|
+
class: "header-operate__item",
|
|
1492
|
+
onClick: _cache[3] || (_cache[3] = (...args) => $options.switchMobile && $options.switchMobile(...args))
|
|
1493
|
+
}, [..._cache[38] || (_cache[38] = [
|
|
1494
|
+
createElementVNode("i", { class: "el-icon-mobile" }, null, -1),
|
|
1495
|
+
createTextVNode("移动端设计", -1)
|
|
1496
|
+
])])) : createCommentVNode("", true),
|
|
1497
|
+
$options.isMobileDashboard ? (openBlock(), createBlock(_component_el_select, {
|
|
1498
|
+
key: 1,
|
|
1499
|
+
"model-value": $options.mobileCanvasWidth,
|
|
1500
|
+
size: "small",
|
|
1501
|
+
class: "mobile-width-select",
|
|
1502
|
+
onChange: _cache[4] || (_cache[4] = (v) => $options.changeItemConfigs("page", { mobileCanvasWidth: v }))
|
|
1503
|
+
}, {
|
|
1504
|
+
default: withCtx(() => [
|
|
1505
|
+
(openBlock(), createElementBlock(Fragment, null, renderList([320, 375, 390, 414], (width) => {
|
|
1506
|
+
return createVNode(_component_el_option, {
|
|
1507
|
+
key: width,
|
|
1508
|
+
label: width + "px",
|
|
1509
|
+
value: width
|
|
1510
|
+
}, null, 8, ["label", "value"]);
|
|
1511
|
+
}), 64))
|
|
1512
|
+
]),
|
|
1513
|
+
_: 1
|
|
1514
|
+
}, 8, ["model-value"])) : createCommentVNode("", true),
|
|
1515
|
+
$options.isMobileDashboard ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString($data.mobileDirty ? "未保存" : "已保存"), 1)) : createCommentVNode("", true),
|
|
1516
|
+
$options.isMobileDashboard ? (openBlock(), createBlock(_component_el_button, {
|
|
1517
|
+
key: 3,
|
|
1518
|
+
size: "small",
|
|
1519
|
+
type: "primary",
|
|
1520
|
+
loading: $data.mobileSaving,
|
|
1521
|
+
onClick: $options.saveMobileDashboard
|
|
1522
|
+
}, {
|
|
1523
|
+
default: withCtx(() => [..._cache[39] || (_cache[39] = [
|
|
1524
|
+
createTextVNode("保存", -1)
|
|
1525
|
+
])]),
|
|
1526
|
+
_: 1
|
|
1527
|
+
}, 8, ["loading", "onClick"])) : createCommentVNode("", true),
|
|
1528
|
+
createElementVNode("p", {
|
|
1529
|
+
class: "header-operate__item",
|
|
1530
|
+
onClick: _cache[5] || (_cache[5] = (...args) => $options.preview && $options.preview(...args))
|
|
1531
|
+
}, [
|
|
1532
|
+
_cache[40] || (_cache[40] = createElementVNode("i", { class: "el-icon-view" }, null, -1)),
|
|
1533
|
+
createTextVNode(toDisplayString(_ctx.$t("preview")), 1)
|
|
1534
|
+
]),
|
|
1535
|
+
createElementVNode("p", {
|
|
1536
|
+
class: "header-operate__item",
|
|
1537
|
+
onClick: _cache[6] || (_cache[6] = ($event) => $data.pageSettingDrawer = true)
|
|
1538
|
+
}, [..._cache[41] || (_cache[41] = [
|
|
1539
|
+
createElementVNode("i", { class: "el-icon-setting" }, null, -1),
|
|
1540
|
+
createTextVNode("全局设置", -1)
|
|
1541
|
+
])])
|
|
1542
|
+
], 64)) : createCommentVNode("", true)
|
|
1543
|
+
])
|
|
1544
|
+
]),
|
|
1545
|
+
$data.chooseDesignTarget ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
1546
|
+
_cache[44] || (_cache[44] = createElementVNode("h2", null, "选择看板设计端", -1)),
|
|
1547
|
+
_cache[45] || (_cache[45] = createElementVNode("p", null, "先选择主要展示端,再开始添加报表和组件。", -1)),
|
|
1548
|
+
createElementVNode("div", _hoisted_7, [
|
|
1549
|
+
createVNode(_component_el_button, {
|
|
1550
|
+
loading: $data.choosingDesignTarget,
|
|
1551
|
+
onClick: _cache[7] || (_cache[7] = ($event) => $options.selectDesignTarget("pc"))
|
|
1552
|
+
}, {
|
|
1553
|
+
default: withCtx(() => [..._cache[42] || (_cache[42] = [
|
|
1554
|
+
createTextVNode("PC 端 · 桌面画布", -1)
|
|
1555
|
+
])]),
|
|
1556
|
+
_: 1
|
|
1557
|
+
}, 8, ["loading"]),
|
|
1558
|
+
createVNode(_component_el_button, {
|
|
1559
|
+
type: "primary",
|
|
1560
|
+
loading: $data.choosingDesignTarget,
|
|
1561
|
+
onClick: _cache[8] || (_cache[8] = ($event) => $options.selectDesignTarget("mobile"))
|
|
1562
|
+
}, {
|
|
1563
|
+
default: withCtx(() => [..._cache[43] || (_cache[43] = [
|
|
1564
|
+
createTextVNode("移动端 · 手机画布", -1)
|
|
1565
|
+
])]),
|
|
1566
|
+
_: 1
|
|
1567
|
+
}, 8, ["loading"])
|
|
1568
|
+
])
|
|
1569
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
1570
|
+
createElementVNode("ul", _hoisted_9, [
|
|
1571
|
+
createElementVNode("li", {
|
|
1572
|
+
class: normalizeClass({ "page-tabs__item": true }),
|
|
1573
|
+
onClick: _cache[9] || (_cache[9] = (...args) => $options.openAddReportDialog && $options.openAddReportDialog(...args))
|
|
1574
|
+
}, [..._cache[46] || (_cache[46] = [
|
|
1575
|
+
createElementVNode("i", { class: "epx-icon-color-tianjiabaobiao" }, null, -1),
|
|
1576
|
+
createElementVNode("span", null, "报表", -1)
|
|
1577
|
+
])]),
|
|
1578
|
+
createElementVNode("li", {
|
|
1579
|
+
class: normalizeClass({ "page-tabs__item": true }),
|
|
1580
|
+
onClick: _cache[10] || (_cache[10] = ($event) => $data.addComponentDialog = true)
|
|
1581
|
+
}, [..._cache[47] || (_cache[47] = [
|
|
1582
|
+
createElementVNode("i", { class: "epx-icon-color-tianjiazujian" }, null, -1),
|
|
1583
|
+
createElementVNode("span", null, "组件", -1)
|
|
1584
|
+
])]),
|
|
1585
|
+
createElementVNode("li", {
|
|
1586
|
+
class: normalizeClass({ "page-tabs__item": true }),
|
|
1587
|
+
onClick: _cache[11] || (_cache[11] = (...args) => $options.addTabsToDashboard && $options.addTabsToDashboard(...args))
|
|
1588
|
+
}, [..._cache[48] || (_cache[48] = [
|
|
1589
|
+
createElementVNode("i", { class: "epx-icon-color-tab" }, null, -1),
|
|
1590
|
+
createElementVNode("span", null, "标签页", -1)
|
|
1591
|
+
])]),
|
|
1592
|
+
createElementVNode("li", {
|
|
1593
|
+
class: normalizeClass({ "page-tabs__item": true }),
|
|
1594
|
+
onClick: _cache[12] || (_cache[12] = ($event) => $data.copyComponentDialog = true)
|
|
1595
|
+
}, [..._cache[49] || (_cache[49] = [
|
|
1596
|
+
createElementVNode("i", { class: "epx-icon-color-yinyong" }, null, -1),
|
|
1597
|
+
createElementVNode("span", null, "引用", -1)
|
|
1598
|
+
])])
|
|
1599
|
+
]),
|
|
1600
|
+
createElementVNode("div", _hoisted_10, [
|
|
1601
|
+
$data.showPanel === "style" ? (openBlock(), createElementBlock("div", _hoisted_11, [
|
|
1602
|
+
createElementVNode("div", _hoisted_12, [
|
|
1603
|
+
_cache[52] || (_cache[52] = createElementVNode("span", null, "样式设置", -1)),
|
|
1604
|
+
createVNode(_component_el_radio_group, {
|
|
1605
|
+
modelValue: $data.styleType,
|
|
1606
|
+
"onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $data.styleType = $event),
|
|
1607
|
+
size: "small"
|
|
1608
|
+
}, {
|
|
1609
|
+
default: withCtx(() => [
|
|
1610
|
+
createVNode(_component_el_radio_button, {
|
|
1611
|
+
label: "presets",
|
|
1612
|
+
value: "presets"
|
|
1613
|
+
}, {
|
|
1614
|
+
default: withCtx(() => [..._cache[50] || (_cache[50] = [
|
|
1615
|
+
createTextVNode("预设", -1)
|
|
1616
|
+
])]),
|
|
1617
|
+
_: 1
|
|
1618
|
+
}),
|
|
1619
|
+
createVNode(_component_el_radio_button, {
|
|
1620
|
+
label: "custom",
|
|
1621
|
+
value: "custom"
|
|
1622
|
+
}, {
|
|
1623
|
+
default: withCtx(() => [..._cache[51] || (_cache[51] = [
|
|
1624
|
+
createTextVNode("自定义", -1)
|
|
1625
|
+
])]),
|
|
1626
|
+
_: 1
|
|
1627
|
+
})
|
|
1628
|
+
]),
|
|
1629
|
+
_: 1
|
|
1630
|
+
}, 8, ["modelValue"])
|
|
1631
|
+
]),
|
|
1632
|
+
createElementVNode("div", _hoisted_13, [
|
|
1633
|
+
$data.styleType === "presets" && !$data.editTheme ? (openBlock(), createElementBlock("ul", _hoisted_14, [
|
|
1634
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($data.themeList, (theme) => {
|
|
1635
|
+
return openBlock(), createElementBlock("li", {
|
|
1636
|
+
class: normalizeClass(["dashboard-theme__item", { active: $data.activeTheme === theme.CODE }]),
|
|
1637
|
+
key: theme.CODE,
|
|
1638
|
+
onClick: ($event) => $options.selectTheme(theme)
|
|
1639
|
+
}, [
|
|
1640
|
+
createElementVNode("div", _hoisted_16, [
|
|
1641
|
+
createElementVNode("img", {
|
|
1642
|
+
src: _ctx.$util.getFileUrl(theme.THUMBNAIL),
|
|
1643
|
+
alt: ""
|
|
1644
|
+
}, null, 8, _hoisted_17)
|
|
1645
|
+
]),
|
|
1646
|
+
createElementVNode("p", _hoisted_18, [
|
|
1647
|
+
createElementVNode("span", _hoisted_19, [
|
|
1648
|
+
createTextVNode(toDisplayString(theme.NAME), 1),
|
|
1649
|
+
theme.SCOPE !== "frame" ? (openBlock(), createElementBlock("i", _hoisted_20)) : createCommentVNode("", true)
|
|
1650
|
+
]),
|
|
1651
|
+
theme.SCOPE !== "frame" || _ctx.$route.params.system === "epxing-frame" ? (openBlock(), createBlock(_component_el_dropdown, {
|
|
1652
|
+
key: 0,
|
|
1653
|
+
class: "fr",
|
|
1654
|
+
onClick: _cache[14] || (_cache[14] = withModifiers(() => {
|
|
1655
|
+
}, ["stop"])),
|
|
1656
|
+
onCommand: (command) => $options.themeHandleCommand(theme, command)
|
|
1657
|
+
}, {
|
|
1658
|
+
dropdown: withCtx(() => [
|
|
1659
|
+
createVNode(_component_el_dropdown_menu, null, {
|
|
1660
|
+
default: withCtx(() => [
|
|
1661
|
+
createVNode(_component_el_dropdown_item, { command: "edit" }, {
|
|
1662
|
+
default: withCtx(() => [..._cache[53] || (_cache[53] = [
|
|
1663
|
+
createTextVNode("编辑", -1)
|
|
1664
|
+
])]),
|
|
1665
|
+
_: 1
|
|
1666
|
+
}),
|
|
1667
|
+
createVNode(_component_el_dropdown_item, { command: "config" }, {
|
|
1668
|
+
default: withCtx(() => [..._cache[54] || (_cache[54] = [
|
|
1669
|
+
createTextVNode("预设样式配置", -1)
|
|
1670
|
+
])]),
|
|
1671
|
+
_: 1
|
|
1672
|
+
}),
|
|
1673
|
+
createVNode(_component_el_dropdown_item, { command: "remove" }, {
|
|
1674
|
+
default: withCtx(() => [..._cache[55] || (_cache[55] = [
|
|
1675
|
+
createTextVNode("删除", -1)
|
|
1676
|
+
])]),
|
|
1677
|
+
_: 1
|
|
1678
|
+
})
|
|
1679
|
+
]),
|
|
1680
|
+
_: 1
|
|
1681
|
+
})
|
|
1682
|
+
]),
|
|
1683
|
+
default: withCtx(() => [
|
|
1684
|
+
_cache[56] || (_cache[56] = createElementVNode("i", { class: "el-icon-more" }, null, -1))
|
|
1685
|
+
]),
|
|
1686
|
+
_: 1
|
|
1687
|
+
}, 8, ["onCommand"])) : createCommentVNode("", true)
|
|
1688
|
+
]),
|
|
1689
|
+
_cache[57] || (_cache[57] = createElementVNode("div", { class: "dashboard-theme__selected" }, [
|
|
1690
|
+
createElementVNode("span"),
|
|
1691
|
+
createElementVNode("i", { class: "el-icon-check" })
|
|
1692
|
+
], -1))
|
|
1693
|
+
], 10, _hoisted_15);
|
|
1694
|
+
}), 128))
|
|
1695
|
+
])) : (openBlock(), createBlock(_component_dashboard_theme_setting, {
|
|
1696
|
+
key: 1,
|
|
1697
|
+
editTheme: $data.editTheme,
|
|
1698
|
+
value: $data.themeStyles,
|
|
1699
|
+
onChange: $options.changethemeStyles,
|
|
1700
|
+
onSave: $options.savePreset,
|
|
1701
|
+
onMobileEdit: _cache[15] || (_cache[15] = (v) => $data.themeMobilePreview = v)
|
|
1702
|
+
}, null, 8, ["editTheme", "value", "onChange", "onSave"]))
|
|
1703
|
+
]),
|
|
1704
|
+
createElementVNode("div", _hoisted_21, [
|
|
1705
|
+
createVNode(_component_el_button, {
|
|
1706
|
+
size: "default",
|
|
1707
|
+
onClick: $options.cancelThemePancel
|
|
1708
|
+
}, {
|
|
1709
|
+
default: withCtx(() => [..._cache[58] || (_cache[58] = [
|
|
1710
|
+
createTextVNode("取消", -1)
|
|
1711
|
+
])]),
|
|
1712
|
+
_: 1
|
|
1713
|
+
}, 8, ["onClick"]),
|
|
1714
|
+
createVNode(_component_el_button, {
|
|
1715
|
+
size: "default",
|
|
1716
|
+
type: "primary",
|
|
1717
|
+
onClick: $options.setTheme
|
|
1718
|
+
}, {
|
|
1719
|
+
default: withCtx(() => [..._cache[59] || (_cache[59] = [
|
|
1720
|
+
createTextVNode("确定", -1)
|
|
1721
|
+
])]),
|
|
1722
|
+
_: 1
|
|
1723
|
+
}, 8, ["onClick"])
|
|
1724
|
+
])
|
|
1725
|
+
])) : createCommentVNode("", true)
|
|
1726
|
+
]),
|
|
1727
|
+
!$data.previewSuspended && !$data.mobilePreviewVisible ? (openBlock(), createElementBlock("div", _hoisted_22, [
|
|
1728
|
+
$options.isMobileDashboard ? (openBlock(), createBlock(_component_dashboard_mobile, {
|
|
1729
|
+
key: 0,
|
|
1730
|
+
ref: "dashboardDesign",
|
|
1731
|
+
standalone: "",
|
|
1732
|
+
source: $options.mobileDesignSource,
|
|
1733
|
+
"canvas-width": $options.mobileCanvasWidth,
|
|
1734
|
+
"page-id": _ctx.$query.id,
|
|
1735
|
+
"page-meta-id": $options.currentMetaId,
|
|
1736
|
+
"all-component-list": $data.componentList,
|
|
1737
|
+
onSelectItem: $options.selectMobileItem,
|
|
1738
|
+
onEditData: $options.editMobileData,
|
|
1739
|
+
onDeleteItem: $options.deleteMobileItem,
|
|
1740
|
+
onAddInto: $options.addMobileInto,
|
|
1741
|
+
onAddReport: $options.openAddReportDialog,
|
|
1742
|
+
onAddComponent: _cache[16] || (_cache[16] = ($event) => $data.addComponentDialog = true)
|
|
1743
|
+
}, {
|
|
1744
|
+
"component-config": withCtx(() => [
|
|
1745
|
+
$data.selectComponent ? (openBlock(), createBlock(_component_epx_visual_config_panel, {
|
|
1746
|
+
key: 0,
|
|
1747
|
+
component: $data.selectComponent,
|
|
1748
|
+
metaId: $options.currentMetaId,
|
|
1749
|
+
globalConfigs: $data.pageGlobalConfigs,
|
|
1750
|
+
itemConfigs: $data.allComponentConfigs,
|
|
1751
|
+
relationList: $data.relationList,
|
|
1752
|
+
pageParams: $data.pageParams,
|
|
1753
|
+
scopeConfigs: $data.scopeConfigs,
|
|
1754
|
+
"grid-layout": true
|
|
1755
|
+
}, null, 8, ["component", "metaId", "globalConfigs", "itemConfigs", "relationList", "pageParams", "scopeConfigs"])) : createCommentVNode("", true)
|
|
1756
|
+
]),
|
|
1757
|
+
_: 1
|
|
1758
|
+
}, 8, ["source", "canvas-width", "page-id", "page-meta-id", "all-component-list", "onSelectItem", "onEditData", "onDeleteItem", "onAddInto", "onAddReport"])) : (openBlock(), createBlock(_component_epx_visual_config_dashboard_design, {
|
|
1759
|
+
key: 1,
|
|
1760
|
+
ref: "dashboardDesign",
|
|
1761
|
+
"up-comp-id": $data.upCompId,
|
|
1762
|
+
"component-list": this.selectComponentList,
|
|
1763
|
+
"all-component-list": this.componentList,
|
|
1764
|
+
globalConfigs: $data.pageGlobalConfigs,
|
|
1765
|
+
pageId: _ctx.$query.id,
|
|
1766
|
+
pageMetaId: $options.currentMetaId,
|
|
1767
|
+
itemConfigs: $data.allComponentConfigs,
|
|
1768
|
+
theme: $data.activeTheme,
|
|
1769
|
+
themeStyles: $data.themeStyles,
|
|
1770
|
+
"mobile-preview": $data.themeMobilePreview,
|
|
1771
|
+
onOpenConfig: $options.clickComponent,
|
|
1772
|
+
onChangeItems: _cache[17] || (_cache[17] = (componentList) => $data.selectComponentList = [...componentList]),
|
|
1773
|
+
onAddComponent: _cache[18] || (_cache[18] = ($event) => $data.addComponentDialog = true),
|
|
1774
|
+
onDeleteConfigs: $options.deleteConfigs,
|
|
1775
|
+
onAddReport: $options.openAddReportDialog,
|
|
1776
|
+
onAddReportToDashboard: $options.addReportToDashboard,
|
|
1777
|
+
onAddChartToDashboard: $options.addChartToDashboard,
|
|
1778
|
+
onAddComponentToDashboard: $options.addComponentToDashboard
|
|
1779
|
+
}, null, 8, ["up-comp-id", "component-list", "all-component-list", "globalConfigs", "pageId", "pageMetaId", "itemConfigs", "theme", "themeStyles", "mobile-preview", "onOpenConfig", "onDeleteConfigs", "onAddReport", "onAddReportToDashboard", "onAddChartToDashboard", "onAddComponentToDashboard"]))
|
|
1780
|
+
])) : createCommentVNode("", true),
|
|
1781
|
+
!$options.isMobileDashboard ? (openBlock(), createBlock(_component_el_drawer, {
|
|
1782
|
+
key: 1,
|
|
1783
|
+
title: "组件配置",
|
|
1784
|
+
"append-to-body": "",
|
|
1785
|
+
direction: "rtl",
|
|
1786
|
+
modelValue: $options.showConfigPanel,
|
|
1787
|
+
"onUpdate:modelValue": _cache[19] || (_cache[19] = ($event) => $options.showConfigPanel = $event)
|
|
1788
|
+
}, {
|
|
1789
|
+
default: withCtx(() => [
|
|
1790
|
+
$options.showConfigPanel ? (openBlock(), createElementBlock("div", _hoisted_23, [
|
|
1791
|
+
createVNode(_component_epx_visual_config_panel, {
|
|
1792
|
+
component: $data.selectComponent,
|
|
1793
|
+
metaId: $options.currentMetaId,
|
|
1794
|
+
globalConfigs: $data.pageGlobalConfigs,
|
|
1795
|
+
itemConfigs: $data.allComponentConfigs,
|
|
1796
|
+
relationList: $data.relationList,
|
|
1797
|
+
pageParams: $data.pageParams,
|
|
1798
|
+
scopeConfigs: $data.scopeConfigs,
|
|
1799
|
+
"grid-layout": true
|
|
1800
|
+
}, null, 8, ["component", "metaId", "globalConfigs", "itemConfigs", "relationList", "pageParams", "scopeConfigs"])
|
|
1801
|
+
])) : createCommentVNode("", true)
|
|
1802
|
+
]),
|
|
1803
|
+
_: 1
|
|
1804
|
+
}, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
1805
|
+
createVNode(_component_el_dialog, {
|
|
1806
|
+
title: "添加报表",
|
|
1807
|
+
"append-to-body": "",
|
|
1808
|
+
modelValue: $data.addReportDialog,
|
|
1809
|
+
"onUpdate:modelValue": _cache[24] || (_cache[24] = ($event) => $data.addReportDialog = $event),
|
|
1810
|
+
width: "640px"
|
|
1811
|
+
}, {
|
|
1812
|
+
default: withCtx(() => [
|
|
1813
|
+
$data.addReportDialog ? (openBlock(), createElementBlock("div", _hoisted_24, [
|
|
1814
|
+
createElementVNode("div", _hoisted_25, [
|
|
1815
|
+
_cache[60] || (_cache[60] = createElementVNode("label", null, "报表类型:", -1)),
|
|
1816
|
+
createElementVNode("ul", _hoisted_26, [
|
|
1817
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($data.reportTypeList, (reportType) => {
|
|
1818
|
+
return openBlock(), createElementBlock("li", {
|
|
1819
|
+
class: normalizeClass({ "report-type__item": true, active: $data.addReportForm.TYPE === reportType.type && ($data.addReportForm.CHART_TYPE === reportType.chartType || $data.addReportForm.TYPE === "1" || $data.addReportForm.TYPE === "numStatistic") }),
|
|
1820
|
+
key: reportType.chartType || reportType.type,
|
|
1821
|
+
onClick: ($event) => $options.setReportType(reportType)
|
|
1822
|
+
}, [
|
|
1823
|
+
createElementVNode("i", {
|
|
1824
|
+
class: normalizeClass(reportType.icon)
|
|
1825
|
+
}, null, 2),
|
|
1826
|
+
createElementVNode("span", null, toDisplayString(reportType.text), 1)
|
|
1827
|
+
], 10, _hoisted_27);
|
|
1828
|
+
}), 128))
|
|
1829
|
+
])
|
|
1830
|
+
]),
|
|
1831
|
+
withDirectives(createElementVNode("div", _hoisted_28, [
|
|
1832
|
+
_cache[61] || (_cache[61] = createElementVNode("label", null, "统计对象:", -1)),
|
|
1833
|
+
createVNode(_component_epx_object, {
|
|
1834
|
+
modelValue: $data.addReportForm.OBJECT,
|
|
1835
|
+
"onUpdate:modelValue": _cache[20] || (_cache[20] = ($event) => $data.addReportForm.OBJECT = $event),
|
|
1836
|
+
fieldConfigs: { attriName: "OBJECT", dataType: "object", attriLabel: "统计对象", codeKey: "FM_ENTITY", state: "EDIT" }
|
|
1837
|
+
}, null, 8, ["modelValue"])
|
|
1838
|
+
], 512), [
|
|
1839
|
+
[vShow, $data.addReportForm.TYPE !== "dashboardTitle" && $data.addReportForm.TYPE !== "form"]
|
|
1840
|
+
]),
|
|
1841
|
+
withDirectives(createElementVNode("div", _hoisted_29, [
|
|
1842
|
+
_cache[62] || (_cache[62] = createElementVNode("label", null, "统计对象视图:", -1)),
|
|
1843
|
+
createVNode(_component_epx_object, {
|
|
1844
|
+
modelValue: $data.addReportForm.OBJECT_VIEW,
|
|
1845
|
+
"onUpdate:modelValue": _cache[21] || (_cache[21] = ($event) => $data.addReportForm.OBJECT_VIEW = $event),
|
|
1846
|
+
fieldConfigs: { attriName: "OBJECT_VIEW", dataType: "object", attriLabel: "统计对象", codeKey: "FM_ENTITY_VIEW", scopeParams: [{ field: "ENTITY", values: $data.addReportForm.OBJECT }], state: "EDIT" }
|
|
1847
|
+
}, null, 8, ["modelValue", "fieldConfigs"])
|
|
1848
|
+
], 512), [
|
|
1849
|
+
[vShow, $data.addReportForm.TYPE !== "numStatistic" && $data.addReportForm.TYPE !== "dashboardTitle" && $data.addReportForm.TYPE !== "form"]
|
|
1850
|
+
]),
|
|
1851
|
+
withDirectives(createElementVNode("div", _hoisted_30, [
|
|
1852
|
+
_cache[65] || (_cache[65] = createElementVNode("label", null, "表单类型:", -1)),
|
|
1853
|
+
createVNode(_component_el_radio_group, {
|
|
1854
|
+
modelValue: $data.addReportForm.FORM_TYPE,
|
|
1855
|
+
"onUpdate:modelValue": _cache[22] || (_cache[22] = ($event) => $data.addReportForm.FORM_TYPE = $event)
|
|
1856
|
+
}, {
|
|
1857
|
+
default: withCtx(() => [
|
|
1858
|
+
createVNode(_component_el_radio, {
|
|
1859
|
+
label: "formReport",
|
|
1860
|
+
value: "formReport"
|
|
1861
|
+
}, {
|
|
1862
|
+
default: withCtx(() => [..._cache[63] || (_cache[63] = [
|
|
1863
|
+
createTextVNode("Word", -1)
|
|
1864
|
+
])]),
|
|
1865
|
+
_: 1
|
|
1866
|
+
}),
|
|
1867
|
+
createVNode(_component_el_radio, {
|
|
1868
|
+
label: "excelReport",
|
|
1869
|
+
value: "excelReport"
|
|
1870
|
+
}, {
|
|
1871
|
+
default: withCtx(() => [..._cache[64] || (_cache[64] = [
|
|
1872
|
+
createTextVNode("Excel", -1)
|
|
1873
|
+
])]),
|
|
1874
|
+
_: 1
|
|
1875
|
+
})
|
|
1876
|
+
]),
|
|
1877
|
+
_: 1
|
|
1878
|
+
}, 8, ["modelValue"])
|
|
1879
|
+
], 512), [
|
|
1880
|
+
[vShow, $data.addReportForm.TYPE === "form"]
|
|
1881
|
+
])
|
|
1882
|
+
])) : createCommentVNode("", true),
|
|
1883
|
+
createElementVNode("div", _hoisted_31, [
|
|
1884
|
+
createVNode(_component_el_button, {
|
|
1885
|
+
type: "primary",
|
|
1886
|
+
onClick: $options.saveReport
|
|
1887
|
+
}, {
|
|
1888
|
+
default: withCtx(() => [..._cache[66] || (_cache[66] = [
|
|
1889
|
+
createTextVNode("保存", -1)
|
|
1890
|
+
])]),
|
|
1891
|
+
_: 1
|
|
1892
|
+
}, 8, ["onClick"]),
|
|
1893
|
+
createVNode(_component_el_button, {
|
|
1894
|
+
onClick: _cache[23] || (_cache[23] = ($event) => $data.addReportDialog = false)
|
|
1895
|
+
}, {
|
|
1896
|
+
default: withCtx(() => [..._cache[67] || (_cache[67] = [
|
|
1897
|
+
createTextVNode("返回", -1)
|
|
1898
|
+
])]),
|
|
1899
|
+
_: 1
|
|
1900
|
+
})
|
|
1901
|
+
])
|
|
1902
|
+
]),
|
|
1903
|
+
_: 1
|
|
1904
|
+
}, 8, ["modelValue"]),
|
|
1905
|
+
createVNode(_component_el_dialog, {
|
|
1906
|
+
title: "添加组件",
|
|
1907
|
+
"append-to-body": "",
|
|
1908
|
+
modelValue: $data.addComponentDialog,
|
|
1909
|
+
"onUpdate:modelValue": _cache[25] || (_cache[25] = ($event) => $data.addComponentDialog = $event),
|
|
1910
|
+
width: "960px"
|
|
1911
|
+
}, {
|
|
1912
|
+
default: withCtx(() => [
|
|
1913
|
+
createVNode(_component_epx_visual_component_library_dialog, {
|
|
1914
|
+
"initial-terminal": $options.isMobileDashboard ? "move" : "pc",
|
|
1915
|
+
onClick: $options.addComponentToDashboard
|
|
1916
|
+
}, null, 8, ["initial-terminal", "onClick"])
|
|
1917
|
+
]),
|
|
1918
|
+
_: 1
|
|
1919
|
+
}, 8, ["modelValue"]),
|
|
1920
|
+
createVNode(_component_el_dialog, {
|
|
1921
|
+
class: "dialog--noheader dialog--nopadding",
|
|
1922
|
+
"append-to-body": "",
|
|
1923
|
+
center: "",
|
|
1924
|
+
modelValue: $data.copyComponentDialog,
|
|
1925
|
+
"onUpdate:modelValue": _cache[28] || (_cache[28] = ($event) => $data.copyComponentDialog = $event),
|
|
1926
|
+
width: "960px"
|
|
1927
|
+
}, {
|
|
1928
|
+
default: withCtx(() => [
|
|
1929
|
+
createVNode(_component_el_tabs, { type: "card" }, {
|
|
1930
|
+
default: withCtx(() => [
|
|
1931
|
+
createVNode(_component_el_tab_pane, { label: "从数据看板选择" }, {
|
|
1932
|
+
default: withCtx(() => [
|
|
1933
|
+
createElementVNode("div", _hoisted_32, [
|
|
1934
|
+
createVNode(_component_epx_search_fields, {
|
|
1935
|
+
metaId: "FM_PAGE_CONFIG",
|
|
1936
|
+
showKeyword: false,
|
|
1937
|
+
fields: ["TITLE", "META_ID"],
|
|
1938
|
+
showFilter: false,
|
|
1939
|
+
onSearch: $options.searchDashboard
|
|
1940
|
+
}, null, 8, ["onSearch"])
|
|
1941
|
+
]),
|
|
1942
|
+
withDirectives((openBlock(), createElementBlock("ul", _hoisted_33, [
|
|
1943
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($data.dashboardList, (dashboard) => {
|
|
1944
|
+
return openBlock(), createElementBlock("li", {
|
|
1945
|
+
class: normalizeClass(["dashboard-item", { fold: $data.foldDashboardMap[dashboard.ID] }]),
|
|
1946
|
+
key: dashboard.ID
|
|
1947
|
+
}, [
|
|
1948
|
+
createElementVNode("div", _hoisted_34, [
|
|
1949
|
+
createVNode(_component_el_checkbox, {
|
|
1950
|
+
value: $options.isDashboardSelectAll(dashboard),
|
|
1951
|
+
indeterminate: $options.isDashboardSelect(dashboard),
|
|
1952
|
+
onChange: (v) => $options.changeDashboardSelect(dashboard, v)
|
|
1953
|
+
}, {
|
|
1954
|
+
default: withCtx(() => [
|
|
1955
|
+
createTextVNode(toDisplayString(dashboard.TITLE), 1)
|
|
1956
|
+
]),
|
|
1957
|
+
_: 2
|
|
1958
|
+
}, 1032, ["value", "indeterminate", "onChange"]),
|
|
1959
|
+
createElementVNode("i", {
|
|
1960
|
+
class: "el-icon-arrow-up",
|
|
1961
|
+
onClick: ($event) => $options.switchDashboardFoldFn(dashboard)
|
|
1962
|
+
}, null, 8, _hoisted_35)
|
|
1963
|
+
]),
|
|
1964
|
+
createElementVNode("div", _hoisted_36, [
|
|
1965
|
+
createElementVNode("ul", _hoisted_37, [
|
|
1966
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(dashboard.children, (comp) => {
|
|
1967
|
+
return openBlock(), createElementBlock("li", {
|
|
1968
|
+
class: normalizeClass(["dashboard-comp__item", { "selected": $data.selectedDashboardCompList.includes(dashboard.ID + "-" + comp.id) }]),
|
|
1969
|
+
key: comp.id,
|
|
1970
|
+
onClick: ($event) => $options.selectDashboardComp(dashboard, comp)
|
|
1971
|
+
}, [
|
|
1972
|
+
createElementVNode("i", {
|
|
1973
|
+
class: normalizeClass($options.compIcon(comp))
|
|
1974
|
+
}, null, 2),
|
|
1975
|
+
createElementVNode("span", null, toDisplayString($options.compTitle(comp)), 1),
|
|
1976
|
+
_cache[68] || (_cache[68] = createElementVNode("div", { class: "dashboard-comp__item__select" }, [
|
|
1977
|
+
createElementVNode("span"),
|
|
1978
|
+
createElementVNode("i", { class: "el-icon-check" })
|
|
1979
|
+
], -1))
|
|
1980
|
+
], 10, _hoisted_38);
|
|
1981
|
+
}), 128))
|
|
1982
|
+
])
|
|
1983
|
+
])
|
|
1984
|
+
], 2);
|
|
1985
|
+
}), 128)),
|
|
1986
|
+
!$data.dashboardLoading && $data.dashboardTotal === 0 ? (openBlock(), createElementBlock("div", _hoisted_39, [..._cache[69] || (_cache[69] = [
|
|
1987
|
+
createElementVNode("i", { class: "epx-icon-kong" }, null, -1),
|
|
1988
|
+
createElementVNode("p", null, "暂无数据", -1)
|
|
1989
|
+
])])) : createCommentVNode("", true)
|
|
1990
|
+
])), [
|
|
1991
|
+
[_directive_loading, $data.dashboardLoading]
|
|
1992
|
+
]),
|
|
1993
|
+
createVNode(_component_el_pagination, {
|
|
1994
|
+
class: "pagination",
|
|
1995
|
+
"current-page": $data.currentDashboardPage,
|
|
1996
|
+
"onUpdate:currentPage": _cache[26] || (_cache[26] = ($event) => $data.currentDashboardPage = $event),
|
|
1997
|
+
"page-size": 10,
|
|
1998
|
+
layout: "prev, pager, next, jumper",
|
|
1999
|
+
total: $data.dashboardTotal
|
|
2000
|
+
}, null, 8, ["current-page", "total"])
|
|
2001
|
+
]),
|
|
2002
|
+
_: 1
|
|
2003
|
+
})
|
|
2004
|
+
]),
|
|
2005
|
+
_: 1
|
|
2006
|
+
}),
|
|
2007
|
+
createElementVNode("div", _hoisted_40, [
|
|
2008
|
+
createVNode(_component_el_button, {
|
|
2009
|
+
type: "primary",
|
|
2010
|
+
onClick: $options.quoteComp
|
|
2011
|
+
}, {
|
|
2012
|
+
default: withCtx(() => [..._cache[70] || (_cache[70] = [
|
|
2013
|
+
createTextVNode("引用", -1)
|
|
2014
|
+
])]),
|
|
2015
|
+
_: 1
|
|
2016
|
+
}, 8, ["onClick"]),
|
|
2017
|
+
createVNode(_component_el_button, {
|
|
2018
|
+
onClick: _cache[27] || (_cache[27] = ($event) => $data.copyComponentDialog = false)
|
|
2019
|
+
}, {
|
|
2020
|
+
default: withCtx(() => [..._cache[71] || (_cache[71] = [
|
|
2021
|
+
createTextVNode("返回", -1)
|
|
2022
|
+
])]),
|
|
2023
|
+
_: 1
|
|
2024
|
+
})
|
|
2025
|
+
])
|
|
2026
|
+
]),
|
|
2027
|
+
_: 1
|
|
2028
|
+
}, 8, ["modelValue"]),
|
|
2029
|
+
createVNode(_component_el_dialog, {
|
|
2030
|
+
title: "保存为预设主题",
|
|
2031
|
+
"append-to-body": "",
|
|
2032
|
+
modelValue: $data.saveThemeDialog,
|
|
2033
|
+
"onUpdate:modelValue": _cache[31] || (_cache[31] = ($event) => $data.saveThemeDialog = $event),
|
|
2034
|
+
width: "760px"
|
|
2035
|
+
}, {
|
|
2036
|
+
footer: withCtx(() => [
|
|
2037
|
+
createElementVNode("div", null, [
|
|
2038
|
+
createVNode(_component_el_button, {
|
|
2039
|
+
onClick: _cache[30] || (_cache[30] = ($event) => $data.saveThemeDialog = false)
|
|
2040
|
+
}, {
|
|
2041
|
+
default: withCtx(() => [..._cache[72] || (_cache[72] = [
|
|
2042
|
+
createTextVNode("取消", -1)
|
|
2043
|
+
])]),
|
|
2044
|
+
_: 1
|
|
2045
|
+
}),
|
|
2046
|
+
createVNode(_component_el_button, {
|
|
2047
|
+
onClick: $options.saveTheme,
|
|
2048
|
+
type: "primary"
|
|
2049
|
+
}, {
|
|
2050
|
+
default: withCtx(() => [..._cache[73] || (_cache[73] = [
|
|
2051
|
+
createTextVNode("保存", -1)
|
|
2052
|
+
])]),
|
|
2053
|
+
_: 1
|
|
2054
|
+
}, 8, ["onClick"])
|
|
2055
|
+
])
|
|
2056
|
+
]),
|
|
2057
|
+
default: withCtx(() => [
|
|
2058
|
+
$data.saveThemeDialog ? (openBlock(), createBlock(_component_epx_add_form_item, {
|
|
2059
|
+
key: 0,
|
|
2060
|
+
metaId: "FM_CHART_THEME",
|
|
2061
|
+
"comp-configs": { componentType: "EDIT", column: 1, fields: $options.themeFields },
|
|
2062
|
+
formData: $data.themeFormData,
|
|
2063
|
+
onChange: _cache[29] || (_cache[29] = (v) => $data.themeFormData = v)
|
|
2064
|
+
}, null, 8, ["comp-configs", "formData"])) : createCommentVNode("", true)
|
|
2065
|
+
]),
|
|
2066
|
+
_: 1
|
|
2067
|
+
}, 8, ["modelValue"])
|
|
2068
|
+
])),
|
|
2069
|
+
createVNode(_component_el_drawer, {
|
|
2070
|
+
withHeader: false,
|
|
2071
|
+
modelValue: $data.pageSettingDrawer,
|
|
2072
|
+
"onUpdate:modelValue": _cache[34] || (_cache[34] = ($event) => $data.pageSettingDrawer = $event),
|
|
2073
|
+
"append-to-body": "",
|
|
2074
|
+
direction: "rtl",
|
|
2075
|
+
size: 360
|
|
2076
|
+
}, {
|
|
2077
|
+
default: withCtx(() => [
|
|
2078
|
+
createElementVNode("div", _hoisted_41, [
|
|
2079
|
+
createElementVNode("div", _hoisted_42, [
|
|
2080
|
+
_cache[74] || (_cache[74] = createElementVNode("span", { class: "title" }, "全局设置", -1)),
|
|
2081
|
+
createElementVNode("i", {
|
|
2082
|
+
class: "el-icon-close",
|
|
2083
|
+
onClick: _cache[32] || (_cache[32] = ($event) => $data.pageSettingDrawer = false)
|
|
2084
|
+
})
|
|
2085
|
+
]),
|
|
2086
|
+
createElementVNode("div", _hoisted_43, [
|
|
2087
|
+
(openBlock(), createBlock(resolveDynamicComponent("epx-visual-config-dashboard-setting"), {
|
|
2088
|
+
metaId: $options.currentMetaId,
|
|
2089
|
+
ref: "global",
|
|
2090
|
+
id: "page",
|
|
2091
|
+
"comp-config": $options.pageComponentConfigs,
|
|
2092
|
+
globalConfigs: $data.pageGlobalConfigs,
|
|
2093
|
+
pageRelationList: $data.relationList
|
|
2094
|
+
}, null, 8, ["metaId", "comp-config", "globalConfigs", "pageRelationList"]))
|
|
2095
|
+
]),
|
|
2096
|
+
createElementVNode("div", _hoisted_44, [
|
|
2097
|
+
createVNode(_component_el_button, {
|
|
2098
|
+
size: "default",
|
|
2099
|
+
onClick: _cache[33] || (_cache[33] = ($event) => $data.pageSettingDrawer = false)
|
|
2100
|
+
}, {
|
|
2101
|
+
default: withCtx(() => [..._cache[75] || (_cache[75] = [
|
|
2102
|
+
createTextVNode("返回", -1)
|
|
2103
|
+
])]),
|
|
2104
|
+
_: 1
|
|
2105
|
+
})
|
|
2106
|
+
])
|
|
2107
|
+
])
|
|
2108
|
+
]),
|
|
2109
|
+
_: 1
|
|
2110
|
+
}, 8, ["modelValue"]),
|
|
2111
|
+
$options.isMobileDashboard ? (openBlock(), createBlock(_component_el_dialog, {
|
|
2112
|
+
key: 2,
|
|
2113
|
+
modelValue: $data.mobilePreviewVisible,
|
|
2114
|
+
"onUpdate:modelValue": _cache[35] || (_cache[35] = ($event) => $data.mobilePreviewVisible = $event),
|
|
2115
|
+
title: "移动端预览 · " + $options.mobileCanvasWidth + "px",
|
|
2116
|
+
class: "mobile-dashboard-preview-dialog",
|
|
2117
|
+
"append-to-body": "",
|
|
2118
|
+
"align-center": "",
|
|
2119
|
+
"destroy-on-close": "",
|
|
2120
|
+
width: ($options.mobileCanvasWidth + 12) * $options.mobilePreviewScale + 48 + "px"
|
|
2121
|
+
}, {
|
|
2122
|
+
default: withCtx(() => [
|
|
2123
|
+
createElementVNode("div", {
|
|
2124
|
+
class: "mobile-preview-viewport",
|
|
2125
|
+
style: normalizeStyle({ width: ($options.mobileCanvasWidth + 12) * $options.mobilePreviewScale + "px", height: $options.mobilePreviewPhoneHeight * $options.mobilePreviewScale + "px" })
|
|
2126
|
+
}, [
|
|
2127
|
+
createElementVNode("div", {
|
|
2128
|
+
class: "mobile-preview-phone",
|
|
2129
|
+
style: normalizeStyle({ width: $options.mobileCanvasWidth + 12 + "px", height: $options.mobilePreviewPhoneHeight + "px", transform: "scale(" + $options.mobilePreviewScale + ")" })
|
|
2130
|
+
}, [
|
|
2131
|
+
createElementVNode("div", _hoisted_45, [
|
|
2132
|
+
createElementVNode("div", {
|
|
2133
|
+
class: "mobile-preview-phone__title",
|
|
2134
|
+
title: $options.title
|
|
2135
|
+
}, toDisplayString($options.title || "数据看板"), 9, _hoisted_46),
|
|
2136
|
+
createElementVNode("div", _hoisted_47, [
|
|
2137
|
+
$data.mobilePreviewVisible ? (openBlock(), createBlock(_component_dashboard_preview, {
|
|
2138
|
+
key: 0,
|
|
2139
|
+
"comp-id": "mobile-dashboard-preview",
|
|
2140
|
+
"comp-configs": { ...$data.pageGlobalConfigs, themeStyles: $data.themeStyles, items: $data.selectComponentList, itemConfigs: $data.allComponentConfigs }
|
|
2141
|
+
}, null, 8, ["comp-configs"])) : createCommentVNode("", true)
|
|
2142
|
+
]),
|
|
2143
|
+
_cache[76] || (_cache[76] = createElementVNode("div", {
|
|
2144
|
+
class: "mobile-preview-phone__home",
|
|
2145
|
+
"aria-hidden": "true"
|
|
2146
|
+
}, [
|
|
2147
|
+
createElementVNode("span")
|
|
2148
|
+
], -1))
|
|
2149
|
+
])
|
|
2150
|
+
], 4)
|
|
2151
|
+
], 4)
|
|
2152
|
+
]),
|
|
2153
|
+
_: 1
|
|
2154
|
+
}, 8, ["modelValue", "title", "width"])) : createCommentVNode("", true)
|
|
2155
|
+
], 2);
|
|
2156
|
+
}
|
|
2157
|
+
const Dashboard = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-7316d966"]]);
|
|
2158
|
+
export {
|
|
2159
|
+
Dashboard as default
|
|
2160
|
+
};
|