/inputCharts
HTTP - POST
#####包类方法:
dispatch(type:'chart/remoteAdd')
| 字段名(后端) | 字段名(前端) | 说明 |
|---|---|---|
| chartName | header.label | 图表标题 |
| dataId | baseConfig.dataSource | 基础配置 – 数据源 |
| groupBy{ | 预处理 – 分组 | |
| columnName | preparing.groupBy.key | 分组列列名 |
| columnRamane | preparing.groupBy.label | 分组列别名 |
| }] | ||
| createBy | 创建人 | |
| describes | description | 说明 |
| style | 样式配置 | |
| otherConfig | JSON.stringify(otherConfig) | 其他配置 |
| chartType | base.viewType | 可视化模式 |
| chartConfig | 图表配置 |
{
"chartName": "文档测试1(未命名)",
"dataId": 71,
"groupBy": [],
"createBy": "zhuth",
"describes": "",
"style": "",
"chartConfig": "{}",
"chartType": ""
}
{
"data": {
"code": 200,
"msg": "成功",
"data": 298
}
}
根据base.viewType的不同 chartConfig加载内容也不同
/updateCharts
HTTP - POST
dispatch(type:'chart/remoteModify')
ChartID: code (图表编号) 其余同新增图表
{
"chartId": 298,
"chartName": "文档测试1(未命名)",
"dataId": 71,
"createBy": "zhuth",
"describes": null,
"style": "",
"otherConfig": "{}",
"chartsGroup": "-1",
"chartType": "Histogram",
"chartConfig": "{\"xAxis\":{\"column\":{},\"granularity\":{}},\"yAxis\":{\"column\":{},\"gauge\":{}},\"groupBy\":{\"key\":\"\"}}",
"groupBy": []
}
{
"data": {
"code": 200,
"msg": "成功",
"data": null
}
}
/delChartsConfig
HTTP - POST
dispatch(type:'chart/remoteDelete')
Code (图表编号)
/getListCharts
HTTP - POST
dispatch(type:'chart/fetchList')
空
{
"data": {
"code": 200,
"msg": "成功",
"data": [{
"chartId": 262,
"chartName": "bbbb",
"chartType": "Pie",
"describes": null,
"chartsGroup": -1,
"createBy": "zhuth",
"createDate": "2018-08-06 11:17:33.0"
}, {
"chartId": 265,
"chartName": "销售订单0",
"chartType": "individual",
"describes": null,
"chartsGroup": 26,
"createBy": "zhuth",
"createDate": "2018-08-06 15:35:29.0"
}, {
"chartId": 263,
"chartName": "bench_flowchart(未命名)111",
"chartType": "Histogram",
"describes": null,
"chartsGroup": 41,
"createBy": "zhuth",
"createDate": "2018-08-06 11:18:19.0"
}, {
"chartId": 267,
"chartName": "销售订单(未命名)",
"chartType": "Line",
"describes": null,
"chartsGroup": 41,
"createBy": "zhuth",
"createDate": "2018-08-06 17:49:00.0"
}, {
"chartId": 264,
"chartName": "hhjhh",
"chartType": "Histogram",
"describes": null,
"chartsGroup": -1,
"createBy": "zhuth",
"createDate": "2018-08-06 11:20:16.0"
}, {
"chartId": 295,
"chartName": "bbbb_副本",
"chartType": "Pie",
"describes": null,
"chartsGroup": -1,
"createBy": "zhuth",
"createDate": "2018-08-08 13:56:26.0"
}, {
"chartId": 266,
"chartName": "销售订单1",
"chartType": "population",
"describes": null,
"chartsGroup": 26,
"createBy": "zhuth",
"createDate": "2018-08-06 16:22:30.0"
}, {
"chartId": 298,
"chartName": "文档测试1(未命名)",
"chartType": "Histogram",
"describes": null,
"chartsGroup": -1,
"createBy": "zhuth",
"createDate": "2018-08-08 16:32:33.0"
}, {
"chartId": 261,
"chartName": "bench_flowchart(未命名)",
"chartType": "Histogram",
"describes": null,
"chartsGroup": -1,
"createBy": "zhuth",
"createDate": "2018-08-06 10:03:03.0"
}]
}
}
/getChartsConfig
HTTP - POST
dispatch(type:'chart/remoteDetail')
Code (图表编号)
298
{
"data": {
"code": 200,
"msg": "成功",
"data": {
"chartId": 298,
"chartName": "文档测试1(未命名)",
"tableName": null,
"chartType": "Histogram",
"chartsGroup": -1,
"groupBy": "[]",
"chartConfig": "{\"xAxis\":{\"column\":{},\"granularity\":{}},\"yAxis\":{\"column\":{},\"gauge\":{}},\"groupBy\":{\"key\":\"\"}}",
"createBy": "zhuth",
"accessAuthority": "null",
"updateAuthority": "null",
"describes": null,
"style": "\"\"",
"filters": "null",
"createDate": "2018-08-08 16:32:33.0",
"updateDate": null,
"dataId": 71,
"subsections": null
}
}
}
/showHistogram
/showPie
/showLine
/showScatter
/showIndividual
HTTP - POST
dispatch(type:'chart/fetchBarData')
dispatch(type:'chart/fetchLineData')
dispatch(type:'chart/fetchPieData')
dispatch(type:'chart/fetchScatterData')
dispatch(type:'chart/fetchDataViewData')
| 字段名(后端) | 字段名(前端) | 说明 |
|---|---|---|
| id | code | 图表编号 |
| groups | preparing.groupBy.key | 分组列列名 |
| xAxis | X轴 | |
| columnRename | barConfig.xAxis.column.value | X轴列名 |
| columnType | barConfig.xAxis.column.type | X轴分析类型 |
| showDataType | barConfig.xAxis.granularity.value | X轴粒度 |
| yAxis | Y轴 | |
| columnRename | barConfig.yAxis.column.value | Y轴列名 |
| showDataType | barConfig.yAxis.gauge.value | Y轴统计方式 |
参照数据源分组接口说明
/getChartsGroup
HTTP - POST
dispatch(type:'chart/remoteGroupList')
空
Code 分组编号 Pcode 父级分组编号 Index 索引 Label 标签
/setChartsGroup
#####请求方式HTTP - POST
dispatch(type:'chart/remoteAddGroup')
| 字段名(后端) | 字段名(前端) | 说明 |
|---|---|---|
| fatherId | pgroup.code | 父级分组ID |
| groupName | “新子分组”’ | 基础配置 – 数据源 |
| groupIndex | 分组索引 | |
| createBy | 创建人 |
如果是顶级分组(没有父级分组),则父级分组ID设置为-1
/updataChartsGroup
HTTP - POST
dispatch(type:'chart/remoteModifyGroup')
| 字段名(后端) | 字段名(前端) | 说明 |
|---|---|---|
| Id | Group.code | 分组ID |
| fatherId | pgroup.code | 父级分组ID |
| groupName | “新子分组”’ | 基础配置 – 数据源 |
| groupIndex | 分组索引 | |
| createBy | 创建人 |
/updateChartConfigGroup
HTTP - POST
dispatch(type:'chart/remoteSetChartGroup')
| 字段名(后端) | 字段名(前端) | 说明 |
|---|---|---|
| Id | DatasourceCode | 数据源ID |
| GroupID | “新子分组”’ | 目标分组ID |
/updataListGroup
HTTP - POST
dispatch(type:'chart/remoteModifyGroups')
id : code
/delChartsGroup
HTTP - POST
dispatch(type:'chart/remoteDeleteGroup')
Code ID
/getColumnData
HTTP - POST
dispatch(type:'chartDesigner/remoteDataColumn')
| 字段名(后端) | 字段名(前端) | 说明 |
|---|---|---|
| fatherId | pgroup.code | 父级分组ID |
| groupName | “新子分组”’ | 基础配置 – 数据源 |
| groupIndex | 分组索引 | |
| createBy | 创建人 |
71
{
"data": {
"code": 200,
"msg": "成功",
"data": [{
"columnName": "BC_CODE",
"columnRaname": "编号",
"columnType": "categorical",
"isGroup": "1",
"isSubsection": "0"
}, {
"columnName": "BC_DESC",
"columnRaname": "工作台说明",
"columnType": "categorical",
"isGroup": "1",
"isSubsection": "0"
}, {
"columnName": "BC_DETNO",
"columnRaname": "序号",
"columnType": "scale",
"isGroup": "0",
"isSubsection": "1"
}, {
"columnName": "BC_ICON",
"columnRaname": "图标",
"columnType": "categorical",
"isGroup": "1",
"isSubsection": "0"
}, {
"columnName": "BC_ID",
"columnRaname": "ID",
"columnType": "scale",
"isGroup": "0",
"isSubsection": "1"
}, {
"columnName": "BC_TITLE",
"columnRaname": "工作台标题",
"columnType": "categorical",
"isGroup": "1",
"isSubsection": "0"
}, {
"columnName": "BC_URLCOND",
"columnRaname": "链接条件",
"columnType": "categorical",
"isGroup": "1",
"isSubsection": "0"
}, {
"columnName": "BC_USED",
"columnRaname": "是否使用",
"columnType": "scale",
"isGroup": "0",
"isSubsection": "1"
}]
}
}
此处将整个groups集体上传 集体替换。 此处建议使用batch表达批量修改的概念。