提交 53a9de3c authored 作者: mry's avatar mry

fix(base): 修改了报告样式

上级 c333d7ee
......@@ -38,7 +38,8 @@
</div>
<div class="form-group flex">
<label for="probability">通过率:</label>
<input class="form-control" id="probability" readonly="readonly" value="${overView.probability + "%"!}"/>
<input class="form-control" id="probability" readonly="readonly"
value="${overView.probability + "%"!}"/>
</div>
<#else>
</#if>
......@@ -289,10 +290,9 @@
pieChart = {
title: {
text: '测试结果',
subtext: ' ' +
' ${"测试通过率:" + overView.probability + "%"!}',
left: 'left'
text: '测试通过率',
subtext: '${overView.probability + "%"!}',
left: 'center'
},
tooltip: {
trigger: 'item'
......@@ -303,7 +303,7 @@
},
series: [
{
name: '是否成功',
name: '是否通过',
type: 'pie',
radius: ['25%', '50%'],
avoidLabelOverlap: false,
......@@ -330,21 +330,21 @@
},
data: [
{value: ${overView.passNum!}, name: 'pass',itemStyle: {
{
value: ${overView.passNum!}, name: 'pass', itemStyle: {
color: 'green'
}},
{value: ${overView.failNum!}, name: 'fail',itemStyle: {
}
},
{
value: ${overView.failNum!}, name: 'fail', itemStyle: {
color: '#a90000'
}},
}
},
]
}
]
};
pieChart && myChart.setOption(pieChart);
</script>
<script>
let chartDom2 = document.getElementById('histogram');
let myChart2 = echarts.init(chartDom2);
let histogram;
......@@ -372,7 +372,7 @@
}],
type: 'bar',
showBackground: true,
barWidth : 50,
barWidth: 50,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
}
......@@ -380,7 +380,12 @@
]
};
histogram && myChart2.setOption(histogram);
myChart.setOption(pieChart);
myChart2.setOption(histogram);
window.onresize = function () {
myChart.resize();
myChart2.resize();
}
</script>
</body>
......
......@@ -145,10 +145,9 @@
pieChart = {
title: {
text: '测试结果',
subtext: ' ' +
' 测试通过率: 100%',
left: 'left',
text: '测试通过率',
subtext: '50%',
left: 'center',
},
tooltip: {
trigger: 'item'
......@@ -186,21 +185,21 @@
},
data: [
{value: 1, name: 'pass',itemStyle: {
{
value: 1, name: 'pass', itemStyle: {
color: 'green'
}},
{value: 1, name: 'fail',itemStyle: {
}
},
{
value: 1, name: 'fail', itemStyle: {
color: '#a90000'
}},
}
},
]
}
]
};
pieChart && myChart.setOption(pieChart);
</script>
<script>
let chartDom2 = document.getElementById('histogram');
let myChart2 = echarts.init(chartDom2);
let histogram;
......@@ -227,7 +226,7 @@
}
}],
type: 'bar',
barWidth : 50,
barWidth: 50,
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
......@@ -236,7 +235,12 @@
]
};
histogram && myChart2.setOption(histogram);
myChart.setOption(pieChart);
myChart2.setOption(histogram);
window.onresize = function () {
myChart.resize();
myChart2.resize();
}
</script>
</body>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论