Browse Source

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 2 năm trước cách đây
mục cha
commit
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,

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 62 - 61
src/pages/dataAnalysis/rateAnalysis/index.vue


+ 1 - 1
src/router/index.js

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