| 
						
						
						
					 | 
					@ -1,5 +1,5 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					<template> | 
					 | 
					 | 
					<template> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					  <div class='congestion'> | 
					 | 
					 | 
					  <div class="congestion"> | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    <WgtTitle :title="'事件源分析'"></WgtTitle> | 
					 | 
					 | 
					    <WgtTitle :title="'事件源分析'"></WgtTitle> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    <div class="board"> | 
					 | 
					 | 
					    <div class="board"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      <div class="charts keep-ratio" id="channelAnalytics"></div> | 
					 | 
					 | 
					      <div class="charts keep-ratio" id="channelAnalytics"></div> | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -11,46 +11,42 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import WgtTitle from "@screen/pages/perception/widgets/title"; | 
					 | 
					 | 
					import WgtTitle from "@screen/pages/perception/widgets/title"; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import * as echarts from "echarts"; | 
					 | 
					 | 
					import * as echarts from "echarts"; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import chartsStatistics from "./assets/charts"; | 
					 | 
					 | 
					import chartsStatistics from "./assets/charts"; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					import { eventSourceRatio } from "@/api/event/governanceAnalysis" | 
					 | 
					 | 
					import { eventSourceRatio } from "@/api/event/governanceAnalysis"; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					export default { | 
					 | 
					 | 
					export default { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					  name: 'RailWayDay', | 
					 | 
					 | 
					  name: "RailWayDay", | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					  components: { | 
					 | 
					 | 
					  components: { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    WgtTitle | 
					 | 
					 | 
					    WgtTitle, | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					  }, | 
					 | 
					 | 
					  }, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  data() { | 
					 | 
					 | 
					  data() { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    return { | 
					 | 
					 | 
					    return {}; | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					  }, | 
					 | 
					 | 
					  }, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					  created() { | 
					 | 
					 | 
					  created() {}, | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  }, | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					  methods: { | 
					 | 
					 | 
					  methods: { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    getEventSourceRatio() { | 
					 | 
					 | 
					    getEventSourceRatio() { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      return eventSourceRatio().then((response) => { | 
					 | 
					 | 
					      return eventSourceRatio().then((response) => { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        console.log("response", response) | 
					 | 
					 | 
					        console.log("response", response); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        let data = [] | 
					 | 
					 | 
					        let data = []; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        let total = null | 
					 | 
					 | 
					        let total = null; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        let nameData = [] | 
					 | 
					 | 
					        let nameData = []; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        const newObj = { value: 1, name: "" }; | 
					 | 
					 | 
					        const newObj = { value: 1, name: "" }; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        for (let i = 0; i < response.data.length; i++) { | 
					 | 
					 | 
					        for (let i = 0; i < response.data.length; i++) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          data.push({ | 
					 | 
					 | 
					          data.push({ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            value: response.data[i].num, | 
					 | 
					 | 
					            value: response.data[i].num, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            name: response.data[i].eventSourceName | 
					 | 
					 | 
					            name: response.data[i].eventSourceName, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					          }) | 
					 | 
					 | 
					          }); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					          total += response.data[i].num; | 
					 | 
					 | 
					          total += response.data[i].num; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        console.log("total", total) | 
					 | 
					 | 
					        console.log("total", total); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        for (let i = 0; i < data.length; i++) { | 
					 | 
					 | 
					        for (let i = 0; i < data.length; i++) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          //   if (i % 2 === 0) { | 
					 | 
					 | 
					          //   if (i % 2 === 0) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          //     data.splice(i + 1, 0, newObj) | 
					 | 
					 | 
					          //     data.splice(i + 1, 0, newObj) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          //   } | 
					 | 
					 | 
					          //   } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          if (data[i].name != "") { | 
					 | 
					 | 
					          if (data[i].name != "") { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            nameData.push(data[i].name) | 
					 | 
					 | 
					            nameData.push(data[i].name); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					          } | 
					 | 
					 | 
					          } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        console.log(6666, data, nameData) | 
					 | 
					 | 
					        console.log(6666, data, nameData); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        chartsStatistics.legend.formatter = function (name) { | 
					 | 
					 | 
					        chartsStatistics.legend.formatter = function (name) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          let tarValue = 0; | 
					 | 
					 | 
					          let tarValue = 0; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          for (let i = 0; i < response.data.length; i++) { | 
					 | 
					 | 
					          for (let i = 0; i < response.data.length; i++) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -59,30 +55,30 @@ export default { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          } | 
					 | 
					 | 
					          } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          var percert = total == 0 ? 0 : ((tarValue / total) * 100).toFixed(2); | 
					 | 
					 | 
					          var percert = total == 0 ? 0 : ((tarValue / total) * 100).toFixed(2); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					          return `{text|${name}} {number|${percert}%}`; | 
					 | 
					 | 
					          return `{text|${name}} {number|${tarValue} 起  } {number|${percert}%}`; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        }; | 
					 | 
					 | 
					        }; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        chartsStatistics.legend.data = nameData; | 
					 | 
					 | 
					        chartsStatistics.legend.data = nameData; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        chartsStatistics.title[0].text = total; | 
					 | 
					 | 
					        chartsStatistics.title[0].text = total; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // chartsStatistics.tooltip.show = false; | 
					 | 
					 | 
					        // chartsStatistics.tooltip.show = false; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // chartsStatistics.series[1].data[0].value = total; | 
					 | 
					 | 
					        // chartsStatistics.series[1].data[0].value = total; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        chartsStatistics.series[2].data = data; | 
					 | 
					 | 
					        chartsStatistics.series[2].data = data; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					      }) | 
					 | 
					 | 
					      }); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					    } | 
					 | 
					 | 
					    }, | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					  }, | 
					 | 
					 | 
					  }, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  async mounted() { | 
					 | 
					 | 
					  async mounted() { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    await this.getEventSourceRatio() | 
					 | 
					 | 
					    await this.getEventSourceRatio(); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    setTimeout(() => { | 
					 | 
					 | 
					    setTimeout(() => { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      this.$nextTick(() => { | 
					 | 
					 | 
					      this.$nextTick(() => { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        var myChart = echarts.init(document.getElementById('channelAnalytics')); | 
					 | 
					 | 
					        var myChart = echarts.init(document.getElementById("channelAnalytics")); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        myChart.setOption(chartsStatistics); | 
					 | 
					 | 
					        myChart.setOption(chartsStatistics); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      }); | 
					 | 
					 | 
					      }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    }); | 
					 | 
					 | 
					    }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  }, | 
					 | 
					 | 
					  }, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					} | 
					 | 
					 | 
					}; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					</script> | 
					 | 
					 | 
					</script> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					<style lang='scss' scoped> | 
					 | 
					 | 
					<style lang="scss" scoped> | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					.congestion { | 
					 | 
					 | 
					.congestion { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  width: 100%; | 
					 | 
					 | 
					  width: 100%; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -94,11 +90,15 @@ export default { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    border-radius: 5px 5px 5px 5px; | 
					 | 
					 | 
					    border-radius: 5px 5px 5px 5px; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    opacity: 1; | 
					 | 
					 | 
					    opacity: 1; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    border: 1px solid; | 
					 | 
					 | 
					    border: 1px solid; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    border-image: linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0)) 1 1; | 
					 | 
					 | 
					    border-image: linear-gradient( | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        360deg, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        rgba(55, 231, 255, 0.3), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        rgba(55, 231, 255, 0) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      ) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      1 1; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    display: flex; | 
					 | 
					 | 
					    display: flex; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    justify-content: space-between; | 
					 | 
					 | 
					    justify-content: space-between; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    align-items: center; | 
					 | 
					 | 
					    align-items: center; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  } | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					} | 
					 | 
					 | 
					} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -107,4 +107,3 @@ export default { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  width: 100%; | 
					 | 
					 | 
					  width: 100%; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					} | 
					 | 
					 | 
					} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					</style> | 
					 | 
					 | 
					</style> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					   | 
					 | 
					 | 
					 |