• 首页
  • 产品中心
    • 数式Oinone四大产品

      低代码开发平台无代码开发平台集成开发平台AI大模型开发
    • 数式Oinone体系能力

      用户与组织权限管理文件管理消息中心国际化业务审计
    • 数式Oinone核心产品特性

      低无一体面向软件公司场景无限制应用级扩容可分可合
  • 服务中心
    • 客户服务

      预约演示方案咨询私有部署找人定制
    • 开发者

      问答下载
    • Oinone学院

      社区学习

    《精讲面向软件公司的低代码平台——以Oinone为例》

  • 合作伙伴
    渠道申请伙伴名录专家库
  • 关于数式
0571-88757863

Project Deployment:Import and Export of Data Visualization


I. Introduction

In oinone 5.1.0 and above, there are two ways to import and export designs:

  1. Export design data and metadata from the designer to a file by calling the export interface, which provides download/export types of interfaces.
  2. Use the metadata online publishing function provided by the platform.

II. Dependency Package

<dependency>
    <groupId>pro.shushi.pamirs.metadata.manager</groupId>
    <artifactId>pamirs-metadata-manager</artifactId>
</dependency>

III. Install GraphQL Tool

Download address: https://github.com/Kong/insomnia/releases

IV. Log in to GQL

(Ⅰ) Example Call Code

mutation {
    pamirsUserTransientMutation {
        login(user: { login: "admin", password: "admin" }) {
            needRedirect
            broken
            errorMsg
            errorCode
            errorField
        }
    }
}

V. Export to Generate JSON File

Execute GraphQL to directly return export data, suitable for downloading files through a browser.

(Ⅰ) Full Export

Request example:

mutation {
    dataDesignerExportReqMutation {
        export(data: { fileName: "datavi_data" }) {
            jsonUrl
        }
    }
}

(Ⅱ) Specified Chart Export

Request example:

mutation {
    dataDesignerExportReqMutation {
        export(data: { chartCode: "CT00000000002000", fileName: "datavi_data" }) {
            jsonUrl
        }
    }
}

The corresponding chartCode is the coding code of the chart, which can be obtained by querying the database.

(Ⅲ) Specified Report Export

Request example:

mutation {
    dataDesignerExportReqMutation {
        export(data: { reportCode: "RP00001000", fileName: "datavi_data" }) {
            jsonUrl
        }
    }
}

The corresponding reportCode is the coding code of the report, which can be obtained by querying the database.

(Ⅳ) Specified Business Dashboard Export

Request example:

mutation {
    dataDesignerExportReqMutation {
        export(data: { screenCode: "DS00001000", fileName: "datavi_data" }) {
            jsonUrl
        }
    }
}

The corresponding screenCode is the coding code of the data dashboard, which can be obtained by querying the database.

VI. Import Example Code in Business Project

Example code for importing metadata:

@Slf4j
@Order(Integer.MAX_VALUE-1)
@Component
public class DemoModuleAppInstall implements MetaDataEditor, LifecycleCompletedAllInit {

    // JSON metadata of the page exported by the process designer
    private static final String INSTALL_DATAVI_META_PATH = "install/datavi_data.json";

    @Override
    public void edit(AppLifecycleCommand command, Map<String, Meta> metaMap) {
        if(StringUtils.isBlank(INSTALL_DATAVI_META_PATH)) return;
        log.info("Start installing metadata");
        try {
            InitializationUtil util = InitializationUtil.get(metaMap, DemoModule.MODULE_MODULE, DemoModule.MODULE_NAME);
            if (null != util) {
                // Designer metadata
                if(StringUtils.isNotBlank(INSTALL_DATAVI_META_PATH)) {
                    log.info("Start installing chart metadata");
                    DesignerInstallHelper.mateInitialization(util, INSTALL_DATAVI_META_PATH, DemoModule.MODULE_MODULE,
                                                             DemoModule.MODULE_NAME);
                }
            }
        } catch (Exception e) {
            log.error("Exception in importing chart designer metadata", e);
        }
    }

    @Override
    public void process(AppLifecycleCommand command, Map<String, ModuleDefinition> runModuleMap) {
        if(StringUtils.isNotBlank(INSTALL_DATAVI_META_PATH)) {
            log.info("Start installing [chart] designer data");
            // Support remote calls, but the execution lifecycle must be LifecycleCompletedAllInit or later. If the designer is installed locally, there is no requirement.
            DesignerInstallHelper.bizInitialization(INSTALL_DATAVI_META_PATH);
        }
    }
}
Edit this page
Last Updated:1/15/26, 4:02 AM
Prev
Project Deployment:Oinone Designer Deployment Parameter Instructions
Next
Project Deployment:Import and Export of Workflow Designer
默认页脚
Copyright © 2026 Mr.Hope