|
|
@ -55,8 +55,14 @@ export default { |
|
|
|
getWarningStateDay().then(res => { |
|
|
|
if (res.code == 200) { |
|
|
|
let data = res.data; |
|
|
|
if (data.lemgth > 0) { |
|
|
|
if (data.length > 0) { |
|
|
|
window.echartsData = []; |
|
|
|
|
|
|
|
// let count = 0; |
|
|
|
// data.forEach((it) => { |
|
|
|
// count += it.number; |
|
|
|
// }) |
|
|
|
|
|
|
|
for (let i = 0; i < data.length; i++) { |
|
|
|
let it = data[i]; |
|
|
|
if (it.warningState == 1) { |
|
|
@ -89,11 +95,6 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
let count = 0; |
|
|
|
|
|
|
|
echartsData.forEach((it) => { |
|
|
|
count += it.value; |
|
|
|
}) |
|
|
|
|
|
|
|
chartsStatistics.legend.data = window.echartsData?.map(x => x); |
|
|
|
chartsStatistics.series[0].data = echartsData.map((item, index) => { |
|
|
@ -140,10 +141,10 @@ export default { |
|
|
|
context.lineWidth = 1; // 设置线段宽度 |
|
|
|
|
|
|
|
// 绘制圆角矩形 |
|
|
|
drawRoundRect(context, 272, 50, 120, 24, 12, gr) |
|
|
|
drawRoundRect(context, 272, 78, 120, 24, 12, gr) |
|
|
|
drawRoundRect(context, 272, 106, 120, 24, 12, gr) |
|
|
|
|
|
|
|
drawRoundRect(context, 270, 36, 120, 24, 12, gr) |
|
|
|
drawRoundRect(context, 270, 63, 120, 24, 12, gr) |
|
|
|
drawRoundRect(context, 270, 90, 120, 24, 12, gr) |
|
|
|
drawRoundRect(context, 270, 117, 120, 24, 12, gr) |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|