Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz4jVue
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
iBiz4jVue
提交
0a0ef2a6
提交
0a0ef2a6
编写于
6月 04, 2020
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新图表
上级
c1dacb4d
变更
19
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
301 行增加
和
93 行删除
+301
-93
CONTROL-BASE.vue#AXIS_ANGLEAXIS.ftl
@CONTROL/数据图表/CONTROL-BASE.vue#AXIS_ANGLEAXIS.ftl
+13
-0
CONTROL-BASE.vue#AXIS_CATEGORY.ftl
@CONTROL/数据图表/CONTROL-BASE.vue#AXIS_CATEGORY.ftl
+24
-0
CONTROL-BASE.vue#AXIS_RADIUSAXIS.ftl
@CONTROL/数据图表/CONTROL-BASE.vue#AXIS_RADIUSAXIS.ftl
+11
-0
CONTROL-BASE.vue#AXIS_RARALLELAXIS.ftl
@CONTROL/数据图表/CONTROL-BASE.vue#AXIS_RARALLELAXIS.ftl
+9
-0
CONTROL-BASE.vue#AXIS_SINGLEAXIS.ftl
@CONTROL/数据图表/CONTROL-BASE.vue#AXIS_SINGLEAXIS.ftl
+9
-0
CONTROL-BASE.vue#AXIS_VALUE.ftl
@CONTROL/数据图表/CONTROL-BASE.vue#AXIS_VALUE.ftl
+24
-0
CONTROL-BASE.vue#AXIS_XAXIS.ftl
@CONTROL/数据图表/CONTROL-BASE.vue#AXIS_XAXIS.ftl
+24
-0
CONTROL-BASE.vue#AXIS_YAXIS.ftl
@CONTROL/数据图表/CONTROL-BASE.vue#AXIS_YAXIS.ftl
+24
-0
CONTROL-BASE.vue#CS_GRID.ftl
@CONTROL/数据图表/CONTROL-BASE.vue#CS_GRID.ftl
+12
-0
CONTROL-BASE.vue#CS_RADAR.ftl
@CONTROL/数据图表/CONTROL-BASE.vue#CS_RADAR.ftl
+15
-0
CONTROL-BASE.vue#SERIES_BAR.ftl
@CONTROL/数据图表/CONTROL-BASE.vue#SERIES_BAR.ftl
+22
-0
CONTROL-BASE.vue#SERIES_FUNNEL.ftl
@CONTROL/数据图表/CONTROL-BASE.vue#SERIES_FUNNEL.ftl
+32
-0
CONTROL-BASE.vue#SERIES_LINE.ftl
@CONTROL/数据图表/CONTROL-BASE.vue#SERIES_LINE.ftl
+22
-0
CONTROL-BASE.vue#SERIES_MODEL.ftl
@CONTROL/数据图表/CONTROL-BASE.vue#SERIES_MODEL.ftl
+0
-0
CONTROL-BASE.vue#SERIES_PIE.ftl
@CONTROL/数据图表/CONTROL-BASE.vue#SERIES_PIE.ftl
+27
-0
CONTROL-BASE.vue#SERIES_RADAR.ftl
@CONTROL/数据图表/CONTROL-BASE.vue#SERIES_RADAR.ftl
+17
-0
CONTROL-BASE.vue.ftl
@CONTROL/数据图表/CONTROL-BASE.vue.ftl
+0
-0
MODEL.ts.ftl
@CONTROL/数据图表/MODEL.ts.ftl
+16
-4
SERVICE.ts.ftl
@CONTROL/数据图表/SERVICE.ts.ftl
+0
-89
未找到文件。
@CONTROL/数据图表/CONTROL-BASE.vue#AXIS_ANGLEAXIS.ftl
0 → 100644
浏览文件 @
0a0ef2a6
<#-- 绘图极坐标系的角度轴 -->
<#if item.render??>
${item.render.code}
<#else>
{
min: 0,
max: 360,
interval: 30,
startAngle: 45
}
</#if>
\ No newline at end of file
@CONTROL/数据图表/CONTROL-BASE.vue#AXIS_CATEGORY.ftl
0 → 100644
浏览文件 @
0a0ef2a6
<#-- 绘图X轴 -->
<#if item.render??>
${item.render.code}
<#else>
{
<#if item.getIndex()??>gridIndex:${item.getIndex()},</#if>
position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>,
type:<#if item.getType()??>'${item.getType()}'<#else>'category'</#if>,
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)}<#if userparam_has_next>,</#if>
</#if>
</#list>
</#if>
}
</#if>
\ No newline at end of file
@CONTROL/数据图表/CONTROL-BASE.vue#AXIS_RADIUSAXIS.ftl
0 → 100644
浏览文件 @
0a0ef2a6
<#-- 绘图极坐标系的径向轴 -->
<#if item.render??>
${item.render.code}
<#else>
{
min: 0,
max: 10,
interval: 2
}
</#if>
\ No newline at end of file
@CONTROL/数据图表/CONTROL-BASE.vue#AXIS_RARALLELAXIS.ftl
0 → 100644
浏览文件 @
0a0ef2a6
<#-- 绘图平行坐标系 -->
<#if item.render??>
${item.render.code}
<#else>
{
}
</#if>
\ No newline at end of file
@CONTROL/数据图表/CONTROL-BASE.vue#AXIS_SINGLEAXIS.ftl
0 → 100644
浏览文件 @
0a0ef2a6
<#-- 绘图单轴 -->
<#if item.render??>
${item.render.code}
<#else>
{
}
</#if>
\ No newline at end of file
@CONTROL/数据图表/CONTROL-BASE.vue#AXIS_VALUE.ftl
0 → 100644
浏览文件 @
0a0ef2a6
<#-- 绘图Y轴 -->
<#if item.render??>
${item.render.code}
<#else>
{
<#if item.getIndex()??>gridIndex:${item.getIndex()},</#if>
position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>,
type:<#if item.getType()?? && item.getType() == 'numeric'>'value'<#else>'${item.getType()}'</#if>,
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)}<#if userparam_has_next>,</#if>
</#if>
</#list>
</#if>
}
</#if>
\ No newline at end of file
@CONTROL/数据图表/CONTROL-BASE.vue#AXIS_XAXIS.ftl
0 → 100644
浏览文件 @
0a0ef2a6
<#-- 绘图X轴 -->
<#if item.render??>
${item.render.code}
<#else>
{
<#if item.getIndex()??>gridIndex:${item.getIndex()},</#if>
position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>,
type:<#if item.getType()??>'${item.getType()}'<#else>'category'</#if>,
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)}<#if userparam_has_next>,</#if>
</#if>
</#list>
</#if>
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
}
</#if>
\ No newline at end of file
@CONTROL/数据图表/CONTROL-BASE.vue#AXIS_YAXIS.ftl
0 → 100644
浏览文件 @
0a0ef2a6
<#-- 绘图Y轴 -->
<#if item.render??>
${item.render.code}
<#else>
{
<#if item.getIndex()??>gridIndex:${item.getIndex()},</#if>
position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>,
type:<#if item.getType()?? && item.getType() == 'numeric'>'value'<#else>'${item.getType()}'</#if>,
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
<#if item.getUserParamNames()??>
<#list item.getUserParamNames() as userparam>
<#if userparam?index_of("EC.")==0>
${userparam?remove_beginning("EC.")}:${item.getUserParam(userparam)}<#if userparam_has_next>,</#if>
</#if>
</#list>
</#if>
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
}
</#if>
\ No newline at end of file
@CONTROL/数据图表/CONTROL-BASE.vue#CS_GRID.ftl
0 → 100644
浏览文件 @
0a0ef2a6
<#-- 绘图网格start -->
<#if item.render??>
${item.render.code}
<#else>
{
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 绘图网格end -->
\ No newline at end of file
@CONTROL/数据图表/CONTROL-BASE.vue#CS_RADAR.ftl
0 → 100644
浏览文件 @
0a0ef2a6
<#-- 雷达图坐标系start -->
<#if item.render??>
${item.render.code}
<#else>
<#if item.getIndicatorPSCodeList?? && item.getIndicatorPSCodeList()??>
<#assign indicatorCodeList = item.getIndicatorPSCodeList() />
indicator:[
<#list indicatorCodeList.getAllPSCodeItems() as codeItem>
{name:'${codeItem.getText()}',max:${codeItem.getUserParam('MAXVALUE',100)}}<#if codeItem_has_next>,</#if>
</#list>
]
</#if>
</#if>
<#-- 雷达图坐标系end -->
\ No newline at end of file
@CONTROL/数据图表/CONTROL-BASE.vue#SERIES_BAR.ftl
0 → 100644
浏览文件 @
0a0ef2a6
<#-- 柱状图序列start -->
<#if item.render??>
${item.render.code}
<#else>
{
id:'<#if item.getName()??>${item.getName()?lower_case}</#if>',
name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'bar',
xAxisIndex:${item.getIndex()},
yAxisIndex:${item.getIndex()},
datasetIndex:${item.getIndex()},
encode: {
<#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if>
x: [<#if chartSeriesEncode.getX()??><#list chartSeriesEncode.getX() as xValue>'${xValue?lower_case}'<#if xValue_has_next>,</#if></#list></#if>],
y: [<#if chartSeriesEncode.getY()??><#list chartSeriesEncode.getY() as yValue>'${yValue?lower_case}'<#if yValue_has_next>,</#if></#list></#if>]
}<#if item.getBaseOptionJOString()??>,
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 柱状图序列end -->
\ No newline at end of file
@CONTROL/数据图表/CONTROL-BASE.vue#SERIES_FUNNEL.ftl
0 → 100644
浏览文件 @
0a0ef2a6
<#-- 折线图序列start -->
<#if item.render??>
${item.render.code}
<#else>
{
id:'<#if item.getName()??>${item.getName()?lower_case}</#if>',
name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'funnel',
datasetIndex:${item.getIndex()},
<#compress><#if item.getLeft()?? && item.getLeft() != "">left:"${item.getLeft()}",</#if>
<#if item.getTop()?? && item.getTop() != 0>top:"${item.getTop()}",</#if>
<#if item.getBottom()?? && item.getBottom() != 0>bottom:"${item.getBottom()}",</#if>
<#if item.getRight()?? && item.getRight() != "">right:"${item.getRight()}",</#if>
<#if item.getWidth()?? && item.getWidth() != "">width:"${item.getWidth()}",</#if>
<#if item.getHeight()?? && item.getHeight() != "">height:"${item.getHeight()}",</#if>
<#if item.getMinValue()?? && item.getMinValue() != 0 >min:"${item.getMinValue()}",</#if>
<#if item.getMaxValue()?? && item.getMaxValue() != 0 >max:"${item.getMaxSize()}",</#if>
<#if item.getMinSize()?? && item.getMinSize() != "">minSize:"${item.getMinSize()}",</#if>
<#if item.getMaxSize()?? && item.getMaxSize() != "">maxSize: "${item.getMaxSize()}",</#if>
<#if item.getFunnelAlign()?? && item.getFunnelAlign() != "">funnelAlign:"${item.getFunnelAlign()}",</#if></#compress>
seriesLayoutBy:"${item.getSeriesLayoutBy()}",
encode:{
<#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if>
itemName:"<#if chartSeriesEncode.getCategory()??>${chartSeriesEncode.getCategory()?lower_case}<#else>${item.getCatalogField()?lower_case}</#if>",
value:"<#if chartSeriesEncode.getValue()??>${chartSeriesEncode.getValue()?lower_case}<#else>${item.getValueField()?lower_case}</#if>"
}<#if item.getBaseOptionJOString()??>,
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 折线图序列end -->
\ No newline at end of file
@CONTROL/数据图表/CONTROL-BASE.vue#SERIES_LINE.ftl
0 → 100644
浏览文件 @
0a0ef2a6
<#-- 折线图序列start -->
<#if item.render??>
${item.render.code}
<#else>
{
id:'<#if item.getName()??>${item.getName()?lower_case}</#if>',
name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'line',
xAxisIndex:${item.getIndex()},
yAxisIndex:${item.getIndex()},
datasetIndex:${item.getIndex()},
encode: {
<#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if>
x: [<#if chartSeriesEncode.getX()??><#list chartSeriesEncode.getX() as xValue>'${xValue?lower_case}'<#if xValue_has_next>,</#if></#list></#if>],
y: [<#if chartSeriesEncode.getY()??><#list chartSeriesEncode.getY() as yValue>'${yValue?lower_case}'<#if yValue_has_next>,</#if></#list></#if>]
}<#if item.getBaseOptionJOString()??>,
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 折线图序列end -->
\ No newline at end of file
@CONTROL/数据图表/CONTROL-BASE.vue#SERIES_MODEL.ftl
0 → 100644
浏览文件 @
0a0ef2a6
此差异已折叠。
点击以展开。
@CONTROL/数据图表/CONTROL-BASE.vue#SERIES_PIE.ftl
0 → 100644
浏览文件 @
0a0ef2a6
<#-- 折线图序列start -->
<#if item.render??>
${item.render.code}
<#else>
{
id:'<#if item.getName()??>${item.getName()?lower_case}</#if>',
name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'pie',
datasetIndex:${item.getIndex()},
<#compress><#if item.getLeft()?? && item.getLeft() != "">left:"${item.getLeft()}",</#if>
<#if item.getTop()?? && item.getTop() != 0>top:"${item.getTop()}",</#if>
<#if item.getBottom()?? && item.getBottom() != 0>bottom:"${item.getBottom()}",</#if>
<#if item.getRight()?? && item.getRight() != "">right:"${item.getRight()}",</#if>
<#if item.getWidth()?? && item.getWidth() != "">width:"${item.getWidth()}",</#if>
<#if item.getHeight()?? && item.getHeight() != "">height:"${item.getHeight()}",</#if></#compress>
seriesLayoutBy:"${item.getSeriesLayoutBy()}",
encode:{
<#if item.getPSChartSeriesEncode()??><#assign chartSeriesEncode = item.getPSChartSeriesEncode() /></#if>
itemName:"<#if chartSeriesEncode.getCategory()??>${chartSeriesEncode.getCategory()?lower_case}<#else>${item.getCatalogField()?lower_case}</#if>",
value:"<#if chartSeriesEncode.getValue()??>${chartSeriesEncode.getValue()?lower_case}<#else>${item.getValueField()?lower_case}</#if>"
}<#if item.getBaseOptionJOString()??>,
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 折线图序列end -->
\ No newline at end of file
@CONTROL/数据图表/CONTROL-BASE.vue#SERIES_RADAR.ftl
0 → 100644
浏览文件 @
0a0ef2a6
<#-- 折线图序列start -->
<#if item.render??>
${item.render.code}
<#else>
{
id:'<#if item.getName()??>${item.getName()?lower_case}</#if>',
name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'radar',
encode:{
itemName:"type"
}<#if item.getBaseOptionJOString()??>,
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 折线图序列end -->
\ No newline at end of file
@CONTROL/数据图表/CONTROL-BASE.vue.ftl
浏览文件 @
0a0ef2a6
此差异已折叠。
点击以展开。
@CONTROL/数据图表/MODEL.ts.ftl
浏览文件 @
0a0ef2a6
...
@@ -10,10 +10,22 @@
...
@@ -10,10 +10,22 @@
*/
*/
public getDataItems(): any[] {
public getDataItems(): any[] {
return [
return [
{
{
name:'query',
name:'size',
prop:'query'
prop:'size'
},
},
{
name:'query',
prop:'query'
},
{
name:'page',
prop:'page'
},
{
name:'sort',
prop:'sort'
}
]
]
}
}
...
...
@CONTROL/数据图表/SERVICE.ts.ftl
浏览文件 @
0a0ef2a6
...
@@ -24,100 +24,12 @@
...
@@ -24,100 +24,12 @@
result =_appEntityService.FetchDefault(Context,Data, isloading);
result =_appEntityService.FetchDefault(Context,Data, isloading);
}
}
result.then((response) => {
result.then((response) => {
this.handleSeries(response);
resolve(response);
resolve(response);
}).catch(response => {
}).catch(response => {
reject(response);
reject(response);
});
});
});
});
}
}
<#-- 暂只支持第一个序列 -->
<#list ctrl.getPSDEChartSerieses() as series>
<#if series_index == 0>
<#assign chartSeries = series/>
</#if>
</#list>
/**
* 生成图表数据
*
* @param {*} response
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public handleSeries(response: any) {
let chartOption:any = {};
<#-- 获取x轴的分类属性字段 -->
<#if chartSeries.getCatalogField?? && chartSeries.getCatalogField()??>
<#assign catalogField = chartSeries.getCatalogField()>
let catalogFields: any = [<#rt>
<#list catalogField?split(";") as field>
"${field?lower_case}",<#t>
</#list>
];<#lt>
</#if>
<#-- 获取y轴值属性字段和中文名称 -->
<#if chartSeries.getValueField?? && chartSeries.getValueField()??>
<#assign valueField = chartSeries.getValueField()>
let valueFields: any = [<#rt>
<#list valueField?split(";") as field>
[ "${field?lower_case}", "${de.getPSDEField(field).getLogicName()}" ],<#t>
</#list>
];<#lt>
</#if>
// 数据按分类属性分组处理
let xFields:any = [];
let yFields:any = [];
valueFields.forEach((field: any,index: number) => {
yFields[index] = [];
});
response.data.forEach((item:any) => {
if(xFields.indexOf(item[catalogFields[0]]) > -1){
let num = xFields.indexOf(item[catalogFields[0]]);
valueFields.forEach((field: any,index: number) => {
yFields[index][num] += item[field[0]];
});
}else{
xFields.push(item[catalogFields[0]]);
valueFields.forEach((field: any,index: number) => {
yFields[index].push(item[field[0]]);
});
}
});
<#-- 折线图和柱状图需要配置xAxis,饼图不需要 -->
<#if chartSeries.getSeriesType() == 'line' || chartSeries.getSeriesType() == 'bar'>
chartOption.xAxis = { data: xFields };
</#if>
<#-- 配置series -->
let series: any = [];
valueFields.forEach((field: any,index: number) => {
let yData: any = [];
xFields.forEach((item:any, num: number) => {
<#if chartSeries.getSeriesType() == 'line' || chartSeries.getSeriesType() == 'bar'>
yData.push(yFields[index][num]);
<#elseif chartSeries.getSeriesType() == 'pie'>
yData.push({value: yFields[index][num], name: item});
</#if>
});
yData.sort(function (a:any, b:any) { return a.value - b.value; });
series.push({
name:field[1],
type:"${chartSeries.getSeriesType()}",
data:yData,
<#-- 饼图额外配置 -->
<#if chartSeries.getSeriesType() == 'pie'>
top:"40px",
left: (100/valueFields.length)*index+"%",
right: (100/valueFields.length)*(valueFields.length-index-1)+"%",
animationType: 'scale',
animationEasing: 'elasticOut',
animationDelay: function (idx: any) {
return Math.random() * 200;
}
</#if>
});
});
chartOption.series = series;
response.data = chartOption;
}
<#ibizinclude>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
</#ibizinclude>
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录