0570389e by yangwei

监控统计细节处理

1 parent c1737b81
...@@ -107,7 +107,7 @@ export default { ...@@ -107,7 +107,7 @@ export default {
107 groupId: item.recType, 107 groupId: item.recType,
108 }); 108 });
109 }); 109 });
110 this.$nextTick(() => { 110 res.length && this.$nextTick(() => {
111 // 初始化图表 111 // 初始化图表
112 this.echartInit(); 112 this.echartInit();
113 this.barChartInit(res[0].recType); 113 this.barChartInit(res[0].recType);
...@@ -209,15 +209,6 @@ export default { ...@@ -209,15 +209,6 @@ export default {
209 }); 209 });
210 //补全无数据行政区后的结果数组 210 //补全无数据行政区后的结果数组
211 let dealArr = [...this.dicData["A20"]]; 211 let dealArr = [...this.dicData["A20"]];
212 // //行政区代码过滤
213 // res.length > 0 &&
214 // res.forEach((item) => {
215 // xzqArr.push(
216 // this.dicData["A20"].filter((i) => {
217 // return i.DCODE == item.qxdm;
218 // })[0].DNAME
219 // );
220 // });
221 let myChartBar = this.$echarts.init( 212 let myChartBar = this.$echarts.init(
222 document.getElementById("myChart-bar") 213 document.getElementById("myChart-bar")
223 ); 214 );
......
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
124 }); 124 });
125 this.$nextTick(() => { 125 this.$nextTick(() => {
126 // 初始化图表 126 // 初始化图表
127 this.echartInit(); 127 this.chartData.length && this.echartInit();
128 }); 128 });
129 }, 129 },
130 // 重置 130 // 重置
...@@ -144,6 +144,7 @@ export default { ...@@ -144,6 +144,7 @@ export default {
144 color: ["#fff", "#ff6e6e", "#3f99ff", "#ffaf48"], 144 color: ["#fff", "#ff6e6e", "#3f99ff", "#ffaf48"],
145 tooltip: { 145 tooltip: {
146 trigger: "axis", 146 trigger: "axis",
147 formatter: '{b}<br/>{a0}:{c0}个<br/>{a1}:{c1}个<br/>{a2}:{c2}%',
147 axisPointer: { 148 axisPointer: {
148 type: "cross", 149 type: "cross",
149 crossStyle: { 150 crossStyle: {
...@@ -153,6 +154,7 @@ export default { ...@@ -153,6 +154,7 @@ export default {
153 }, 154 },
154 legend: { 155 legend: {
155 data: ["成功", "失败", "成功率"], 156 data: ["成功", "失败", "成功率"],
157 top: '16',
156 textStyle: { 158 textStyle: {
157 show: true, 159 show: true,
158 color: "#fff", 160 color: "#fff",
...@@ -217,12 +219,12 @@ export default { ...@@ -217,12 +219,12 @@ export default {
217 }, 219 },
218 { 220 {
219 type: "value", 221 type: "value",
220 name: "成功率/%", 222 name: "成功率",
221 nameTextStyle: { 223 nameTextStyle: {
222 color: "#fff", 224 color: "#fff",
223 fontSize: "16", 225 fontSize: "16",
224 }, 226 },
225 splitNumber:4, 227 splitNumber:2,
226 axisLabel: { 228 axisLabel: {
227 formatter: "{value} %", 229 formatter: "{value} %",
228 textStyle: { 230 textStyle: {
...@@ -238,11 +240,6 @@ export default { ...@@ -238,11 +240,6 @@ export default {
238 name: "成功", 240 name: "成功",
239 type: "bar", 241 type: "bar",
240 barMaxWidth: '60', 242 barMaxWidth: '60',
241 tooltip: {
242 valueFormatter: function (value) {
243 return value + " ml";
244 },
245 },
246 data: this.chartData.map((item) => { 243 data: this.chartData.map((item) => {
247 return item.success; 244 return item.success;
248 }), 245 }),
...@@ -251,11 +248,6 @@ export default { ...@@ -251,11 +248,6 @@ export default {
251 name: "失败", 248 name: "失败",
252 type: "bar", 249 type: "bar",
253 barMaxWidth: '60', 250 barMaxWidth: '60',
254 tooltip: {
255 valueFormatter: function (value) {
256 return value + " ml";
257 },
258 },
259 data: this.chartData.map((item) => { 251 data: this.chartData.map((item) => {
260 return item.failure; 252 return item.failure;
261 }), 253 }),
...@@ -265,11 +257,6 @@ export default { ...@@ -265,11 +257,6 @@ export default {
265 type: "line", 257 type: "line",
266 barMaxWidth: '60', 258 barMaxWidth: '60',
267 yAxisIndex: 1, 259 yAxisIndex: 1,
268 tooltip: {
269 valueFormatter: function (value) {
270 return value + "%";
271 },
272 },
273 data: this.chartData.map((item) => { 260 data: this.chartData.map((item) => {
274 return item.rate; 261 return item.rate;
275 }), 262 }),
......
...@@ -120,7 +120,7 @@ export default { ...@@ -120,7 +120,7 @@ export default {
120 this.chartData = res; 120 this.chartData = res;
121 this.$nextTick(() => { 121 this.$nextTick(() => {
122 // 初始化图表 122 // 初始化图表
123 this.echartInit(this.chartData) 123 this.chartData.length && this.echartInit(this.chartData)
124 }); 124 });
125 }, 125 },
126 // 重置 126 // 重置
......