This commit is contained in:
2023-07-17 10:18:06 +08:00
parent bef845eb3d
commit 0626237912
12 changed files with 605 additions and 116 deletions

View File

@@ -83,7 +83,7 @@ export default {
series: [],
};
this.dataList.forEach((item) => {
const i = option.series.findIndex((c) => c.id === item.productTypeId);
const i = option.series.findIndex((c) => c.id === (this.eType?item.problemTypeId:item.productTypeId));
if (i >= 0) {
option.series[i].data.push(this.eType?item.problemTypeNumber:item.productTypeNumber);
} else {
@@ -104,7 +104,6 @@ export default {
option.series.push(obj);
}
})
console.log(option.series)
this.lineChart = echarts.init(document.getElementById("lineChart"))
this.lineChart.setOption(option);
window.addEventListener("resize", () => {
@@ -117,10 +116,10 @@ export default {
<style lang="scss">
.mod-demo-echarts {
> .el-row {
.el-col {
}
}
// > .el-row {
// .el-col {
// }
// }
.chart-box {
min-height: 400px;
}