Browse Source

vnaRawData.html添加图表显示

erp、
RonNurKe 1 year ago
parent
commit
4fa0d150e1
  1. 36
      ruoyi-admin/src/main/resources/templates/rfMsg/vnaRawData/vnaRawData.html

36
ruoyi-admin/src/main/resources/templates/rfMsg/vnaRawData/vnaRawData.html

@ -2,6 +2,9 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('rf测试历史结果列表')" />
<script src="
https://cdn.jsdelivr.net/npm/echarts@5.4.2/dist/echarts.min.js
"></script>
</head>
<body class="gray-bg">
<div class="container-div">
@ -176,10 +179,43 @@
// + "</td></tr>";
// }
//将动态生成的table添加的事先隐藏的div中.
var chartsInfo ="";
chartsInfo+="<tr><td colspan='"+listValue.length+"'>" +
"<div id='charts"+id+"' style='height: 55vh;width: 90vw'></div>" +
"" +
"</td></tr>"
tableTbody+=chartsInfo
$("#tbody_"+id).html(tableTbody);
initEcharts(listKey,listValue,id)
}
})
}
function initEcharts(listKey ,listValue,id){
var chartDom = document.getElementById('charts'+id);
var myChart = echarts.init(chartDom);
var option;
option = {
xAxis: {
type: 'category',
data: listKey
},
yAxis: {
type: 'value'
},
series: [
{
data: listValue,
type: 'line',
smooth: true
}
]
};
option && myChart.setOption(option);
}
</script>
</body>
</html>
Loading…
Cancel
Save