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

2022-12-02 update

1. combine 无用点颜色换成灰色  √
2. cpz 和 拟合功率 线条颜色对换  √
3. combine title 增加截取的ng01-01名称  √
4. rateAnalysis  第一个图表  风速风向玫瑰图  第二个叫 风速风向频次玫瑰图  第三个 对风偏差分析图  第四个 静态偏航对风分析图   √
5. rateAnalysis  第三个偏差率 改为 对风频次  第二个图 对风风向 改为 对风频次+数据    轴的颜色与combine的轴颜色一致(包括title颜色)  √
6. rateAnalysis dialog title 与 图表一致 √  dialog 宽度放大 可使用百分比 √   多台显示的栏与上方header距离缩小 //   单台显示的时候  占满..  多台的时候是 50%   √
8. lineAnalysis 不要操作面板,  tree check时, 调用图表展示数据.   excel check点击时, 也触发图表展示  √
9. 风资源分析 改为 对风偏差分析  √
11. dialog 设置为可拖动的  √  但由于element-plus版本过低 该属性暂未支持, 后续升级element-plus版本后可支持该属性
moccus 3 лет назад
Родитель
Сommit
20364c9f5c

+ 3 - 3
src/pages/dataAnalysis/combine/components/current-scatter-chart.vue

@@ -102,11 +102,11 @@ export default {
         //     : "rgba(255,255,255,0.5)",
         //工具箱
         color: [
-            "#FF8700",
+            "#3D54BE",
             "rgb(255,0,0)",
-            "#e6b600d9",
+            "#d3d3d3",
             "#0098d9",
-            "#3D54BE",
+            "#FF8700",
             "#005eaa",
             "#cda819",
             "#32a487"

+ 4 - 2
src/pages/dataAnalysis/combine/index.vue

@@ -70,6 +70,7 @@ const funExcelChange = async (obj) => { //点击excel项时
 
 	if (chartResponse && chartResponse.code === 200) {
 		chartRes = chartResponse.data
+		avgObj.title = chartRes.obj.path.substring(chartRes.obj.path.indexOf(chartRes.obj.station + '_') + (chartRes.obj.station + '_').length).split('_')[0];
 		avgObj.cpavg = Number(chartRes.obj.cpavg).toFixed(2)
 		avgObj.frequency = Number(chartRes.obj.frequency).toFixed(2)
 		avgObj.pcratio = Number(chartRes.obj.pcratio).toFixed(2)
@@ -295,6 +296,7 @@ const funSubmit = async (query) => {
 }
 /**chart Data */
 const avgObj = reactive({ //平均cpz等
+	title: '',
 	cpavg: '',
 	frequency: '',
 	pcratio: ''
@@ -501,7 +503,7 @@ onActivated(() => {
 	<div class="bg-white py-[10px] px-[10px]">
 		<search-cop class="mb-[20px]  shadow rounded-[6px] shadow-blue-500" @submit="funSubmit">
 		</search-cop>
-		<el-dialog v-model="wtDialog" title="风机功率点位">
+		<el-dialog v-model="wtDialog" draggable title="风机功率点位">
 			<el-tabs v-model="wtTab">
 				<el-tab-pane label="数据" name="table">
 					<el-table :data="wtData" row-key="id" :max-height="550">
@@ -549,7 +551,7 @@ onActivated(() => {
 							<div v-show="activeTab === '2'"
 								:style="{ height: typeof tableHeight === 'string' ? tableHeight : tableHeight + 'px' }"
 								class="p-[10px]">
-								<CurrentScatterChart ref="chartRef" width="100%" height="calc( 100% - 20px )" :chartTitle="'平均Cp值:'+avgObj.cpavg+'; 静风频率:'+avgObj.frequency+'%; 曲线偏差率:'+avgObj.pcratio+'%'"
+								<CurrentScatterChart ref="chartRef" width="100%" height="calc( 100% - 20px )" :chartTitle="avgObj.title+ '&nbsp;&nbsp;' +'平均Cp值:'+avgObj.cpavg+'; 静风频率:'+avgObj.frequency+'%; 曲线偏差率:'+avgObj.pcratio+'%'"
 									:xAxisData="xAxisData" :yAxisData="{ splitLine: { show: false } }" :seriesData="seriesData"
 									:showLegend="true" :brushSelected="!isChartArea" :dataSet="dataSet" @getSelected="funChartSelect" />
 							</div>

+ 13 - 131
src/pages/dataAnalysis/lineAnalysis/index.vue

@@ -1,5 +1,4 @@
 <script setup name="prepare">
-import searchCop from './components/search.vue'
 import excelCop from '@/components/excel.vue'
 import treeCop from '@/components/tree.vue'
 import SubmitBtn from '@/components/SubmitBtn.vue'
@@ -12,130 +11,19 @@ import CurrentScatterChart from './components/current-scatter-chart.vue'
 // import tableRes from '@/data/table.json'
 // import areaDataRes from '@/data/areaData.json'
 /**配置参数 */
-const treeHeight = ref(window.innerHeight - 200 + 'px') //tree高度
-const excelHeight = ref(window.innerHeight - 200 + 'px') //excel高度
-const tableHeight = ref(window.innerHeight - 200 + 'px')
+const treeHeight = ref(window.innerHeight - 120 + 'px') //tree高度
+const excelHeight = ref(window.innerHeight - 120 + 'px') //excel高度
+const tableHeight = ref(window.innerHeight - 120 + 'px')
 /**excel 开始 */
 const excelCheckboxShow = ref(false)
 const excelCheckIds = ref([])
 const excelList = ref([])
 const funExcelChange = async (obj) => { //点击excel项时
 	return false
-	isChartArea.value = false
-	let res = null
-	let chartRes = {
-		scatterhs: [[]],
-		scatterls: [[]],
-		sjgl: [[]],
-		llgl: [[]],
-		cpz: [[]]
-	}
-	let poiRes = null
-	let chartResponse = null
-	if (obj.type === 'fitting') {
-		activeTab.value = '2'
-		res = await request.get('/power/fitting/show', { params: { id: obj.id } })
-		// res = tableRes
-		// chartResponse = dotRes
-		chartResponse = await request.get('/power/fitting/curve', { params: { id: obj.id, p: 1 } })
-		poiRes = await request.get('/power/fitting/curve/ratio', {params: {id: obj.id}})
-		// poiRes = areaDataRes
-	}
-
-	// markDot 
-	if(poiRes && poiRes.code=== 200){
-		markDot.pcl5 = poiRes.data.pcl5
-		markDot.pcl10 = poiRes.data.pcl10
-		markDot.pcl12 = poiRes.data.pcl12
-		markDot.pcl25 = poiRes.data.pcl25
-	}
-
-	if (chartResponse && chartResponse.code === 200) {
-		chartRes = chartResponse.data
-		avgObj.cpavg = Number(chartRes.obj.cpavg).toFixed(2)
-		avgObj.frequency = Number(chartRes.obj.frequency).toFixed(2)
-		avgObj.pcratio = Number(chartRes.obj.pcratio).toFixed(2)
-		dataSet.value = JSON.stringify([
-			{
-				source: chartRes.wyd
-				// source: chartRes.scatterls
-			},
-			{
-				source: chartRes.yyd
-				// source: chartRes.scatterhs
-			}
-		])
-		const color = ["#1C99FF", "#FF8700", "#3D54BE", "#fa8c16", "#1DA0D7", "#DD5044"]
-		seriesData.value = [
-			{
-				name: "拟合功率",
-				type: "line",
-				symbol: "line", //设定为实心点
-				symbolSize: 0, //设定实心点的大小
-				smooth: true, //这个是把线变成曲线
-				data: chartRes.sjgl,
-				xAxisIndex: 0,
-			},
-			{
-				name: "保证功率",
-				type: "line",
-				symbol: "line", //设定为实心点
-				symbolSize: 0, //设定实心点的大小
-				smooth: true, //这个是把线变成曲线
-				data: chartRes.llgl,
-				xAxisIndex: 0,
-			},
-			{
-				type: 'effectScatter',
-				showEffectOn: "emphasis",
-				rippleEffect: {
-					scale: 1
-				},
-				name: '无用点',
-				symbolSize: (data) => {
-					return data.s ? data.s > 10 ? 10 : data.s : 4
-				},
-				datasetIndex: 0,
-				encode: {
-					x: 'x',
-					y: 'y'
-				},
-				xAxisIndex: 0,
-				yAxisIndex: 0,
-			},
-			{
-				type: 'effectScatter',
-				showEffectOn: "emphasis",
-				rippleEffect: {
-					scale: 1
-				},
-				name: '有用点',
-				symbolSize: (data) => {
-					return data.s ? data.s > 10 ? 10 : data.s : 4
-				},
-				datasetIndex: 1,
-				encode: {
-					x: 'x',
-					y: 'y'
-				},
-				xAxisIndex: 0,
-				yAxisIndex: 0,
-			},
-			{
-				name: "Cp值",
-				type: "line",
-				symbol: "line", //设定为实心点
-				symbolSize: 0, //设定实心点的大小
-				smooth: true, //这个是把线变成曲线
-				data: chartRes.cpz,
-				xAxisIndex: 0,
-				yAxisIndex: 1,
-			},
-		]
-	}
 }
 const funExcelCheckChange = ({ checkArr, data }) => {   //bug 
 	excelCheckIds.value = checkArr
+	funSubmit()
 }
 /**prepare tree 开始 */
 const treeData = ref([])
@@ -196,22 +84,21 @@ const funTreeCheckChange = ({ current, checkedNodes, checkedKeys, halfCheckedNod
 		}
 	}
 	excelCheckIds.value = checkIds
+	funSubmit()
 }
 
 /**search 开始 */
-const funSubmit = async (query) => {
+const funSubmit = async () => {
 	if (!excelCheckIds.value.length) {
 		ElMessage.error('请勾选要预处理的项')
 		return false
 	}
 	const params = {
-		...query,
 		ids: excelCheckIds.value.join(',')
 	}
 	const res = await request.get('/power/fitting/line', { params: params })
 	if (res.code === 200) {
 		seriesData.value = []
-		console.log(res)
 		if(res.data.bzgl){
 			seriesData.value.push(
 				{
@@ -423,13 +310,13 @@ const wtTab = ref('table')
 // funGetProcessTree()
 /**mounted */
 onMounted(() => {
-	tableHeight.value = window.innerHeight - 200 + 'px'
-	excelHeight.value = window.innerHeight - 200 + 'px'
-	treeHeight.value = window.innerHeight - 200 + 'px'
+	tableHeight.value = window.innerHeight - 120 + 'px'
+	excelHeight.value = window.innerHeight - 120 + 'px'
+	treeHeight.value = window.innerHeight - 120 + 'px'
 	window.addEventListener('resize', () => {
-		tableHeight.value = window.innerHeight - 200 + 'px'
-		excelHeight.value = window.innerHeight - 200 + 'px'
-		treeHeight.value = window.innerHeight - 200 + 'px'
+		tableHeight.value = window.innerHeight - 120 + 'px'
+		excelHeight.value = window.innerHeight - 120 + 'px'
+		treeHeight.value = window.innerHeight - 120 + 'px'
 	})
 	/**test */
 	// funExcelChange({
@@ -445,12 +332,7 @@ onActivated(() => {
 </script>
 <template>
   <div class="bg-white py-[10px] px-[10px]">
-    <search-cop
-      class="mb-[20px] shadow rounded-[6px] shadow-blue-500"
-      @submit="funSubmit"
-    >
-    </search-cop>
-    <el-dialog v-model="wtDialog" title="风机功率点位">
+    <el-dialog draggable v-model="wtDialog" title="风机功率点位">
       <el-tabs v-model="wtTab">
         <el-tab-pane label="数据" name="table">
           <el-table :data="wtData" row-key="id" :max-height="550">

+ 10 - 10
src/pages/dataAnalysis/rateAnalysis/chartTheme.json

@@ -12,10 +12,10 @@
 	"textStyle": {},
 	"title": {
 			"textStyle": {
-					"color": "#B3B3B3"
+					"color": "#b3b3b3"
 			},
 			"subtextStyle": {
-					"color": "#B3B3B3"
+					"color": "#b3b3b3"
 			}
 	},
 	"line": {
@@ -165,24 +165,24 @@
 			"axisLine": {
 					"show": true,
 					"lineStyle": {
-							"color": "#b3b3b386"
+							"color": "#b3b3b3"
 					}
 			},
 			"axisTick": {
 					"show": false,
 					"lineStyle": {
-							"color": "#b3b3b386"
+							"color": "#b3b3b3"
 					}
 			},
 			"axisLabel": {
 					"show": true,
-					"color": "#b3b3b386"
+					"color": "#b3b3b3"
 			},
 			"splitLine": {
 					"show": true,
 					"lineStyle": {
 							"color": [
-									"#b3b3b386"
+									"#b3b3b3"
 							]
 					}
 			},
@@ -200,25 +200,25 @@
 			"axisLine": {
 					"show": true,
 					"lineStyle": {
-							"color": "#b3b3b386"
+							"color": "#b3b3b3"
 					}
 			},
 			"axisTick": {
 					"show": false,
 					"lineStyle": {
-							"color": "#b3b3b386"
+							"color": "#b3b3b3"
 					}
 			},
 			"axisLabel": {
 					"show": true,
-					"color": "#b3b3b386",
+					"color": "#b3b3b3",
 					"fontSize": 10
 			},
 			"splitLine": {
 					"show": true,
 					"lineStyle": {
 							"color": [
-									"#b3b3b386"
+									"#b3b3b3"
 							]
 					}
 			},

+ 5 - 1
src/pages/dataAnalysis/rateAnalysis/components/chart.vue

@@ -54,7 +54,11 @@ const option = computed({
 			radiusAxis: {},
 			radar: props.isRadar?  [  //雷达图设定区域
 				{
-					indicator: props.xAxis.data || [],
+					indicator: props.xAxis.data.map(o => {
+						return {
+							name: o
+						}
+					}) || [],
 					center: ['60%','50%'],
 					radius: '70%',
 					splitLine: {

+ 1 - 1
src/pages/dataAnalysis/rateAnalysis/components/lineChart.vue

@@ -60,7 +60,7 @@ const option = computed({
 				text: props.title || '',
 				subtext: props.subtext || '',
 				top: 6,
-				left: 15,
+				left: 30,
 			},
 			xAxis: props.xAxis || {},
 			yAxis: props.yAxis || {},

+ 17 - 1
src/pages/dataAnalysis/rateAnalysis/components/scatterSingleChart.vue

@@ -26,6 +26,16 @@ const props = defineProps({
 		required: false,
 		default: '500px'
 	},
+	title: {
+		type: String,
+		required: false,
+		default: ''
+	},
+	subtext: {
+		type: String,
+		required: false,
+		default: ''
+	},
 	width: {
 		type: String,
 		required: false,
@@ -49,8 +59,14 @@ const option = computed({
 					);
 				}
 			},
+			title: {
+				text: props.title || '',
+				subtext: props.subtext || '',
+				top: 6,
+				left: 30,
+			},
 			grid: {
-				top: 20,
+				top: 40,
 				left: 2,
 				bottom: 10,
 				right: 20,

+ 62 - 61
src/pages/dataAnalysis/rateAnalysis/index.vue

@@ -6,7 +6,7 @@ import chartCop from './components/chart.vue'
 import lineChartCop from './components/lineChart.vue'
 import scatterSingleChartCop from './components/scatterSingleChart.vue'
 import { ElMessage } from 'element-plus';
-import { onMounted, ref, onActivated, shallowRef, reactive } from 'vue'
+import { onMounted, ref, onActivated, shallowRef, reactive, nextTick } from 'vue'
 import request from '@/api/axios.js'
 // import flowerRes from '@/data/flower.json'
 import lineChartRes from '@/data/lineNew.json'
@@ -162,7 +162,7 @@ const funSubmit = async () => {
 				chartData.value.push({
 					id: chartId,
 					title: '',
-					subtext: '风速风向分布图',
+					subtext: '风速风向玫瑰图',
 					xAxis: {
 						type: 'category',
 						boundaryGap: false,
@@ -189,7 +189,7 @@ const funSubmit = async () => {
 				chartData.value.push({
 					id: chartId,
 					title: '',
-					subtext: '风速风向频次图',
+					subtext: '风速风向频次玫瑰图',
 					xAxis: {
 						type: 'category',
 						boundaryGap: false,
@@ -198,7 +198,7 @@ const funSubmit = async () => {
 							show: true
 						}
 					},
-					isRadar: true, //显示雷达图
+					isRadar: false, //显示雷达图
 					series: chart.count?.length? [...chart.count.map((o,index) => {
 								return {
 									type: 'bar',
@@ -211,18 +211,14 @@ const funSubmit = async () => {
 									}
 								}
 							}), {
-								type: 'radar',
+								type: 'line',
+								coordinateSystem: 'polar',
 								tooltip: {
 									trigger: 'item'
 								},
 								// areaStyle: {},
-								data: [
-									{
-										// value: [1,2,3,4,5,6,7,8],
-										value: chart.radar,
-										name: '对风风向'
-									}
-								]
+								name: '对风频次',
+								data: chart.radar
 							}]: []
 				})
 				chartId++
@@ -236,7 +232,7 @@ const funSubmit = async () => {
 				return [o.x+'', o.y]
 			})
 			lineSeries.value = [{
-				name: "偏差率",
+				name: "对风频次",
 				type: "line",
 				symbol: "line", //设定为实心点
 				symbolSize: 0, //设定实心点的大小
@@ -307,12 +303,7 @@ const lineDataSet = ref([
 const scatterxData = ref([
 	{
 		type: 'category',
-		data:  [
-				'12a', '1a', '2a', '3a', '4a', '5a', '6a',
-				'7a', '8a', '9a', '10a', '11a',
-				'12p', '1p', '2p', '3p', '4p', '5p',
-				'6p', '7p', '8p', '9p', '10p', '11p'
-		],
+		data:  new Array(31).fill(-15).map((o,index) => Number((o + index))),
 		boundaryGap: false,
 		splitLine: {
 			show: true
@@ -325,10 +316,7 @@ const scatterxData = ref([
 const scatteryData = ref([
 	{
 		type: 'category',
-		data: [
-				'Saturday', 'Friday', 'Thursday',
-				'Wednesday', 'Tuesday', 'Monday', 'Sunday'
-		],
+		data: [6,7,8,9,10],
 		axisLine: {
 			show: false
 		},
@@ -345,9 +333,9 @@ const scatterSeries = ref(
 					symbolSize: function (val) {
 						return val[2] * 2;
 					},
-					data: [[0, 0, 5], [0, 1, 1], [0, 2, 0], [0, 3, 0], [0, 4, 0], [0, 5, 0], [0, 6, 0], [0, 7, 0], [0, 8, 0], [0, 9, 0], [0, 10, 0], [0, 11, 2], [0, 12, 4], [0, 13, 1], [0, 14, 1], [0, 15, 3], [0, 16, 4], [0, 17, 6], [0, 18, 4], [0, 19, 4], [0, 20, 3], [0, 21, 3], [0, 22, 2], [0, 23, 5], [1, 0, 7], [1, 1, 0], [1, 2, 0], [1, 3, 0], [1, 4, 0], [1, 5, 0], [1, 6, 0], [1, 7, 0], [1, 8, 0], [1, 9, 0], [1, 10, 5], [1, 11, 2], [1, 12, 2], [1, 13, 6], [1, 14, 9], [1, 15, 11], [1, 16, 6], [1, 17, 7], [1, 18, 8], [1, 19, 12], [1, 20, 5], [1, 21, 5], [1, 22, 7], [1, 23, 2], [2, 0, 1], [2, 1, 1], [2, 2, 0], [2, 3, 0], [2, 4, 0], [2, 5, 0], [2, 6, 0], [2, 7, 0], [2, 8, 0], [2, 9, 0], [2, 10, 3], [2, 11, 2], [2, 12, 1], [2, 13, 9], [2, 14, 8], [2, 15, 10], [2, 16, 6], [2, 17, 5], [2, 18, 5], [2, 19, 5], [2, 20, 7], [2, 21, 4], [2, 22, 2], [2, 23, 4], [3, 0, 7], [3, 1, 3], [3, 2, 0], [3, 3, 0], [3, 4, 0], [3, 5, 0], [3, 6, 0], [3, 7, 0], [3, 8, 1], [3, 9, 0], [3, 10, 5], [3, 11, 4], [3, 12, 7], [3, 13, 14], [3, 14, 13], [3, 15, 12], [3, 16, 9], [3, 17, 5], [3, 18, 5], [3, 19, 10], [3, 20, 6], [3, 21, 4], [3, 22, 4], [3, 23, 1], [4, 0, 1], [4, 1, 3], [4, 2, 0], [4, 3, 0], [4, 4, 0], [4, 5, 1], [4, 6, 0], [4, 7, 0], [4, 8, 0], [4, 9, 2], [4, 10, 4], [4, 11, 4], [4, 12, 2], [4, 13, 4], [4, 14, 4], [4, 15, 14], [4, 16, 12], [4, 17, 1], [4, 18, 8], [4, 19, 5], [4, 20, 3], [4, 21, 7], [4, 22, 3], [4, 23, 0], [5, 0, 2], [5, 1, 1], [5, 2, 0], [5, 3, 3], [5, 4, 0], [5, 5, 0], [5, 6, 0], [5, 7, 0], [5, 8, 2], [5, 9, 0], [5, 10, 4], [5, 11, 1], [5, 12, 5], [5, 13, 10], [5, 14, 5], [5, 15, 7], [5, 16, 11], [5, 17, 6], [5, 18, 0], [5, 19, 5], [5, 20, 3], [5, 21, 4], [5, 22, 2], [5, 23, 0], [6, 0, 1], [6, 1, 0], [6, 2, 0], [6, 3, 0], [6, 4, 0], [6, 5, 0], [6, 6, 0], [6, 7, 0], [6, 8, 0], [6, 9, 0], [6, 10, 1], [6, 11, 0], [6, 12, 2], [6, 13, 1], [6, 14, 3], [6, 15, 4], [6, 16, 0], [6, 17, 0], [6, 18, 0], [6, 19, 0], [6, 20, 1], [6, 21, 2], [6, 22, 2], [6, 23, 6]]
+					data: [[0, 0, 5], [0, 1, 1], [0, 2, 0], [0, 3, 0], [0, 4, 0], [0, 5, 0], [0, 6, 0], [0, 7, 0], [0, 8, 0], [0, 9, 0], [0, 10, 0], [0, 11, 2], [0, 12, 4], [0, 13, 1], [0, 14, 1], [0, 15, 3], [1, 0, 7], [1, 1, 0], [1, 2, 0], [1, 3, 0], [1, 4, 0], [1, 5, 0], [1, 6, 0], [1, 7, 0], [1, 8, 0], [1, 9, 0], [1, 10, 5], [1, 11, 2], [1, 12, 2], [1, 13, 6], [1, 14, 9], [1, 15, 11], [2, 0, 1], [2, 1, 1], [2, 2, 0], [2, 3, 0], [2, 4, 0], [2, 5, 0], [2, 6, 0], [2, 7, 0], [2, 8, 0], [2, 9, 0], [2, 10, 3], [2, 11, 2], [2, 12, 1], [2, 13, 9], [2, 14, 8], [2, 15, 10], [3, 0, 7], [3, 1, 3], [3, 2, 0], [3, 3, 0], [3, 4, 0], [3, 5, 0], [3, 6, 0], [3, 7, 0], [3, 8, 1], [3, 9, 0], [3, 10, 5], [3, 11, 4], [3, 12, 7], [3, 13, 14], [3, 14, 13], [3, 15, 12], [4, 0, 1], [4, 1, 3], [4, 2, 0], [4, 3, 0], [4, 4, 0], [4, 5, 1], [4, 6, 0], [4, 7, 0], [4, 8, 0], [4, 9, 2], [4, 10, 4], [4, 11, 4], [4, 12, 2], [4, 13, 4], [4, 14, 4], [4, 15, 14]]
     .map(function (item) {
-    return [item[1], item[0], item[2]];
+    return [item[1]+'', item[0], item[2]];
 }),
 					animationDelay: function (idx) {
 						return idx * 5;
@@ -358,6 +346,7 @@ const scatterSeries = ref(
 /**dialog */
 const dialog = ref(false)
 const actChartName = ref('')
+const actDiaTitle = ref('')
 const actCop = shallowRef(chartCop)
 const actCopList = ref([
 	// {
@@ -379,22 +368,28 @@ const funActCop = (obj, type) => {
 		case 'chartCop1':
 			actChartName.value = 'chartCop1'
 			actCop.value = chartCop
+			actDiaTitle.value = '风速风向玫瑰图'
 			break
 		case 'chartCop2':
 			actChartName.value = 'chartCop2'
 			actCop.value = chartCop
+			actDiaTitle.value = '风速风向频次玫瑰图'
 			break
 		case 'lineChartCop':
 			actChartName.value = 'lineChartCop'
 			actCop.value = lineChartCop
+			actDiaTitle.value = '对风偏差分析图'
 			break
 		case 'scatterSingleChartCop':
 			actChartName.value = 'scatterSingleChartCop'
 			actCop.value = scatterSingleChartCop
+			actDiaTitle.value = '静态偏航对风分析图'
 			break
 	}
 	dialog.value = true
-	actCopList.value = [{...obj, id: 0}]
+	nextTick(() => {
+		actCopList.value = [{...obj, id: 0}]
+	})
 }
 const funDiaSubmit = async () => {
 	let url = ''
@@ -429,7 +424,7 @@ const funDiaSubmit = async () => {
 						actCopList.value.push({
 							id: chartId,
 							title: chart.wt,
-							subtext: '风速风向分布图',
+							subtext: '风速风向玫瑰图',
 							xAxis: {
 								type: 'category',
 								boundaryGap: false,
@@ -458,7 +453,7 @@ const funDiaSubmit = async () => {
 						actCopList.value.push({
 							id: chartId,
 							title: chart.wt,
-							subtext: '风速风向频次图',
+							subtext: '风速风向频次玫瑰图',
 							xAxis: {
 								type: 'category',
 								boundaryGap: false,
@@ -467,7 +462,7 @@ const funDiaSubmit = async () => {
 									show: true
 								}
 							},
-							isRadar: true, //显示雷达图
+							isRadar: false, //显示雷达图
 							series: chart.count?.length? [...chart.count.map((o,index) => {
 										return {
 											type: 'bar',
@@ -480,19 +475,15 @@ const funDiaSubmit = async () => {
 											}
 										}
 									}), {
-										type: 'radar',
-										tooltip: {
-											trigger: 'item'
-										},
-										// areaStyle: {},
-										data: [
-											{
-												// value: [1,2,3,4,5,6,7,8],
-												value: chart.radar,
-												name: '对风风向'
-											}
-										]
-									}]: []
+								type: 'line',
+								coordinateSystem: 'polar',
+								tooltip: {
+									trigger: 'item'
+								},
+								// areaStyle: {},
+								name: '对风频次',
+								data: chart.radar
+							}]: []
 						})
 						chartId++
 					}
@@ -500,6 +491,7 @@ const funDiaSubmit = async () => {
 						actCopList.value.push({
 							id: chartId,
 							title: chart.wtId,
+							subtext: '对风偏差分析图',
 							xAxis: {
 								type: 'category',
 								data: new Array(101).fill(-50).map((o,index) => Number((o + index).toFixed(1))),
@@ -536,7 +528,7 @@ const funDiaSubmit = async () => {
 								})
 							}],
 							series: [{
-								name: "偏差率",
+								name: "对风频次",
 								type: "line",
 								symbol: "line", //设定为实心点
 								symbolSize: 0, //设定实心点的大小
@@ -593,10 +585,10 @@ onActivated(() => {
 })
 </script>
 <template>
-	<div class="bg-white py-[10px] px-[10px] relative">
+	<div class="bg-white py-[10px] px-[10px] relative s-rateAnalysis">
 		<!-- <search-cop class="mb-[20px]  shadow rounded-[6px] shadow-blue-500" @submit="funSubmit">
 		</search-cop> -->
-		<el-dialog width="1000px" v-model="dialog" title="图表">
+		<el-dialog draggable width="80%" v-model="dialog" :title="actDiaTitle">
 			<el-form class="whitespace-nowrap" :inline="true" :model="queryForm">
 				<el-form-item label="" class="!mb-0">
 					<el-select v-model="queryForm.checkIds" clearable collapse-tags multiple>
@@ -607,9 +599,10 @@ onActivated(() => {
 					<submit-btn desc="多台展示" @click="funDiaSubmit"></submit-btn>
 				</el-form-item>
 			</el-form>
-			<div class="flex flex-wrap justify-center items-center h-[600px] w-[950px] overflow-y-auto overflow-x-hidden">
-				<component :is="actCop" :width="actCopList.length>1?'470px':'700px'" height="400px" v-for="item in actCopList" :key="item.id" :xAxis="item.xAxis" :subtext="item.subtext" :title="item.title"
-				:isRadar="item.isRadar" :series="item.series" :yAxis="item.yAxis" :dataset="item.dataset"></component>
+			<div class="flex flex-wrap justify-center items-center h-[600px] overflow-y-auto overflow-x-hidden">
+				<component :is="actCop" :width="actCopList.length > 1 ? '50%' : '100%'" height="600px" v-for="item in actCopList"
+					:key="item.id" :xAxis="item.xAxis" :subtext="item.subtext" :title="item.title" :isRadar="item.isRadar"
+					:series="item.series" :yAxis="item.yAxis" :dataset="item.dataset"></component>
 			</div>
 		</el-dialog>
 		<div class="relative shadow rounded-[6px] shadow-blue-500 px-[10px] pt-[10px] pb-[10px]">
@@ -626,33 +619,41 @@ onActivated(() => {
 				</el-col>
 				<el-col :span="16">
 					<div :style="{ height: tableHeight }"
-					class="flex flex-wrap justify-center items-center overflow-x-hidden overflow-y-auto ">
-						<div class="mb-[10px] w-[49%] h-[49%] flex flex-col items-end shadow rounded-[6px] shadow-blue-500" v-for="(item, index) in chartData" :key="item.id" :class="{ 'mr-[10px]': index % 2 === 0 }">
-							<el-icon class="mr-[10px] mt-[10px] cursor-pointer" size="18" @click="funActCop(item, 'chartCop'+ (index+1))">
+						class="flex flex-wrap justify-center items-center overflow-x-hidden overflow-y-auto ">
+						<div class="mb-[10px] w-[49%] h-[49%] flex flex-col items-end shadow rounded-[6px] shadow-blue-500"
+							v-for="(item, index) in chartData" :key="item.id" :class="{ 'mr-[10px]': index % 2 === 0 }">
+							<el-icon class="mr-[10px] mt-[10px] cursor-pointer" size="18"
+								@click="funActCop(item, 'chartCop' + (index + 1))">
 								<ZoomIn />
 							</el-icon>
-							<chart-cop class="" height="100%" width="100%"
-								:xAxis="item.xAxis" :subtext="item.subtext" :title="item.title" :isRadar="item.isRadar"
-								:series="item.series">
+							<chart-cop class="" height="100%" width="100%" :xAxis="item.xAxis" :subtext="item.subtext"
+								:title="item.title" :isRadar="item.isRadar" :series="item.series">
 							</chart-cop>
 						</div>
 						<div class="mr-[10px] w-[49%] 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, dataset: lineDataSet}, 'lineChartCop')">
+							<el-icon class="mr-[10px] mt-[10px] cursor-pointer" size="18"
+								@click="funActCop({ xAxis: linexAxis, yAxis: lineyAxis, series: lineSeries, dataset: lineDataSet }, 'lineChartCop')">
 								<ZoomIn />
 							</el-icon>
-							<line-chart-cop class="" height="100%" width="100%" :xAxis="linexAxis"
-								:yAxis="lineyAxis" :series="lineSeries" :dataset="lineDataSet"></line-chart-cop>
+							<line-chart-cop class="" height="100%" width="100%" :xAxis="linexAxis" :yAxis="lineyAxis"
+								:series="lineSeries" subtext="对风偏差分析图" :dataset="lineDataSet"></line-chart-cop>
 						</div>
 						<div class="w-[49%] 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: scatterxData, yAxis: scatteryData, series: scatterSeries}, 'scatterSingleChartCop')">
+							<el-icon class="mr-[10px] mt-[10px] cursor-pointer" size="18"
+								@click="funActCop({ xAxis: scatterxData, yAxis: scatteryData, series: scatterSeries }, 'scatterSingleChartCop')">
 								<ZoomIn />
 							</el-icon>
-							<scatter-single-chart-cop class="" height="100%" width="100%"
-								:xAxis="scatterxData" :yAxis="scatteryData" :series="scatterSeries"></scatter-single-chart-cop>
+							<scatter-single-chart-cop class="" height="100%" width="100%" :xAxis="scatterxData" :yAxis="scatteryData"
+								:series="scatterSeries" subtext="静态偏航对风分析图"></scatter-single-chart-cop>
 						</div>
 					</div>
 				</el-col>
 			</el-row>
 		</div>
 	</div>
-</template>
+</template>
+<style scoped>
+.s-rateAnalysis /deep/ .el-dialog__body{
+	padding: 0px 20px;
+}
+</style>

+ 1 - 1
src/router/index.js

@@ -79,7 +79,7 @@ const routes = [{
                     path: '/dataAnalysis/rateAnalysis',
                     name: 'dataAnalysisRateAnalysis',
                     meta: {
-                        title: '风资源分析',
+                        title: '对风偏差分析',
                     },
                     component: () =>
                         import(