Commit 48282e58 authored by 朱超's avatar 朱超

趋势图页面更新

parent da46b311
......@@ -93,10 +93,7 @@
</el-table>
</div>
<div v-show="!switchV" id="echartsLayerBlock">
<div
class="echartsLayer"
id="echartsLayer"
></div>
<div class="echartsLayer" id="echartsLayer"></div>
</div>
<!-- <div v-show="!nodata">
<el-empty :image-size="200" description="暂无数据" />
......@@ -189,8 +186,10 @@ function postHeatUctFun() {
interval: 2,
};
postHeatUct(heatUctInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer"));
// postHeatUct(params).then((res) => {
if (res.success === true) {
tableData.length = 0;
res.data.forEach((element) => {
let tableArr = {
transferName: element.transferName,
......@@ -201,10 +200,14 @@ function postHeatUctFun() {
});
nodata.value = true;
tabloading.value = false;
echartData.length = 0;
echartSeries.length = 0;
echartDataLegend.length = 0;
echartDataTime.length = 0;
echartData.value = dataDeal(res.data);
echartData.value[0].listInfo.forEach((element) => {
if (element.gatherTime) {
echartDataTime.push(element.gatherTime);
echartDataTime.push(element.gatherTime.split(" 00:00:00")[0]);
}
});
echartData.value.forEach((element) => {
......@@ -240,9 +243,10 @@ function postHeatUctFun() {
);
});
echartSeries.forEach((element, index) => {
console.log(element);
echartDataLegend.push(element.name);
});
//echartInit();
echartInit();
} else if (res.status == 9) {
setInterval(function () {
tabloading.value = false;
......@@ -299,7 +303,7 @@ function echartInit() {
var chartDom = document.getElementById("echartsLayer");
var myChart = echarts.init(chartDom);
var option;
myChart.resize({ width:computedWidth.value,height: computedHeight.value });
myChart.resize({ width: computedWidth.value, height: computedHeight.value });
var company = "T";
option = {
......@@ -364,7 +368,7 @@ function changeFun() {
nodata.value = true;
var divWidth = document.getElementById("contentBlock").offsetWidth;
var divHeight = document.getElementById("contentBlock").scrollHeight;
computedWidth.value = divWidth + "px"
computedWidth.value = divWidth + "px";
computedHeight.value = divHeight * 0.7 + "px";
echartInit();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment