Pārlūkot izejas kodu

Merge branch 'main' of http://124.70.43.205:3000/GYEE_R.D/PowerAnalysis

# Conflicts:
#	src/pages/dataAnalysis/spaceAnalysis/index.vue
chenminghua 1 gadu atpakaļ
vecāks
revīzija
352bea43d5

+ 4 - 1
README.md

@@ -1 +1,4 @@
-# alarm-config GYEE ZM
+# node环境要求 18+
+# 启动 npm run dev
+# 打包 npm run build
+# api地址配置位于 src/api/config.js

+ 0 - 100
default

@@ -1,100 +0,0 @@
-##
-# You should look at the following URL's in order to grasp a solid understanding
-# of Nginx configuration files in order to fully unleash the power of Nginx.
-# https://www.nginx.com/resources/wiki/start/
-# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
-# https://wiki.debian.org/Nginx/DirectoryStructure
-#
-# In most cases, administrators will remove this file from sites-enabled/ and
-# leave it as reference inside of sites-available where it will continue to be
-# updated by the nginx packaging team.
-#
-# This file will automatically load configuration files provided by other
-# applications, such as Drupal or Wordpress. These applications will be made
-# available underneath a path with that package name, such as /drupal8.
-#
-# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
-##
-
-# Default server configuration
-#
-server {
-	listen 8078 default_server;
-	listen [::]:8078 default_server;
-
-	# SSL configuration
-	#
-	# listen 443 ssl default_server;
-	# listen [::]:443 ssl default_server;
-	#
-	# Note: You should disable gzip for SSL traffic.
-	# See: https://bugs.debian.org/773332
-	#
-	# Read up on ssl_ciphers to ensure a secure configuration.
-	# See: https://bugs.debian.org/765782
-	#
-	# Self signed certs generated by the ssl-cert package
-	# Don't use them in a production server!
-	#
-	# include snippets/snakeoil.conf;
-
-	root /root/dist;
-
-	# Add index.php to the list if you are using PHP
-	index index.html index.htm index.nginx-debian.html;
-
-	server_name _;
-
-	location / {
-		# First attempt to serve request as file, then
-		# as directory, then fall back to displaying a 404.
-		try_files $uri $uri/ =404;
-	}
-	location /sharding {
-		proxy_pass http://123.60.219.66:8075/;
-	}
-	
-	# 代理文档服务
-	location /adapter {
-		proxy_pass http://123.60.219.66:8011/;
-	}
-
-	# pass PHP scripts to FastCGI server
-	#
-	#location ~ \.php$ {
-	#	include snippets/fastcgi-php.conf;
-	#
-	#	# With php-fpm (or other unix sockets):
-	#	fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
-	#	# With php-cgi (or other tcp sockets):
-	#	fastcgi_pass 127.0.0.1:9000;
-	#}
-
-	# deny access to .htaccess files, if Apache's document root
-	# concurs with nginx's one
-	#
-	#location ~ /\.ht {
-	#	deny all;
-	#}
-}
-
-
-# Virtual Host configuration for example.com
-#
-# You can move that to a different file under sites-available/ and symlink that
-# to sites-enabled/ to enable it.
-#
-#server {
-#	listen 80;
-#	listen [::]:80;
-#
-#	server_name example.com;
-#
-#	root /var/www/example.com;
-#	index index.html;
-#
-#	location / {
-#		try_files $uri $uri/ =404; 
-#	}
-#}
-# index.nginx-debian.html

+ 9 - 9
src/pages/dataAnalysis/angleAnalysis/components/current-scatter-chart.vue

@@ -122,13 +122,13 @@ export default {
         //     : "rgba(255,255,255,0.5)",
         //工具箱
         color: [
-            "#0098d9",
+            "#cda819",
             "rgb(255,0,0)",
-            "#0a4468",
+            "#0098d9",
             "#a9e3f199",
             "#a9e3f199",
             "#005eaa",
-            "#cda819",
+            "#0a4468",
             "#32a487"
         ],
         toolbox: {
@@ -184,17 +184,17 @@ export default {
         dataZoom: [
           {
             type: "inside", //图表下方的伸缩条
-            show: false, //是否显示
+            show: true, //是否显示
             realtime: true, //拖动时,是否实时更新系列的视图
             start: 0, //伸缩条开始位置(1-100),可以随时更改
-            end: 100, //伸缩条结束位置(1-100),可以随时更改
+            end: 5, //伸缩条结束位置(1-100),可以随时更改
           },
           {
             type: "slider", //图表下方的伸缩条
-            show: false, //是否显示
+            show: true, //是否显示
             realtime: true, //拖动时,是否实时更新系列的视图
             start: 0, //伸缩条开始位置(1-100),可以随时更改
-            end: 100, //伸缩条结束位置(1-100),可以随时更改
+            end: 5, //伸缩条结束位置(1-100),可以随时更改
           },
         ],
         textStyle: {
@@ -227,7 +227,7 @@ export default {
           top: 58,
           left: 40,
           right: 48,
-          bottom: 24,
+          // bottom: 24,
         },
         //x轴
         xAxis: [
@@ -259,7 +259,7 @@ export default {
           splitLine: { show: false },
           position: 'left',
           min: 0,
-          name: 'MW',
+          name: '',
           nameTextStyle: {
             color: '#838383'
           },

+ 3 - 3
src/pages/dataAnalysis/angleAnalysis/index.vue

@@ -112,7 +112,7 @@ const funSubmit = async (params) => {
 	xAxisData.value = tsArr
 	seriesData.value = [
 		{
-			name: "有功设定限值",
+			name: "叶片一",
 			type: "line",
 			symbol: "line", //设定为实心点
 			symbolSize: 0, //设定实心点的大小
@@ -121,7 +121,7 @@ const funSubmit = async (params) => {
 			xAxisIndex: 0,
 		},
 		{
-			name: "实发有功",
+			name: "叶片二",
 			type: "line",
 			symbol: "line", //设定为实心点
 			symbolSize: 0, //设定实心点的大小
@@ -130,7 +130,7 @@ const funSubmit = async (params) => {
 			xAxisIndex: 0,
 		},
 		{
-			name: "理论功率",
+			name: "叶片三",
 			type: "line",
 			symbol: "line", //设定为实心点
 			symbolSize: 0, //设定实心点的大小

+ 2 - 2
src/pages/dataAnalysis/spaceAnalysis/components/barChart.vue

@@ -66,8 +66,8 @@ const option = computed({
 			title: {
 				text: props.title || '',
 				subtext: props.subtext || '',
-				top: 6,
-				left: '5%',
+				top: -6,
+				right: 360,
 			},
 			xAxis: props.xAxis || {},
 			yAxis: props.yAxis || {},

+ 51 - 33
src/pages/dataAnalysis/spaceAnalysis/index.vue

@@ -113,6 +113,9 @@ const funCurrentChange = ({ current, currentNode }) => {
 /**chart */
 let chartId = 1
 const powerproductionNum = ref(0)
+const avgSpeed = ref('')
+const avgMrxs = ref('')
+const windName = ref('')
 /**submit */
 const funSubmit = async () => {
 	if (!excelCheckIds.value.length) {
@@ -126,27 +129,31 @@ const funSubmit = async () => {
 		}
 	})
 	if (tempRes.code === 200) {
-		if (tempRes.data?.length) {
-			const xAxisData = [], barData1 = [], barData2 = [], lineData1 = [], lineData2 = []
-			for (const chart of tempRes.data) {
-				xAxisData.push(chart.wtId)
-				if (chart.currentData){
-					barData1.push(chart.currentData.avgspeed)
-					lineData1.push((chart.currentData.mrxs*100).toFixed(2))
-				}
-				if (chart.preData){
-					barData2.push(chart.preData.avgspeed)
-					lineData2.push((chart.preData.mrxs*100).toFixed(2))
-				}
-				barxAxis.data = xAxisData
-				linexAxis.data = xAxisData
-				barSeries[0].data = barData1
-				barSeries[1].data = barData2
-				chartId++
-				lineSeries[0].data = lineData1
-				lineSeries[1].data = lineData2
-				chartId++
+		const xAxisData = [], barData1 = [], barData2 = [], lineData1 = [], lineData2 = []
+		let avgSpeedSum = 0, avgMrxsSum = 0
+		for (const chart of tempRes.data) {
+			xAxisData.push(chart.wtId)
+			if (chart.currentData) {
+				barData1.push(chart.currentData.avgspeed)
+				lineData1.push((chart.currentData.mrxs*100).toFixed(2))
+				avgSpeedSum += chart.currentData.avgspeed
+				avgMrxsSum += chart.currentData.mrxs
+			}
+			if (chart.preData){
+				barData2.push(chart.preData.avgspeed)
+				lineData2.push((chart.preData.mrxs*100).toFixed(2))
 			}
+			avgSpeed.value = (avgSpeedSum / barData1.length).toFixed(2)+' m/s'
+			avgMrxs.value = (avgMrxsSum / lineData1.length * 100).toFixed(2)+' %'
+			windName.value = chart.wtId
+			barxAxis.data = xAxisData
+			linexAxis.data = xAxisData
+			barSeries[0].data = barData1
+			barSeries[1].data = barData2
+			chartId++
+			lineSeries[0].data = lineData1
+			lineSeries[1].data = lineData2
+			chartId++
 		}
 	}
 }
@@ -179,7 +186,7 @@ const lineyAxis = reactive({
 	}
 })
 const lineSeries = reactive([{
-	name: "每月NCF(最新)",
+	name: "最新",
 	type: "line",
 	data: [],
 	symbol: "line", //设定为实心点
@@ -187,7 +194,7 @@ const lineSeries = reactive([{
 	markLine: {
 		symbol: 'none',
 		label: {
-			show: false,
+			show: true,
 		},
 		lineStyle: {
 			color: '#F72C5B'
@@ -195,7 +202,7 @@ const lineSeries = reactive([{
 		data: []
 	}
 },{
-	name: "每月NCF(历史)",
+	name: "历史",
 	type: "line",
 	data: [],
 	symbol: "line", //设定为实心点
@@ -304,7 +311,7 @@ const barSeries = reactive([{
 	markLine: {
 		symbol: 'none',
 		label: {
-			show: false,
+			show: true,
 		},
 		lineStyle: {
 			color: '#F72C5B'
@@ -376,7 +383,7 @@ const funActCop = (obj, type) => {
 		case 'barChartCop':
 			actChartName.value = 'barChartCop'
 			obj.actCop = shallowRef(barChartCop)
-			actDiaTitle.value = '月平均风速'
+			actDiaTitle.value = '风速'
 			break
 		case 'lineChartCop':
 			actChartName.value = 'lineChartCop'
@@ -430,22 +437,28 @@ const funDiaSubmit = async () => {
 						return new Date(a.time).getTime() - new Date(b.time).getTime()
 					})
 					const xAxisData = [], barData1 = [], barData2 = [], lineData1 = [], lineData2 = []
+					let avgSpeedSum = 0, avgMrxsSum = 0
+					let avgSpeedDesc = '', avgMrxsDesc = ''
 					for(const current of chart.currentData){
 						xAxisData.push(current.time)
 						barData1.push(current.avgspeed)
-						lineData1.push(current.mrxs)
+						avgSpeedSum += current.avgspeed
+						avgMrxsSum += current.mrxs
+						lineData1.push((current.mrxs*100).toFixed(2))
 					}
 					for(const current of chart.preData){
 						barData2.push(current.avgspeed)
-						lineData2.push(current.mrxs)
+						lineData2.push((current.mrxs*100).toFixed(2))
 					}
+					avgSpeedDesc = (avgSpeedSum / barData1.length).toFixed(2)+' m/s'
+					avgMrxsDesc = (avgMrxsSum / lineData1.length * 100).toFixed(2)+' %'
 					if(actChartName.value==='barChartCop'){
 						actCopList.value.push({
 							id: chartId,
 							isBrush: false,
 							actCop: shallowRef(barChartCop),
-							title: chart.windturbine,
-							subtext: `月平均风速`,
+							// title: chart.windturbine,
+							subtext: `${chart.wtId} 平均风速 ${avgSpeedDesc}`,
 							xAxis: {
 								...barxAxis,
 								data: xAxisData
@@ -466,8 +479,8 @@ const funDiaSubmit = async () => {
 							id: chartId,
 							isBrush: false,
 							actCop: shallowRef(barChartCop),
-							title: chart.windturbine,
-							subtext: `毛容量系数`,
+							// title: chart.windturbine,
+							subtext: `${chart.wtId} 平均毛容量系数 ${avgMrxsDesc}`,
 							xAxis: {
 								...linexAxis,
 								data: xAxisData
@@ -568,14 +581,19 @@ onActivated(() => {
 								@click="funActCop({xAxis:barxAxis, yAxis:baryAxis, series: barSeries}, 'barChartCop')">
 								<ZoomIn />
 							</el-icon> -->
-							<bar-chart-cop width="100%" height="100%" :subtext="`月平均风速`" :xAxis="barxAxis" :yAxis="baryAxis" :series="barSeries"></bar-chart-cop>
+							<!-- <bar-chart-cop width="100%" height="100%" :subtext="`月平均风速`" :xAxis="barxAxis" :yAxis="baryAxis" :series="barSeries"></bar-chart-cop> -->
+							<!-- </el-icon> -->
+							<bar-chart-cop width="100%" height="100%" :subtext="`平均风速 ${avgSpeed}`" :xAxis="barxAxis" :yAxis="baryAxis" :series="barSeries"></bar-chart-cop>
 						</div>
 						<div class="w-[100%] h-[49%] flex flex-col items-end shadow rounded-[6px] shadow-blue-500">
 							<!-- <el-icon class="mr-[10px] mt-[10px] cursor-pointer" size="18"
 								@click="funActCop({xAxis:linexAxis, yAxis:lineyAxis, series: lineSeries}, 'lineChartCop')">
 								<ZoomIn />
+
 							</el-icon> -->
-							<bar-chart-cop width="100%" height="100%" :subtext="`毛容量系数`" :xAxis="linexAxis" :yAxis="lineyAxis" :series="lineSeries"></bar-chart-cop>
+							<!-- <bar-chart-cop width="100%" height="100%" :subtext="`毛容量系数`" :xAxis="linexAxis" :yAxis="lineyAxis" :series="lineSeries"></bar-chart-cop> -->
+							<!-- </el-icon> -->
+							<bar-chart-cop width="100%" height="100%" :subtext="`平均毛容量系数 ${avgMrxs}`" :xAxis="linexAxis" :yAxis="lineyAxis" :series="lineSeries"></bar-chart-cop>
 						</div>
 					</div>
 				</el-col>