فهرست منبع

Merge branch 'main' of http://124.70.43.205:3000/xufenqi/PowerAnalysis into main

chenminghua 2 سال پیش
والد
کامیت
a8887d68f7

+ 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"

+ 6 - 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)
@@ -181,6 +182,7 @@ const funRepeatMap = (arr, type='prepare') => {
 const funGetTree = async () => {
 	const res = await request.get("/power/process/tree")
 	treeData.value = funRepeatMap(res.data)
+	excelList.value = []
 }
 const funCurrentChange = ({ current, currentNode }) => {
 	excelCheckboxShow.value = true
@@ -222,6 +224,7 @@ const processTreeData = ref([])
 const funGetProcessTree = async (flag = true) => { //flag控制是否获取tree的第一项 true为可获取
 	actTreeNode.value = null
 	const res = await request.get("/power/fitting/tree")
+	excelFitList.value = []
 	processTreeData.value = funRepeatMap(res.data, flag? 'process' : 'prepare') //flag控制对actTreeNode赋值
 	if(actTreeNode.value){
 		funProcessCurrentChange({current: actTreeNode.value, currentNode: null})
@@ -293,6 +296,7 @@ const funSubmit = async (query) => {
 }
 /**chart Data */
 const avgObj = reactive({ //平均cpz等
+	title: '',
 	cpavg: '',
 	frequency: '',
 	pcratio: ''
@@ -499,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">
@@ -547,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>

+ 50 - 171
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([])
@@ -161,6 +49,7 @@ const funRepeatMap = (arr, type='fitting') => {
 const funGetTree = async () => {
 	const res = await request.get("/power/fitting/tree")
 	treeData.value = funRepeatMap(res.data)
+	excelList.value = []
 }
 const funCurrentChange = ({ current, currentNode }) => {
 	excelCheckboxShow.value = true
@@ -195,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(
 				{
@@ -315,6 +203,9 @@ const funChartSelect = async (batch) => {
 }
 const funChartArea = () => {
 	if (seriesData.value?.length) {
+		// 获取数据后 展示dialog table 数据
+		wtDialog.value = true
+		wtData.value = []
 		if (!isChartArea.value) {
 			// 请求一下
 			seriesData.value[0] = {
@@ -422,13 +313,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({
@@ -444,52 +335,40 @@ 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-tabs v-model="wtTab">
-        <el-tab-pane label="数据" name="table">
-          <el-table :data="wtData" row-key="id" :max-height="550">
-            <el-table-column property="wtId" align="center" label="风机" />
-            <el-table-column
-              property="time"
-              sortable
-              :width="160"
-              align="center"
-              label="时间"
-            />
-            <el-table-column
-              property="speed"
-              sortable
-              align="center"
-              label="风速(m/s)"
-            />
-            <el-table-column
-              property="power"
-              sortable
-              align="center"
-              label="功率(kw)"
-            />
-            <el-table-column
-              property="rr"
-              sortable
-              align="center"
-              label="转速"
-            />
-            <el-table-column
-              property="filter"
-              sortable
-              align="center"
-              label="是否有用点"
-            />
-          </el-table>
-        </el-tab-pane>
-        <el-tab-pane label="故障" name="problem" disabled> </el-tab-pane>
-        <el-tab-pane label="预警" name="warning" disabled> </el-tab-pane>
-      </el-tabs>
+    <el-dialog draggable v-model="wtDialog" title="曲线偏差率">
+			<el-table :data="wtData" row-key="id" :max-height="550">
+				<el-table-column property="wtId" align="center" label="风机" />
+				<el-table-column
+					property="speed"
+					sortable
+					align="center"
+					label="3~5m"
+				/>
+				<el-table-column
+					property="power"
+					sortable
+					align="center"
+					label="5~10m"
+				/>
+				<el-table-column
+					property="rr"
+					sortable
+					align="center"
+					label="10~12m"
+				/>
+				<el-table-column
+					property="filter"
+					sortable
+					align="center"
+					label="12~25m"
+				/>
+				<el-table-column
+					property="filter"
+					sortable
+					align="center"
+					label="3~25m"
+				/>
+			</el-table>
     </el-dialog>
     <div
       class="

+ 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: {

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

@@ -5,6 +5,7 @@ import { ref, toRaw, computed, onMounted, watch, nextTick } from 'vue';
 import * as echarts from 'echarts'
 const chartId = 'chart-' + util.newGUID(); //chartId
 const chartIns = ref(null)  //chart 实例
+const emits = defineEmits(['getSelected'])
 const props = defineProps({
 	xAxis: {
 		type: Object,
@@ -42,6 +43,11 @@ const props = defineProps({
 		type: String,
 		required: false
 	},
+	brush: {
+		type: Boolean,
+		required: false,
+		default: false
+	}
 })
 
 /**定义option */
@@ -60,10 +66,27 @@ const option = computed({
 				text: props.title || '',
 				subtext: props.subtext || '',
 				top: 6,
-				left: 15,
+				left: 30,
 			},
 			xAxis: props.xAxis || {},
 			yAxis: props.yAxis || {},
+			brush: {
+          seriesIndex: [1],
+          yAxisIndex: 0,
+          transformable: true,
+          throttleType: "debounce",
+          throttleDelay: 1000,
+          removeOnClick: true,
+          brushType: props.brush? "polygon" : false,
+          brushMode: "multiple",
+          brushStyle: {
+            borderWidth: 1,
+            borderColor: "#ff2424",
+          },
+        },
+			toolbox:{
+				show: props.brush,
+			},
 			tooltip: {
 				confine: true,
 				axisPointer: {
@@ -78,6 +101,7 @@ const option = computed({
 				itemWidth: 6,
 			},
 			grid: {
+				top: 80,
 				left: 40,
 				right: 40,
 				bottom: 40,
@@ -109,12 +133,42 @@ watch(() => option, (newVal, oldVal) => {
 		echartIns.setOption(toRaw(newVal.value))
 	}
 }, { deep: true })
+const funBrushChange = (flag) => {
+	const echartIns = toRaw(chartIns.value)
+		console.log(echartIns)
+	echartIns.dispatchAction({
+			type: "takeGlobalCursor",
+			// 如果想变为“可刷选状态”,必须设置。不设置则会关闭“可刷选状态”。
+			key: "brush",
+			brushOption: {
+				seriesIndex: [1],
+				yAxisIndex: 0,
+				transformable: true,
+				throttleType: "debounce",
+				throttleDelay: 1000,
+				removeOnClick: true,
+				brushType: flag? "polygon" : false,
+				brushMode: "multiple",
+				brushStyle: {
+					borderWidth: 1,
+					color: "rgba(255,36,36,0.2)",
+					borderColor: "#ff2424",
+				},
+			},
+		});
+	echartIns.off("brushSelected");
+	echartIns.on("brushSelected", (params) => {
+		emits("getSelected", params.batch || []);
+	});
+}
+watch(() => props.brush, (newVal, oldVal) => funBrushChange(newVal))
 
 onMounted(() => {
 	echarts.registerTheme('chartTheme', chartTheme)
 	const echartIns =	echarts.init(document.getElementById(chartId),'chartTheme') 
 	chartIns.value = echartIns
 	echartIns.setOption(option.value)
+	funBrushChange(props.brush)
 	window.addEventListener('resize', () => {
 		echartIns.resize()
 	})

+ 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,

+ 142 - 64
src/pages/dataAnalysis/rateAnalysis/index.vue

@@ -1,12 +1,12 @@
 <script setup name="rateAnalysis">
-import searchCop from './components/search.vue'
 import excelCop from '@/components/excel.vue'
 import treeCop from '@/components/tree.vue'
 import chartCop from './components/chart.vue'
 import lineChartCop from './components/lineChart.vue'
+import SubmitBtn from '../../../components/SubmitBtn.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'
@@ -56,6 +56,7 @@ const funRepeatMap = (arr) => {
 const funGetTree = async () => {
 	const res = await request.get("/power/process/tree")
 	actTreeNode.value = null
+	excelList.value = []
 	treeData.value = funRepeatMap(res.data)
 	if(actTreeNode.value){
 		funCurrentChange({current: actTreeNode.value, currentNode: null})
@@ -161,7 +162,7 @@ const funSubmit = async () => {
 				chartData.value.push({
 					id: chartId,
 					title: '',
-					subtext: '风速风向分布图',
+					subtext: '风速风向玫瑰图',
 					xAxis: {
 						type: 'category',
 						boundaryGap: false,
@@ -188,7 +189,7 @@ const funSubmit = async () => {
 				chartData.value.push({
 					id: chartId,
 					title: '',
-					subtext: '风速风向频次图',
+					subtext: '风速风向频次玫瑰图',
 					xAxis: {
 						type: 'category',
 						boundaryGap: false,
@@ -197,7 +198,7 @@ const funSubmit = async () => {
 							show: true
 						}
 					},
-					isRadar: true, //显示雷达图
+					isRadar: false, //显示雷达图
 					series: chart.count?.length? [...chart.count.map((o,index) => {
 								return {
 									type: 'bar',
@@ -210,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++
@@ -235,7 +232,7 @@ const funSubmit = async () => {
 				return [o.x+'', o.y]
 			})
 			lineSeries.value = [{
-				name: "偏差率",
+				name: "对风频次",
 				type: "line",
 				symbol: "line", //设定为实心点
 				symbolSize: 0, //设定实心点的大小
@@ -302,16 +299,60 @@ const lineDataSet = ref([
 		source: []
 	}
 ])
+const funChartSelect = async (batch) => {
+	console.log(batch)
+	const wDataArr = []
+	const yDataArr = []
+	let scatterls = []
+	let dataSetObj = []
+	wtData.value = []
+	if (batch?.length && actCopList.value[0]?.dataset) {
+		scatterls = batch[0].selected[1].dataIndex
+		if (scatterls?.length) {
+			dataSetObj = JSON.parse(actCopList.value[0].dataset)
+			if (scatterls?.length) {
+				for (const scatterIndex of scatterls) {
+					wDataArr.push(dataSetObj[0].source[scatterIndex].k)
+				}
+			}
+			const wtRes = await request.get('/power/fitting/filter', { params: { yk: yDataArr.join(','), wk: wDataArr.join(',') } })
+			if (wtRes.code === 200) {
+				let id = 1
+				const tempArr = [] //用于以风机id 聚合dataArr
+				if (wtRes.data?.length) {
+					for (const data of wtRes.data) {
+						if (tempArr.length) {
+							const findIndex = tempArr.findIndex(o => o.wtId === data.wtId)
+							if (findIndex !== -1) {
+								if (!tempArr[findIndex].children) {
+									tempArr[findIndex].children = []
+								}
+								tempArr[findIndex].children.push({ ...data, id: id, filter: data.filter === 0 ? '是' : '否' })
+								id++
+							} else {
+								tempArr.push({ ...data, id: id, filter: data.filter === 0 ? '是' : '否' })
+								id++
+							}
+						} else {
+							tempArr.push({ ...data, id: id, filter: data.filter === 0 ? '是' : '否' })
+							id++
+						}
+					}
+					wtDialog.value = true
+					nextTick(() => {
+						wtTab.value = 'table'
+						wtData.value = tempArr
+					})
+				}
+			}
+		}
+	}
+}
 /**scatter chart */
 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
@@ -324,10 +365,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
 		},
@@ -344,9 +382,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;
@@ -354,9 +392,14 @@ const scatterSeries = ref(
 				}
 			]
 )
+/**dialog 数据 */
+const wtDialog = ref(false)
+const wtData = ref([])
+const wtTab = ref('table')
 /**dialog */
 const dialog = ref(false)
 const actChartName = ref('')
+const actDiaTitle = ref('')
 const actCop = shallowRef(chartCop)
 const actCopList = ref([
 	// {
@@ -378,22 +421,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, isBrush: type === 'lineChartCop' ? true :false}]
+	})
 }
 const funDiaSubmit = async () => {
 	let url = ''
@@ -427,8 +476,9 @@ const funDiaSubmit = async () => {
 					if(actChartName.value==='chartCop1'){
 						actCopList.value.push({
 							id: chartId,
+							isBrush: false,
 							title: chart.wt,
-							subtext: '风速风向分布图',
+							subtext: '风速风向玫瑰图',
 							xAxis: {
 								type: 'category',
 								boundaryGap: false,
@@ -456,8 +506,9 @@ const funDiaSubmit = async () => {
 					if(actChartName.value === 'chartCop2'){
 						actCopList.value.push({
 							id: chartId,
+							isBrush: false,
 							title: chart.wt,
-							subtext: '风速风向频次图',
+							subtext: '风速风向频次玫瑰图',
 							xAxis: {
 								type: 'category',
 								boundaryGap: false,
@@ -466,7 +517,7 @@ const funDiaSubmit = async () => {
 									show: true
 								}
 							},
-							isRadar: true, //显示雷达图
+							isRadar: false, //显示雷达图
 							series: chart.count?.length? [...chart.count.map((o,index) => {
 										return {
 											type: 'bar',
@@ -479,26 +530,24 @@ 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++
 					}
 					if(actChartName.value === 'lineChartCop'){
 						actCopList.value.push({
 							id: chartId,
+							isBrush: false,
 							title: chart.wtId,
+							subtext: '对风偏差分析图',
 							xAxis: {
 								type: 'category',
 								data: new Array(101).fill(-50).map((o,index) => Number((o + index).toFixed(1))),
@@ -535,7 +584,7 @@ const funDiaSubmit = async () => {
 								})
 							}],
 							series: [{
-								name: "偏差率",
+								name: "对风频次",
 								type: "line",
 								symbol: "line", //设定为实心点
 								symbolSize: 0, //设定实心点的大小
@@ -592,10 +641,30 @@ 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 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">
+						<el-table-column property="wtId" align="center" label="风机" />
+						<el-table-column property="time" sortable :width="160" align="center" label="时间" />
+						<el-table-column property="speed" sortable align="center" label="风速(m/s)" />
+						<el-table-column property="power" sortable align="center" label="功率(kw)" />
+						<el-table-column property="rr" sortable align="center" label="转速" />
+						<el-table-column property="filter" sortable align="center" label="是否有用点" />
+					</el-table>
+				</el-tab-pane>
+				<el-tab-pane label="故障" name="problem" disabled>
+
+				</el-tab-pane>
+				<el-tab-pane label="预警" name="warning" disabled>
+
+				</el-tab-pane>
+			</el-tabs>
+		</el-dialog>
+		<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>
@@ -606,9 +675,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" :brush="item.isBrush" @getSelected="funChartSelect"></component>
 			</div>
 		</el-dialog>
 		<div class="relative shadow rounded-[6px] shadow-blue-500 px-[10px] pt-[10px] pb-[10px]">
@@ -625,33 +695,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')">
+						<div class="mr-[10px] w-[49%] h-[49%] flex flex-col items-end shadow rounded-[6px] shadow-blue-500" v-if="!!lineSeries.length">
+							<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')">
+						<div class="w-[49%] h-[49%] flex flex-col items-end shadow rounded-[6px] shadow-blue-500" v-if="!!lineSeries.length">
+							<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 - 0
src/pages/dataFilter/prepare/index.vue

@@ -48,6 +48,7 @@ const funRepeatMap = (arr) => {
 const funGetTree = async () => {
 	const res = await request.get("/power/prepare/tree")
 	treeData.value = funRepeatMap(res.data)
+	excelList.value = []
 }
 const funCurrentChange = ({ current, currentNode }) => {
 	if (current.childs) {

+ 2 - 0
src/pages/dataFilter/process/index.vue

@@ -58,6 +58,7 @@ const funRepeatMap = (arr) => {
 const funGetTree = async () => {
 	const res = await request.get("/power/prepare/tree")
 	treeData.value = funRepeatMap(res.data)
+	excelList.value = []
 }
 const funCurrentChange = ({ current, currentNode }) => {
 	excelCheckboxShow.value = true
@@ -99,6 +100,7 @@ const processTreeData = ref([])
 const funGetProcessTree = async () => {
 	const res = await request.get("/power/process/tree")
 	processTreeData.value = funRepeatMap(res.data)
+	excelList.value = []
 }
 const funProcessCurrentChange = ({ current, currentNode }) => {
 	excelCheckboxShow.value = false

+ 1 - 1
src/router/index.js

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