暂降模块,图表生成替换

This commit is contained in:
wr
2023-06-28 15:30:17 +08:00
parent 57d2c0840b
commit 2eb2a41744
19 changed files with 500 additions and 1844 deletions

View File

@@ -88,25 +88,6 @@
<build>
<finalName>eventboot</finalName>
<resources>
<!--设置自己目录下的配置文件-->
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.ftl</include>
<include>**/*.yml</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>

View File

@@ -138,40 +138,6 @@ public class ReportController extends BaseController {
@ApiImplicitParam(name = "exportParam", value = "监测点报告导出参数", required = true)
public void getLineExport(@RequestBody @Validated ExportParam exportParam, HttpServletResponse response) throws IOException, InvalidFormatException, TemplateException, ParseException {
reportService.getLineExport(exportParam, response);
// @RequestParam(name = "lineIndex") String lineIndex,@RequestParam(name = "startTime") String startTime,@RequestParam(name = "endTime") String endTime,@RequestParam("flag")Integer flag
// ExportParam exportParam = new ExportParam();
// exportParam.setFlag(flag);
// exportParam.setXq(true);
// exportParam.setLb(true);
// exportParam.setMdbg(true);
// exportParam.setMdtx(true);
// exportParam.setSjdF47(true);
// exportParam.setSjdITIC(true);
// exportParam.setGlfbfz(true);
// exportParam.setGlfbsj(true);
// exportParam.setTjbg(true);
// exportParam.setTjtx(true);
// exportParam.setYybg(true);
// exportParam.setYytx(true);
// exportParam.setLxbg(true);
// exportParam.setLxtx(true);
//
// exportParam.setLineName("江苏省->常熟市-常熟森泉印染厂_6600087524-10kV I母_电源总进线1");
// exportParam.setSearchBeginTime(startTime);
// exportParam.setSearchEndTime(endTime);
// exportParam.setDeptIndex("5699e5916a18a6381e1ac92da5bd2628");
// exportParam.setMonitorFlag(0);
// exportParam.setLineId(lineIndex);
// exportParam.setStatFlag(false);
// exportParam.setServerName("event-boot");
// exportParam.setPowerFlag(1);
// SimpleDTO simpleDTO = new SimpleDTO();
// simpleDTO.setName("电网拓扑");
// simpleDTO.setSort(0);
// simpleDTO.setCode("Power_Network");
// exportParam.setStatisticalType(simpleDTO);
}
/**

View File

@@ -1,86 +0,0 @@
<#--区域统计和电压等级共用模板-->
{
title: {
text: '设备运行情况',
left:'center',
subtext:'${subtext}',
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
legend: {
data: ['在线', '离线',],
left: '10%',
top:'5%',
textStyle: {
color: "#666666"
},
itemWidth: 15,
itemHeight: 10,
itemGap: 25
},
grid: {
left: '3%',
right: '8%',
bottom: '5%',
top: '20%',
containLabel: true
},
xAxis: {
name: '${xname}',
nameTextStyle: {
color: '#666666',
},
type: 'category',
data: ${area}
},
yAxis: {
name: '(个)',
nameTextStyle: {
color: '#666666',
},
type: 'value',
axisLine: { show: true, lineStyle: { color: '#666666' } },
axisLabel: { color: '#666666' },
splitLine: { lineStyle: { color: ['#ccc'], type: [5, 8], dashOffset: 3 } },
},
series: [
{
name: '在线',
type: 'bar',
stack: 'account',
barWidth: 20,
label: {
show: true,
color:'purple',
verticalAlign: 'middle',
rotate: 0,
fontSize: 12,
},
color:'green',
itemStyle: {
},
data: ${onlineData}
},
{
name: '离线',
type: 'bar',
stack: 'account',
barWidth: 20,
label: {
show: true,
color:'purple',
verticalAlign: 'middle',
rotate: 0,
fontSize: 12,
},
color:'orange',
itemStyle: {
},
data: ${offlineData}
}
]
}

View File

@@ -1,149 +0,0 @@
<#--暂降密度点图专用模板-->
{
backgroundColor: "#fff",
tooltip: {
trigger: "axis",
},
title: {
text: "暂降密度图",
x: "center",
},
toolbox: {
show: true,
feature: {
myFull: {
show: true,
title: "全屏查看",
icon: "path://M432.45,595.444c0,2.177-4.661,6.82-11.305,6.82c-6.475,0-11.306-4.567-11.306-6.82s4.852-6.812,11.306-6.812C427.841,588.632,432.452,593.191,432.45,595.444L432.45,595.444z M421.155,589.876c-3.009,0-5.448,2.495-5.448,5.572s2.439,5.572,5.448,5.572c3.01,0,5.449-2.495,5.449-5.572C426.604,592.371,424.165,589.876,421.155,589.876L421.155,589.876z M421.146,591.891c-1.916,0-3.47,1.589-3.47,3.549c0,1.959,1.554,3.548,3.47,3.548s3.469-1.589,3.469-3.548C424.614,593.479,423.062,591.891,421.146,591.891L421.146,591.891zM421.146,591.891",
onclick: (e) => {
this.fullFlag = true;
let element = document.getElementById("main");
// element.setOption(pacchartOption4);
if (element.requestFullScreen) {
// HTML W3C 提议
element.requestFullScreen();
} else if (element.msRequestFullscreen) {
// IE11
element.msRequestFullScreen();
} else if (element.webkitRequestFullScreen) {
// Webkit (works in Safari5.1 and Chrome 15)
element.webkitRequestFullScreen();
} else if (element.mozRequestFullScreen) {
// Firefox (works in nightly)
element.mozRequestFullScreen();
}
// 退出全屏
if (element.requestFullScreen) {
document.exitFullscreen();
} else if (element.msRequestFullScreen) {
document.msExitFullscreen();
} else if (element.webkitRequestFullScreen) {
document.webkitCancelFullScreen();
} else if (element.mozRequestFullScreen) {
document.mozCancelFullScreen();
}
},
},
},
},
visualMap: {
max: 20,
show: false,
inRange: {
color: ["#313695", "#00BB00", "#ff8000", "#a50026"],
},
},
xAxis3D: {
type: "category",
name: "剩余电压(%)",
data: [
"0-10",
"10-20",
"20-30",
"30-40",
"40-50",
"50-60",
"60-70",
"70-80",
"80-90",
"90-100",
],
},
yAxis3D: {
type: "category",
name: "持续时间(cyc)",
data: [
"1cyc",
"2cyc",
"3cyc",
"4cyc",
"5cyc",
"6~10cyc",
"10~20cyc",
"20~30cyc",
"30~60cyc",
],
splitLine: {
lineStyle: {
// 使用深浅的间隔色
color: ["#"],
type: "dashed",
opacity: 0.5,
},
},
},
zAxis3D: {
type: "value",
splitNumber: 10,
minInterval: 10,
name: "次数",
},
grid3D: {
boxWidth: 200,
boxDepth: 80,
light: {
main: {
intensity: 1.2,
},
ambient: {
intensity: 0.3,
},
},
},
series: [{
type: "bar3D",
data: ${data}.map(function(item) {
return {
value: [item.x, item.y, item.z],
};
}),
shading: "realistic",
label: {
show: false,
textStyle: {
fontSize: 16,
borderWidth: 1,
},
},
itemStyle: {
opacity: 1,
},
emphasis: {
label: {
textStyle: {
fontSize: 20,
color: "#900",
},
},
itemStyle: {
color: "#900",
},
},
}, ],
};

View File

@@ -1,103 +0,0 @@
<#--区域和电压等级统计次数共用模板-->
{
title: {
text: '暂态事件次数',
left:'center',
subtext:'${subtext}',
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
legend: {
data: ['暂降次数', '中断次数', '暂升次数'],
left: '7%',
top:'5%',
textStyle: {
color: "#666666"
},
itemWidth: 10,
itemHeight: 10,
itemGap: 15
},
grid: {
left: '3%',
right: '8%',
bottom: '5%',
top: '20%',
containLabel: true
},
xAxis: {
name: '${xname}',
nameTextStyle: {
color: '#666666',
},
type: 'category',
data: ${area}
},
yAxis: {
name: '(次)',
nameTextStyle: {
color: '#666666',
},
type: 'value',
axisLine: { show: true, lineStyle: { color: '#666666' } },
axisLabel: { color: '#666666' },
splitLine: { lineStyle: { color: ['#ccc'], type: [5, 8], dashOffset: 3 } },
},
series: [
{
name: '暂降次数',
type: 'bar',
stack: 'account',
barWidth: 20,
label: {
show: true,
color:'purple',
verticalAlign: 'middle',
rotate: 0,
fontSize: 12,
},
color:'#ff9966',
itemStyle: {
},
data: ${sag}
},
{
name: '中断次数',
type: 'bar',
stack: 'account',
barWidth: 20,
label: {
show: true,
color:'purple',
verticalAlign: 'middle',
rotate: 0,
fontSize: 12,
},
color:'#00dd00',
itemStyle: {
},
data: ${break}
},
{
name: '暂升次数',
type: 'bar',
stack: 'account',
barWidth: 20,
label: {
show: true,
color:'purple',
verticalAlign: 'middle',
rotate: 0,
fontSize: 12,
},
color:'#0066ff',
itemStyle: {
},
data: ${up}
},
]
}

View File

@@ -1,88 +0,0 @@
<#--ITIC曲线专用-->
{
backgroundColor: "#FFF",
title: {
text: "ITIC曲线",
left: "center",
},
grid: {
top: "80px",
left: "40px",
right: "40px",
bottom: "10%",
},
legend: {
data: ["上限", "下限", "可容忍事件", "不可容忍事件"],
top:"26px",
left: "0px",
bottom: "94%",
},
color: ["#FF8C00", "#00BFFF", "green", "red"],
xAxis: [
{
type: "log",
min: "0.001",
max: "1000",
splitLine: {
show: false,
},
name: "s",
},
],
yAxis: [
{
type: "value",
splitNumber: 10,
minInterval: 3,
name: "%"
},
],
series: [
{
name: "上限",
type: "line",
data: [
[0.001, 200],
[0.003, 140],
[0.003, 120],
[0.5, 120],
[0.5, 110],
[10, 110],
[1000, 110]
],
showSymbol: false,
tooltips: {
show: false
},
},
{
name: "下限",
type: "line",
data: [
[0.02, 0],
[0.02, 70],
[0.5, 70],
[0.5, 80],
[10, 80],
[10, 90],
[1000, 90]
],
showSymbol: false,
tooltips: {
show: false
},
},
{
name: "可容忍事件",
type: "scatter",
symbol: "circle",
data: ${point}
},
{
name: "不可容忍事件",
type: "scatter",
symbol: "circle",
data: ${pointno}
}
]
}

View File

@@ -1,64 +0,0 @@
<#--F47曲线图专用模板-->
{
backgroundColor: "#fff",
title: {
text: "SEMI F47曲线",
left: "center",
},
grid: {
top: "80px",
left: "40px",
right: "40px",
bottom: "10%",
},
legend: {
data: ["边界线", "可容忍事件", "不可容忍事件"],
top:"26px",
left: "0px",
bottom: "94%",
},
color: ["yellow", "green", "red"],
xAxis: [
{
type: "log",
min: "0.001",
max: "1000",
splitLine: {
show: false,
},
name: "s",
},
],
yAxis: [
{
type: "value",
max: ${zdz} + 20,
splitNumber: 10,
minInterval: 0.1,
name: "%",
},
],
series: [
{
name: "边界线",
type: "line",
data: ${bjx},
showSymbol: false,
tooltips: {
show: false,
},
},
{
name: "可容忍事件",
type: "scatter",
symbol: "circle",
data: ${point}
},
{
name: "不可容忍事件",
type: "scatter",
symbol: "circle",
data: ${pointno}
}
]
}

View File

@@ -1,93 +0,0 @@
<#--暂降幅值的概率分布函数专用模板-->
{
backgroundColor: "#fff",
title: {
text: "暂降幅值的概率分布函数",
x: "center"
},
grid: {
left: "10%",
right: "10%",
bottom: "15%"
},
toolbox: {
show: true,
feature: {
restore: { show: true },
saveAsImage: { show: true },
},
},
tooltip: {
trigger: "axis",
formatter: "暂降幅值: {b0}<br />概率分布: {c0}%",
},
legend: {
show: true,
left: 10,
data: ["概率分布", "占比"],
},
calculable: true,
xAxis: [
{
type: "category",
boundaryGap: true,
name: "暂降幅值",
nameLocation: "center",
nameGap: 40,
nameTextStyle: {
fontSize: 15,
},
data: [
"0",
"10%",
"20%",
"30%",
"40%",
"50%",
"60%",
"70%",
"80%",
"90%",
],
},
],
yAxis: [
{
type: "value",
name: "布分率概",
nameLocation: "center",
nameGap: 60,
nameTextStyle: {
fontSize: 15,
},
axisLabel: {
formatter: "{value} %",
},
},
{
type: "value",
name: "比占",
nameLocation: "center",
nameGap: 20,
nameTextStyle: {
fontSize: 15,
},
axisLabel: {
formatter: "{value} %",
},
},
],
series: [
{
name: "概率分布",
type: "line",
data: ${eventValue},
},
{
name: "占比",
type: "bar",
data: ${pereventValue},
barWidth: 30
}
]
}

View File

@@ -1,71 +0,0 @@
<#--持续时间的概率分布函数专用模板-->
{
backgroundColor: "#fff",
title: {
text: "持续时间的概率分布函数",
x: "center",
},
legend: {
show: true,
left: 10,
data: ["概率分布", "占比"],
},
calculable: true,
grid: {
left: "10%",
right: "10%",
bottom: "15%"
},
xAxis: [
{
type: "category",
boundaryGap: true,
name: "暂降持续时间(s)",
nameLocation: "center",
nameGap: 40,
nameTextStyle: {
fontSize: 15,
},
data: ["0.01", "0.1", "0.25", "0.5", "1", "3", "20", "60", "180"],
},
],
yAxis: [
{
type: "value",
name: "布分率概",
nameLocation: "center",
nameGap: 60,
nameTextStyle: {
fontSize: 15,
},
axisLabel: {
formatter: "{value} %",
},
},
{
type: "value",
name: "比占",
nameLocation: "center",
nameGap: 20,
nameTextStyle: {
fontSize: 15,
},
axisLabel: {
formatter: "{value} %",
},
},
],
series: [
{
name: "概率分布",
type: "line",
data: ${sisttime},
},
{
name: "占比",
type: "bar",
data: ${persisttime},
barWidth: 30,
}
]
}

View File

@@ -1,59 +0,0 @@
<#--月份统计专用模板-->
{
backgroundColor: "#fff",
title: {
text: "${text}",
x: "center",
},
color: ["#FF8C00"],
legend: {
data: ["暂降次数"],
x: "left",
},
grid: {
top: "80px",
left: "40px",
right: "60px",
bottom:"20px",
containLabel: true,
},
xAxis: [
{
type: "category",
data: ${months},
name: "${xname}",
splitLine: {
show: false,
},
axisLabel: {
show: true,
interval: 0,
},
},
],
yAxis: [
{
type: "value",
name: "次",
},
],
series: [
{
name: "暂降次数",
type: "bar",
barMaxWidth: 45,
itemStyle: {
normal: {
label: {
show: true,
textStyle: {
label: { show: true, position: "top" },
color: "#8B008B",
},
},
},
},
data: ${handle},
}
]
}

View File

@@ -1,50 +0,0 @@
<#--类型专用模板-->
{
backgroundColor: '#fff',
animation: false,
title: {
text: '暂降类型',
x: '51%',
},
legend: {
orient: 'vertical',
left: 'left',
data: ${typeArray}
},
series: [
{
name: '暂降类型',
type: 'pie',
radius: '70%',
center: ['55%', '53%'],
label: {
normal: {
show: true,
formatter: '{b}:{d}%'
},
emphasis: {
show: true
}
},
lableLine: {
normal: {
show: false
},
emphasis: {
show: true
}
},
data: [<#list valueArray as a>
{value:${a.times?c},
name:'${a.type}'},
</#list>],
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
}

View File

@@ -1,49 +0,0 @@
<#--暂降原因专用模板-->
{
backgroundColor: '#fff',
animation: false,
title: {
text: '暂降原因',
x: '51%'
},
legend: {
orient: 'vertical',
left: 'left',
data: ${typeArray}
},
series: [
{
name: '暂降原因',
type: 'pie',
radius: '70%',
center: ['55%', '53%'],
label: {
normal: {
formatter: '{b}:{d}%'
},
emphasis: {
show: true
}
},
lableLine: {
normal: {
show: false
},
emphasis: {
show: true
}
},
data: [<#list valueArray as a>
{value:${a.times?c},
name:'${a.reason}'},
</#list>],
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
}

View File

@@ -1,66 +0,0 @@
{
backgroundColor: "#FFF",
title: {
text: '电压等级',
x: 'center'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
formatter: function (params) {
var tips = "";
tips += params[0].name ;
for (var i = 0; i < params.length; i++) {
tips += params[i].seriesName + ":" + params[i].value ;
}
return tips;
}
},
color: ['orange'],
legend: {
data: ['暂降次数'],
selectedMode: false,
x: 'left'
},
grid: {
left: '3%',
right: '12%',
bottom: '6%',
containLabel: true
},
xAxis: [{
type: 'category',
data: ${xvalue},
splitLine: {
show: false
},
name: '电压等级\n(监测点数)',
axisLabel: {
interval: 0,
show: true,
fontSize:10
}
}],
yAxis: [{
type: 'value',
name: '(次)'
}],
series: [{
name: '暂降次数',
type: 'bar',
itemStyle: {
normal: {
label: {
show: true,
textStyle: {
color: 'purple'
}
}
}
},
data: ${yvalue},
barMaxWidth: 45
}]
}

View File

@@ -1,68 +0,0 @@
{
backgroundColor: '#FFF',
title: {
text: '区域统计',
x: 'center'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
formatter: function (params) {
var tips = "";
tips += params[0].name ;
for (var i = 0; i < params.length; i++) {
tips += params[i].seriesName + ":" + params[i].value ;
}
return tips;
}
},
color: ['orange'],
grid: {
left: '1%',
right: '7%',
bottom: '8%',
containLabel: true
},
legend: {
data: ['暂降次数'],
selectedMode: false,
x: 'left'
},
xAxis: [{
type: 'category',
data: ${xvalue},
splitLine: {
show: false
},
name: '地区\n(监测点数)',
axisLabel: {
interval: 0,
show: true,
rotate:0,
fontSize:10
}
}],
yAxis: [{
type: 'value',
name: '(次)'
}],
series: [{
name: '暂降次数',
type: 'bar',
itemStyle: {
normal: {
label: {
show: true,
textStyle: {
color: 'purple'
}
}
}
},
data: ${yvalue},
barMaxWidth: 45
}],
}

View File

@@ -1,12 +0,0 @@
{
animation:false,
xAxis: {},
yAxis: {},
series: [
{
symbolSize: 2,
data: ${bdata},
type: 'scatter'
}
]
}

View File

@@ -1,76 +0,0 @@
{
backgroundColor: "#FFF",
title: {
text: ${test},
x: 'center'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
formatter: function (params) {
var tips = "";
tips += params[0].name ;
for (var i = 0; i < params.length; i++) {
tips += params[i].seriesName + ":" + params[i].value;
}
return tips;
}
},
grid: {
left: '3%',
bottom: '6%',
containLabel: true
},
legend: {
data: ['未关联暂降次数', '已关联处理事件'],
x: 'left'
},
xAxis: [{
type: 'category',
data:${xvalue},
name: ${test},
splitLine: {
show: false
},
axisLabel: {
show: true,
interval: 0,
fontSize:10
}
}],
yAxis: [{
type: 'value',
name: '次'
}],
series: [{
name: '未关联暂降次数',
type: 'bar',
stack: '事件总数',
barMaxWidth: 45,
itemStyle: {
normal: {
color: 'orange',
barBorderColor: 'orange',
barBorderWidth: 2,
barBorderRadius: 0
}
},
data: ${yvalue1}
}, {
name: '已关联处理事件',
type: 'bar',
stack: '事件总数',
barMaxWidth: 45,
itemStyle: {
normal: {
color: "#ccc",
barBorderColor: '#ccc',
barBorderWidth: 2,
barBorderRadius: 0
}
},
data: ${yvalue2}
}]
}