Просмотр исходного кода

接口列表 接口调用频次滚动

wangzhe 2 лет назад
Родитель
Сommit
7e4311ebcd

+ 19 - 13
mybusiness/src/main/resources/static/visualization/js/echarts_div.js

@@ -55,8 +55,8 @@ function getProvinceFrequency(){
  */
 function imputationDataAndInterfaceRanking() {
 	$.post("/visualization/getImputationDataAndInterfaceRanking",function (res) {
-		jkgj(res.data);
-		jkgj2(res.interface);
+		jkgj(res.data);//归集数据排名
+		jkgj2(res.interface);//归集接口排名
 	});
 }
 
@@ -269,11 +269,10 @@ function jkgj(res) {
 	let xAxisDataReverse = data.map(item => item.name).reverse();
 	let seriesData = data.map(item => item.value)
 	let maxSeriesData = []
-	const MAX = Math.max(...seriesData)
-	for (let i = 0; i < seriesData.length; i++) {
-		// maxSeriesData.push(MAX)
-		maxSeriesData.push(seriesData[i]);
-	}
+	// const MAX = Math.max(...seriesData)
+	// for (let i = 0; i < seriesData.length; i++) {
+	// 	maxSeriesData.push(MAX)
+	// }
 	let barLinearColors = [
 		new echarts.graphic.LinearGradient(0, 1, 1, 1, [
 			{offset: 0, color: "#EB3B5A"},
@@ -306,6 +305,10 @@ function jkgj(res) {
 	}
 	var option = {
 		tooltip: {
+			trigger: 'axis',
+            axisPointer: {
+                type: 'none',
+            },
 			// backgroundColor: 'rgba(50,50,50,.3)',
 			textStyle: {
 				color: '#fff'
@@ -429,8 +432,7 @@ function jkgj(res) {
 						color: 'rgba(27, 17, 134, 0.0)'
 					}
 				},
-				// data: maxSeriesData
-                data: maxSeriesData
+				data: maxSeriesData
 			}
 		]
 	};
@@ -457,10 +459,10 @@ function jkgj2(res) {
     let xAxisDataReverse = data.map(item => item.name).reverse();
 	let seriesData = data.map(item => item.value)
 	let maxSeriesData = []
-	const MAX = Math.max(...seriesData)
-	for (let i = 0; i < seriesData.length; i++) {
-		maxSeriesData.push(MAX)
-	}
+	// const MAX = Math.max(...seriesData)
+	// for (let i = 0; i < seriesData.length; i++) {
+	// 	maxSeriesData.push(MAX)
+	// }
 	let barLinearColors = [
 		new echarts.graphic.LinearGradient(0, 1, 1, 1, [
 			{offset: 0, color: "#EB3B5A"},
@@ -495,6 +497,10 @@ function jkgj2(res) {
 
 	var option = {
 		tooltip: {
+            trigger: 'axis',
+			axisPointer: {
+            	type: 'none',
+			},
 			// backgroundColor: 'rgba(50,50,50,.3)',
 			textStyle: {
 				color: '#fff'

+ 2 - 5
mybusiness/src/main/resources/templates/visualization/tk_iframe.html

@@ -779,9 +779,7 @@
 </script>
 <script>
     (function ($) {
-        // alert(789)
         $.fn.FontScroll = function (options) {
-        alert(888)
             var d = {time: 3000, s: 'fontColor', num: 1}
             var o = $.extend(d, options);
             this.children('ul').addClass('line');
@@ -803,7 +801,6 @@
             }, function () {
                 timeID = setInterval(Up, _time);
             });
-            alert(_conChildH)
             function Up() {
                 _con.animate({marginTop: '-' + _conChildH});
                 //样式控制
@@ -827,8 +824,8 @@
             }
         }
         var li_num = $('.jk_list li').length;
-        if( li_num >= 6){
-            setInterval('AutoScroll("#FontScroll")',3000);
+        if(li_num > 6){
+            setInterval('AutoScroll("#FontScroll")', 3000);
         }else{
             return
         }