0570389e by yangwei

监控统计细节处理

1 parent c1737b81
......@@ -107,7 +107,7 @@ export default {
groupId: item.recType,
});
});
this.$nextTick(() => {
res.length && this.$nextTick(() => {
// 初始化图表
this.echartInit();
this.barChartInit(res[0].recType);
......@@ -209,15 +209,6 @@ export default {
});
//补全无数据行政区后的结果数组
let dealArr = [...this.dicData["A20"]];
// //行政区代码过滤
// res.length > 0 &&
// res.forEach((item) => {
// xzqArr.push(
// this.dicData["A20"].filter((i) => {
// return i.DCODE == item.qxdm;
// })[0].DNAME
// );
// });
let myChartBar = this.$echarts.init(
document.getElementById("myChart-bar")
);
......
......@@ -124,7 +124,7 @@ export default {
});
this.$nextTick(() => {
// 初始化图表
this.echartInit();
this.chartData.length && this.echartInit();
});
},
// 重置
......@@ -144,6 +144,7 @@ export default {
color: ["#fff", "#ff6e6e", "#3f99ff", "#ffaf48"],
tooltip: {
trigger: "axis",
formatter: '{b}<br/>{a0}:{c0}个<br/>{a1}:{c1}个<br/>{a2}:{c2}%',
axisPointer: {
type: "cross",
crossStyle: {
......@@ -153,6 +154,7 @@ export default {
},
legend: {
data: ["成功", "失败", "成功率"],
top: '16',
textStyle: {
show: true,
color: "#fff",
......@@ -217,12 +219,12 @@ export default {
},
{
type: "value",
name: "成功率/%",
name: "成功率",
nameTextStyle: {
color: "#fff",
fontSize: "16",
},
splitNumber:4,
splitNumber:2,
axisLabel: {
formatter: "{value} %",
textStyle: {
......@@ -238,11 +240,6 @@ export default {
name: "成功",
type: "bar",
barMaxWidth: '60',
tooltip: {
valueFormatter: function (value) {
return value + " ml";
},
},
data: this.chartData.map((item) => {
return item.success;
}),
......@@ -251,11 +248,6 @@ export default {
name: "失败",
type: "bar",
barMaxWidth: '60',
tooltip: {
valueFormatter: function (value) {
return value + " ml";
},
},
data: this.chartData.map((item) => {
return item.failure;
}),
......@@ -265,11 +257,6 @@ export default {
type: "line",
barMaxWidth: '60',
yAxisIndex: 1,
tooltip: {
valueFormatter: function (value) {
return value + "%";
},
},
data: this.chartData.map((item) => {
return item.rate;
}),
......
......@@ -120,7 +120,7 @@ export default {
this.chartData = res;
this.$nextTick(() => {
// 初始化图表
this.echartInit(this.chartData)
this.chartData.length && this.echartInit(this.chartData)
});
},
// 重置
......