1.0.1 • Published 4 years ago

yuanbao-report v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
4 years ago

前端报表服务插件

一期只支持查看表格数据,不支持任何操作,包括搜索,修改删除等,不支持分页

安装

npm install yuanbao-report --save
or
yarn add yuanbao-report

用法

  1. 引入quickBI
import quickBi from 'yuanbao-report';
  1. 在需要展示表格的页面新建id为xxx的dom元素,比如
<div id="table" />
  1. 初始化调用方法
quickBI.requestQuickBIData(appCode, { ApiId, Conditions }, baseUrl).then((res) => {
      quickBI.bindData(id, res, customParams);
    }).catch((err) => {
      console.log('errerr', err);
    });

requestQuickBIData方法参数说明

参数说明是否必填
appCode应用名称
ApiId业务方提供的参数,代表需要请求的数据id
ConditionsquickBI上设置的请求参数会封装到Conditions里不确定
baseUrl请求接口域名,默认为线上环境域名,可以不传

bindData方法参数说明

参数说明是否必填
id应用名称
res业务数据,requestQuickBIData返回值
customParamsquickBI上设置的请求参数会封装到Conditions里