Browse Source

2023-02-23 update

1. 对风偏差分析页  增加右下角图  平均偏航数据  调整tooltip的format效果
2. 对风偏差分析页  注释左下角图  圈选功能
moccus 2 years ago
parent
commit
e03b263f3d

+ 12 - 9
src/pages/dataAnalysis/rateAnalysis/components/scatterSingleChart.vue

@@ -50,15 +50,18 @@ const option = computed({
 		return {
 			tooltip: {
 				position: 'top',
-				// formatter: function (params) {
-				// 	return (
-				// 		params.value[2] +
-				// 		' commits in ' +
-				// 		params.value[0] +
-				// 		' of ' +
-				// 		params.value[1]
-				// 	);
-				// }
+				formatter: function (params) {
+					if(params.componentType === 'markLine'){
+						return `平均偏航:${params.value[0]}度`
+					}else{
+						return (
+							'偏航:'+ params.value[0] +
+							'度<br/ >风速:' +
+							params.value[1] +
+							'm/s'
+						);
+					}
+				}
 			},
 			title: {
 				text: props.title || '',

+ 37 - 3
src/pages/dataAnalysis/rateAnalysis/index.vue

@@ -227,9 +227,13 @@ const funSubmit = async () => {
 							}]: []
 				})
 				chartId++
-				scatterSeries.value[0].data = chart.frequency?.length? chart.frequency.map((item) => {
+				scatterSeries.value[0].data = chart.frequency.data?.length? chart.frequency.data.map((item) => {
 						return [item[1]+'', item[0]+'', (item[2]*10).toFixed(1)];
 				}) : []
+				scatterSeries.value[0].markLine.data = [{
+					xAxis: `${chart.frequency.avg}`,
+					name: `平均偏航:${chart.frequency.avg}度`,
+				}]
 			}
 		}
 	}
@@ -358,6 +362,7 @@ const funChartSelect = async (batch) => {
 const scatterxData = ref([
 	{
 		type: 'category',
+		name: '度',
 		data:  new Array(61).fill(-30).map((o,index) => Number((o + index))),
 		boundaryGap: false,
 		splitLine: {
@@ -390,6 +395,20 @@ const scatterSeries = ref(
 						return val[2];
 					},
 					data: [],
+					markLine: {
+							symbol: 'none',
+							label: {
+								show: false,
+							},
+							lineStyle: {
+								color: '#F72C5B'
+							},
+							data: [
+								{
+								// yAxis: powerproductionNum.value,
+								}
+							]
+					},
 					animationDelay: function (idx) {
 						return idx * 5;
 					}
@@ -455,7 +474,7 @@ const funActCop = (obj, type) => {
 			actDiaTitle.value = '静态偏航对风分析图'
 			break
 	}
-	obj.isBrush = type === 'lineChartCop' ? true :false
+	obj.isBrush = type === 'lineChartCop' ? false :false
 	obj.id = chartId
 	chartId ++
 	dialog.value = true
@@ -628,7 +647,22 @@ const funDiaSubmit = async () => {
 									symbolSize: function (val) {
 										return val[2];
 									},
-									data: chart.frequency?.length? chart.frequency.map((item) => {
+									markLine: {
+											symbol: 'none',
+											label: {
+												show: false,
+											},
+											lineStyle: {
+												color: '#F72C5B'
+											},
+											data: [
+												{
+													name: `平均偏航:${chart.frequency.avg}度`,
+													xAxis: `${chart.frequency.avg}`,
+												}
+											]
+									},
+									data: chart.frequency.data?.length? chart.frequency.data.map((item) => {
 											return [item[1]+'', item[0]+'', (item[2]*10).toFixed(1)];
 									}) : [],
 									animationDelay: function (idx) {