Browse Source

2023-02-15 update

1. 调整光伏数据准备  增加tree 和 excel的显示逻辑
2. 调整光伏功率曲线分析  增加tree和excel的显示逻辑  删除search的调用
3. 新增 风机绩效榜windAnalysis页面 (功能暂未完成)
moccus 2 years ago
parent
commit
5d3cee1416

+ 109 - 0
src/pages/dataAnalysis/windAnalysis/components/search.vue

@@ -0,0 +1,109 @@
+<script setup name="search">
+import { onMounted, reactive, ref } from 'vue'
+import request from '@/api/axios.js'
+import SubmitBtn from '@com/SubmitBtn.vue'
+
+const queryForm = reactive({
+	station: '',
+	wtIds: [],
+	st: Date.now() - 30 * 24 * 60 * 60 * 1000,
+	et: Date.now(),
+	interval: 3
+})
+/**场站 */
+const stationList = ref([])
+const funGetStation = async () => {
+	const res = await request.get("/base/station")
+	stationList.value = res.data
+	if (stationList.value.length) {
+		queryForm.station = stationList.value[0].id
+		funGetWind(queryForm.station)
+	}
+}
+const funStationChange = (stationId) => {
+	if (stationId) {
+		funGetWind(stationId)
+	} else {
+		windList.value = []
+	}
+}
+/**风机 */
+const checkAll = ref(true)
+const windList = ref([])
+const funGetWind = async (stationId) => {
+	const res = await request.get("/base/windturbine", {params: { stationId }})
+	windList.value = res.data
+	queryForm.wtIds = res.data.map(o => o.id)
+	checkAll.value = true
+}
+const funCheckAll = () => {
+	checkAll.value = !checkAll.value
+	if(checkAll.value){
+		queryForm.wtIds = windList.value.map(o => o.id)
+	}else{
+		queryForm.wtIds = []
+	}
+}
+/**导出 */
+const emits = defineEmits(['submit'])
+const funSubmit = async () => {
+	const startDate = new Date(queryForm.st).setHours(0,0,0,0)
+	const endDate = new Date(queryForm.et).setHours(0,0,0,0)
+	const query = {
+		station: queryForm.station,
+		wtIds: queryForm.wtIds.join(),
+		st: new Date(startDate).getTime(),
+		et: new Date(endDate).getTime(),
+		interval: queryForm.interval
+	}
+	switch (queryForm.interval) {
+		case 2:
+			query.interval = 60
+			break;
+		case 3:
+			query.interval = 600
+			break;
+		case 4:
+			query.interval = 900
+			break;
+	}
+	emits('submit', query)
+}
+/**created */
+funGetStation()
+</script>
+<template>
+	<div class="pl-[20px] flex items-center h-[80px] relative">
+		<div class="absolute top-[-7px] left-[20px] text-[#838383] text-[14px]">操作面板</div>
+		<el-form class="" :inline="true" :model="queryForm">
+			<el-form-item label="场站" class="!mb-0">
+				<el-select v-model="queryForm.station" class="w-[150px]" @change="funStationChange">
+					<el-option v-for="item in stationList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item label="风机" class="!mb-0">
+				<el-select multiple class="w-[150px]" v-model="queryForm.wtIds" @clear="checkAll = false" collapse-tags>
+					<el-option label="全选" :class="{'selected': checkAll}" @click="funCheckAll"></el-option>
+					<el-option v-for="item in windList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item label="开始时间" class="!mb-0">
+				<el-date-picker type="date" class="!w-[150px]" v-model="queryForm.st"></el-date-picker>
+			</el-form-item>
+			<el-form-item label="结束时间" class="!mb-0">
+				<el-date-picker type="date" class="!w-[150px]" v-model="queryForm.et"></el-date-picker>
+			</el-form-item>
+			<el-form-item label="等间隔" class="!mb-0">
+				<el-radio-group v-model="queryForm.interval">
+					<el-radio :label="1">一秒钟</el-radio>
+					<el-radio :label="2">一分钟</el-radio>
+					<el-radio :label="3">十分钟</el-radio>
+					<el-radio :label="4">十五分钟</el-radio>
+				</el-radio-group>
+			</el-form-item>
+			<el-form-item class="!mb-0">
+				<submit-btn v-prevdbclick:5000="funSubmit" desc="执行"></submit-btn>
+			</el-form-item>
+		</el-form>
+	</div>
+</template>

+ 53 - 0
src/pages/dataAnalysis/windAnalysis/components/table.vue

@@ -0,0 +1,53 @@
+<script setup name="table">
+import {ref, computed} from 'vue'
+const props = defineProps({
+  height: {
+    type: String,
+    default: '800px'
+  },
+  data: {
+    type: Array,
+    default: () => ([]),
+  },
+  column: {
+    type: Array,
+    default: () => ([]),
+  },
+  tableName: {
+    type: String,
+    default: '',
+  },
+  tableId: {
+    type: String,
+    default: '',
+  },
+  loading: {
+    type: Boolean,
+    default: false,
+  }
+})
+const emits = defineEmits(['export'])
+const funExport = () => {
+  emits('export')
+}
+const tableRef = ref('')
+const tableHeight =  computed(() => {
+  return tableRef.value.offsetHeight? tableRef.value.offsetHeight - 46 : 739
+})
+</script>
+<template>
+  <div ref="tableRef" class="p-[10px] shadow rounded-[6px] shadow-blue-500"
+    :style="{ height: typeof props.height === 'string' ? props.height : props.height + 'px' }">
+    <div class="flex justify-between items-center pb-[10px]">
+      <h3>{{props.tableName}}</h3>
+      <!-- <el-button size="small" type="primary" @click="funExport" :disabled="!props.tableId">数据导出</el-button> -->
+    </div>
+    <el-table :data="props.data"
+      stripe
+      size="small" v-loading="props.loading"
+      :max-height="tableHeight"
+      :style="{ width: '100%'}">
+      <el-table-column align="center" show-overflow-tooltip v-for="item in props.column" :prop="item.prop" :label="item.label" sortable resizable :min-width="item.width? item.width : 80" />
+    </el-table>
+  </div>
+</template>

+ 179 - 0
src/pages/dataAnalysis/windAnalysis/index.vue

@@ -0,0 +1,179 @@
+<script setup name="prepare">
+import searchCop from './components/search.vue'
+import excelCop from '@/components/excel.vue'
+import treeCop from '@/components/tree.vue'
+import tableCop from './components/table.vue'
+import { ElMessage } from 'element-plus';
+import { onMounted, ref, onActivated } from 'vue'
+import request from '@/api/axios.js'
+import {baseURL, socketURL} from '@/api/axios.js'
+/**配置参数 */
+const treeHeight = ref(window.innerHeight - 260 + 'px') //tree高度
+const excelHeight = ref(window.innerHeight - 260 + 'px') //excel高度
+const tableHeight = ref(window.innerHeight - 260 + 'px')
+/**excel 开始 */
+const excelList = ref([])
+const funExcelChange = async (obj) => { //点击excel项时
+	tableShowId.value = obj.id
+	tableName.value = obj.name
+	tableLoading.value = true
+	const res = await request.get('/power/prepare/show', { params: { id: obj.id } })
+	if(res.code === 200){
+		tableColumn.value = res.data.title.map(o => {
+			return {
+				prop: o.key,
+				label: o.des,
+				width: o.des==='时间'? 100: 80,
+			}
+		})
+		tableData.value = res.data.data
+		tableLoading.value = false
+	}else{
+		tableLoading.value = false
+	}
+}
+/**tree 开始 */
+const treeData = ref([])
+const actTreeNode = ref(null) //当前激活的treeNode
+const funRepeatMap = (arr) => {
+	return arr.map(o => {
+		if (o.children) {
+			const findIndex = o.children.findIndex(p => !!p.type)
+			if (findIndex !== -1) {
+				o.childs = o.children
+				o.children = []
+				if(!actTreeNode.value){ //判断当且仅有process获取tree时 赋值
+					actTreeNode.value = o
+				}
+			}
+		}
+		return {
+			...o,
+			children: o.children?.length ? funRepeatMap(o.children) : []
+		}
+	})
+}
+const funGetTree = async () => {
+	actTreeNode.value = null
+	const res = await request.get("/power/prepare/tree")
+	treeData.value = funRepeatMap(res.data)
+	excelList.value = []
+	if(actTreeNode.value){
+		funCurrentChange({current: actTreeNode.value, currentNode: null})
+		const child = actTreeNode.value.childs[0]
+		const obj = {
+			id: child.id,
+			interval: child.interval,
+			path: child.path,
+			prepareid: child.prepareid,
+			station: child.station,
+			time: child.time,
+			type: child.type,
+			windturbine: child.windturbine,
+			name: child.path.substring(child.path.indexOf(child.station + '_') + (child.station + '_').length)
+		}
+		funExcelChange(obj)
+	}
+}
+const funCurrentChange = ({ current, currentNode }) => {
+	if (current.childs) {
+		excelList.value = current.childs.map(o => {
+			return {
+				id: o.id,
+				interval: o.interval,
+				path: o.path,
+				prepareid: o.prepareid,
+				station: o.station,
+				time: o.time,
+				type: o.type,
+				windturbine: o.windturbine,
+				name: o.path.substring(o.path.indexOf(o.station + '_') + (o.station + '_').length)
+			}
+		})
+	} else {
+		excelList.value = []
+	}
+}
+/**table 开始 */
+const tableShowId = ref('')
+const tableName = ref('')
+const tableColumn = ref([])
+const tableLoading = ref(false)
+const tableData = ref([])
+const funExport = async () => {
+	const a = document.createElement('a')
+	a.href = baseURL + '/power/prepare/download?id=' + tableShowId.value
+	a.download = ''
+	a.click()
+}
+/**submit */
+const progress = ref(0)
+const funWebSocket = () => {
+	const webSocket = new WebSocket(`${socketURL}/ws/powerfitting/admin`)
+	webSocket.onerror = () => setTimeout(() => { funWebSocket() }, 2000)
+
+	webSocket.onmessage = (event) => {
+		const message = JSON.parse(event.data)
+		if (message.code === 200) {
+			progress.value = Number(message.data) * 100
+			if (progress.value === 100) {
+				ElMessage.success('数据加载完成')
+				funGetTree()
+				progress.value = 0
+			}
+		}
+	}
+}
+const funSubmit = async (params) => {
+	const res = await request.get('/power/prepare/data', { params: params })
+	if (res.code === 200) {
+		ElMessage.success(res.msg)
+
+	}
+}
+/**created */
+// funGetTree()
+funWebSocket()
+/**mounted */
+onMounted(() => {
+	tableHeight.value = window.innerHeight - 260 + 'px'
+	excelHeight.value = window.innerHeight - 260 + 'px'
+	treeHeight.value = window.innerHeight - 260 + 'px'
+	window.addEventListener('resize', () => {
+		tableHeight.value = window.innerHeight - 260 + 'px'
+		excelHeight.value = window.innerHeight - 260 + 'px'
+		treeHeight.value = window.innerHeight - 260 + 'px'
+	})
+})
+/**activated */
+onActivated(() => {
+	funGetTree()
+})
+</script>
+<template>
+	<div class="bg-white py-[10px] px-[10px] relative">
+		<search-cop class="mb-[20px] shadow rounded-[6px] shadow-blue-500" @submit="funSubmit">
+		</search-cop>
+		<div class="relative shadow rounded-[6px] shadow-blue-500 px-[10px] pt-[20px] pb-[10px]">
+			<div class="text-[14px] absolute top-[-7px] text-[#838383] left-[20px]">数据展示</div>
+			<el-row :gutter="10">
+				<el-col :span="5">
+					<tree-cop :data="treeData" :height="treeHeight" @currentChange="funCurrentChange" @refresh="funGetTree">
+					</tree-cop>
+				</el-col>
+				<el-col :span="3">
+					<excel-cop :data="excelList" :height="excelHeight" @excelChange="funExcelChange"></excel-cop>
+				</el-col>
+				<el-col :span="16">
+					<div>
+						<table-cop class="" :data="tableData" :column="tableColumn" :loading="tableLoading"
+							:height="tableHeight" :tableId="tableShowId" :tableName="tableName" @export="funExport"></table-cop>
+					</div>
+				</el-col>
+			</el-row>
+		</div>
+
+		<el-progress :percentage="progress" v-if="progress" class="!absolute top-0 right-0 left-0" :indeterminate="false"
+			color="rgb(19,206,102)" :stroke-width="4" :show-text="false" />
+	</div>
+</template>

+ 1 - 1
src/pages/dataFilter/lightPrepare/components/search.vue

@@ -82,7 +82,7 @@ funGetStation()
 				</el-select>
 			</el-form-item>
 			<el-form-item label="逆变器" class="!mb-0">
-				<el-select multiple clearable class="w-[150px]" v-model="queryForm.wtIds" @clear="checkAll = false" collapse-tags>
+				<el-select multiple class="w-[150px]" v-model="queryForm.wtIds" @clear="checkAll = false" collapse-tags>
 					<el-option label="全选" :class="{'selected': checkAll}" @click="funCheckAll"></el-option>
 					<el-option v-for="item in windList" :key="item.id" :label="item.name" :value="item.id"></el-option>
 				</el-select>

+ 11 - 23
src/pages/dataFilter/lightPrepare/index.vue

@@ -33,13 +33,12 @@ const funExcelChange = async (obj) => { //点击excel项时
 	}
 }
 /**tree 开始 */
-/**
 const treeData = ref([])
 const actTreeNode = ref(null) //当前激活的treeNode
 const funRepeatMap = (arr) => {
 	return arr.map(o => {
 		if (o.children) {
-			const findIndex = o.children.findIndex(p => !!p.type)
+			const findIndex = o.children.findIndex(p => !!p.path)
 			if (findIndex !== -1) {
 				o.childs = o.children
 				o.children = []
@@ -56,22 +55,21 @@ const funRepeatMap = (arr) => {
 }
 const funGetTree = async () => {
 	actTreeNode.value = null
-	const res = await request.get("/power/prepare/tree")
+	const res = await request.get("/allfilelist")
 	treeData.value = funRepeatMap(res.data)
 	excelList.value = []
 	if(actTreeNode.value){
 		funCurrentChange({current: actTreeNode.value, currentNode: null})
 		const child = actTreeNode.value.childs[0]
 		const obj = {
-			id: child.id,
+			id: child.path,
 			interval: child.interval,
 			path: child.path,
-			prepareid: child.prepareid,
 			station: child.station,
 			time: child.time,
 			type: child.type,
 			windturbine: child.windturbine,
-			name: child.path.substring(child.path.indexOf(child.station + '_') + (child.station + '_').length)
+			name: child.path
 		}
 		funExcelChange(obj)
 	}
@@ -80,22 +78,20 @@ const funCurrentChange = ({ current, currentNode }) => {
 	if (current.childs) {
 		excelList.value = current.childs.map(o => {
 			return {
-				id: o.id,
+				id: o.path,
 				interval: o.interval,
 				path: o.path,
-				prepareid: o.prepareid,
 				station: o.station,
 				time: o.time,
 				type: o.type,
 				windturbine: o.windturbine,
-				name: o.path.substring(o.path.indexOf(o.station + '_') + (o.station + '_').length)
+				name: o.path
 			}
 		})
 	} else {
 		excelList.value = []
 	}
 }
- */
 /**table 开始 */
 const tableShowId = ref('')
 const tableName = ref('')
@@ -137,15 +133,7 @@ const funSubmit = async (params) => {
 	} })
 	if (res.code === 200) {
 		ElMessage.success(res.msg)
-		if(res.data?.length){
-			excelList.value = res.data.map(o => {
-				return {
-					id: o,
-					name: o
-				}
-			})
-			funExcelChange(excelList.value[0])
-		}
+		funGetTree()
 	}
 }
 /**created */
@@ -164,7 +152,7 @@ onMounted(() => {
 })
 /**activated */
 onActivated(() => {
-	// funGetTree()
+	funGetTree()
 })
 </script>
 <template>
@@ -174,14 +162,14 @@ onActivated(() => {
 		<div class="relative shadow rounded-[6px] shadow-blue-500 px-[10px] pt-[20px] pb-[10px]">
 			<div class="text-[14px] absolute top-[-7px] text-[#838383] left-[20px]">数据展示</div>
 			<el-row :gutter="10">
-				<!-- <el-col :span="5">
+				<el-col :span="4">
 					<tree-cop :data="treeData" :height="treeHeight" @currentChange="funCurrentChange" @refresh="funGetTree">
 					</tree-cop>
-				</el-col> -->
+				</el-col>
 				<el-col :span="4">
 					<excel-cop :data="excelList" :height="excelHeight" @excelChange="funExcelChange"></excel-cop>
 				</el-col>
-				<el-col :span="20">
+				<el-col :span="16">
 					<div>
 						<table-cop class="" :data="tableData" :column="tableColumn" :loading="tableLoading"
 							:height="tableHeight" :tableId="tableShowId" :tableName="tableName" @export="funExport"></table-cop>

+ 1 - 1
src/pages/dataFilter/prepare/components/search.vue

@@ -82,7 +82,7 @@ funGetStation()
 				</el-select>
 			</el-form-item>
 			<el-form-item label="风机" class="!mb-0">
-				<el-select multiple clearable class="w-[150px]" v-model="queryForm.wtIds" @clear="checkAll = false" collapse-tags>
+				<el-select multiple class="w-[150px]" v-model="queryForm.wtIds" @clear="checkAll = false" collapse-tags>
 					<el-option label="全选" :class="{'selected': checkAll}" @click="funCheckAll"></el-option>
 					<el-option v-for="item in windList" :key="item.id" :label="item.name" :value="item.id"></el-option>
 				</el-select>

+ 10 - 10
src/pages/lightAnalysis/glAnalysis/components/current-scatter-chart.vue

@@ -109,16 +109,16 @@ export default {
         //     ? "rgba(0,0,0,0.4)"
         //     : "rgba(255,255,255,0.5)",
         //工具箱
-        color: [
-            "#0098d9",
-            "rgb(255,0,0)",
-            "#0a4468",
-            "#a9e3f199",
-            "#a9e3f199",
-            "#005eaa",
-            "#cda819",
-            "#32a487"
-        ],
+        // color: [
+        //     "#0098d9",
+        //     "rgb(255,0,0)",
+        //     "#0a4468",
+        //     "#a9e3f199",
+        //     "#a9e3f199",
+        //     "#005eaa",
+        //     "#cda819",
+        //     "#32a487"
+        // ],
         toolbox: {
           show: false,
           x: "right",

+ 1 - 1
src/pages/lightAnalysis/glAnalysis/components/search.vue

@@ -82,7 +82,7 @@ funGetStation()
 				</el-select>
 			</el-form-item>
 			<el-form-item label="逆变器" class="!mb-0">
-				<el-select multiple clearable class="w-[150px]" v-model="queryForm.wtIds" @clear="checkAll = false" collapse-tags>
+				<el-select multiple class="w-[150px]" v-model="queryForm.wtIds" @clear="checkAll = false" collapse-tags>
 					<el-option label="全选" :class="{'selected': checkAll}" @click="funCheckAll"></el-option>
 					<el-option v-for="item in windList" :key="item.id" :label="item.name" :value="item.id"></el-option>
 				</el-select>

+ 63 - 90
src/pages/lightAnalysis/glAnalysis/index.vue

@@ -15,32 +15,20 @@ const treeHeight = ref(window.innerHeight - 260 + 'px') //tree高度
 const excelHeight = ref(window.innerHeight - 260 + 'px') //excel高度
 /**excel 开始 */
 const excelList = ref([])
+const excelCheckIds = ref([])
 const funExcelChange = async (obj) => { //点击excel项时
-	activeTab.value = '1'
-	tableShowId.value = obj.id
-	tableName.value = obj.name
-	tableLoading.value = true
-	const res = await request.get('/power/prepare/show', { params: { id: obj.id } })
-	if(res.code === 200){
-		tableColumn.value = res.data.title.map(o => {
-			return {
-				prop: o.key,
-				label: o.des,
-				width: o.des==='时间'? 100: 80,
-			}
-		})
-		tableData.value = res.data.data
-		tableLoading.value = false
-	}else{
-		tableLoading.value = false
-	}
+	return false
+}
+const funExcelCheckChange = ({ checkArr, data }) => {   //bug 
+	excelCheckIds.value = checkArr
+	funSubmit() // check 后进行操作
 }
 /**tree 开始 */
 const treeData = ref([])
 const funRepeatMap = (arr) => {
 	return arr.map(o => {
 		if (o.children) {
-			const findIndex = o.children.findIndex(p => !!p.type)
+			const findIndex = o.children.findIndex(p => !!p.path)
 			if (findIndex !== -1) {
 				o.childs = o.children
 				o.children = []
@@ -53,7 +41,7 @@ const funRepeatMap = (arr) => {
 	})
 }
 const funGetTree = async () => {
-	const res = await request.get("/power/prepare/tree")
+	const res = await request.get("/allfilelist")
 	treeData.value = funRepeatMap(res.data)
 	excelList.value = []
 }
@@ -61,15 +49,14 @@ const funCurrentChange = ({ current, currentNode }) => {
 	if (current.childs) {
 		excelList.value = current.childs.map(o => {
 			return {
-				id: o.id,
+				id: o.path,
 				interval: o.interval,
 				path: o.path,
-				prepareid: o.prepareid,
 				station: o.station,
 				time: o.time,
 				type: o.type,
 				windturbine: o.windturbine,
-				name: o.path.substring(o.path.indexOf(o.station + '_') + (o.station + '_').length)
+				name: o.path
 			}
 		})
 	} else {
@@ -99,120 +86,106 @@ const funChartSelect = async (batch) => {
 	return false
 }
 /**submit */
-const funSubmit = async (params) => {
-	activeTab.value = '2'
-	tableShowId.value = 1
-	tableName.value = ''
-	tableData.value = []
-	xAxisData.value = []
-	seriesData.value = []
+const funSubmit = async () => {
+	activeTab.value = '1'
+	if (!excelCheckIds.value.length) {
+		ElMessage.error('请勾选要执行的项')
+		return false
+	}
+	const params = {
+		filelist: excelCheckIds.value.join(',')
+	}
+	tableShowId.value = '1'
+	tableName.value = params.filelist
 	tableLoading.value = true
-	const res = await request.get('/analysis/powertime', { params: {
-		station: params.station,
-		inverters: params.wtIds,
-		startdate: params.st,
-		enddate: params.et
-	} })
-	if(res.code === 200){
-		tableColumn.value = res.data.title.map(o => {
+	const res = await request.get('/analysis/powertimefile', { params })
+	if(res.code !== 200){ 
+		tableLoading.value = false
+		return false
+	}
+	tableColumn.value = res.data.title.map(o => {
 			return {
 				prop: o.key,
 				label: o.des,
 				width: o.des==='时间'? 100: 80,
 			}
 		})
-		if(res.data.info?.length){
-			tableData.value = res.data.info
+		const wtIds = excelCheckIds.value
+		const xAxis = []
+		const series = []
+		if(!res.data.data || !wtIds.length){ tableLoading.value = false; return false}
+		for(const index in wtIds){
 			const llgl = []
 			const sjgl = []
-			res.data.info.forEach(o => {
-				xAxisData.value.push(o.datetime)
+			for(const o of res.data.data[wtIds[index]]){
+				if(index === '0'){
+					xAxis.push(o.datetime)
+				}
+				tableData.value.push(o)
 				llgl.push(o.ideaP)
 				sjgl.push(o.actualP)
-			})
-			seriesData.value = [
+			}
+			series.push(
 				{
-					name: "实际功率",
+					name: wtIds[index] + "\n实际功率",
 					type: "line",
 					symbol: "line", //设定为实心点
 					symbolSize: 0, //设定实心点的大小
 					smooth: false, //这个是把线变成曲线
 					data: sjgl,
 					xAxisIndex: 0,
-				},
+				}
+			)
+			series.push(
 				{
-					name: "理论功率",
+					name: wtIds[index] + "\n理论功率",
 					type: "line",
 					symbol: "line", //设定为实心点
 					symbolSize: 0, //设定实心点的大小
 					smooth: false, //这个是把线变成曲线
 					data: llgl,
 					xAxisIndex: 0,
-				},
-			]
-		}else{
-			tableData.value = []
+				}
+			)
 		}
+		xAxisData.value = xAxis
+		seriesData.value = series
 		tableLoading.value = false
-
-	}else{
-		tableLoading.value = false
-	}
-
-	
-	// if (res.code === 200) {
-		// if(res.data.sjgl?.length){
-		// 	for(const wtObj of res.data.sjgl){
-		// 		seriesData.value.push(
-		// 			{
-		// 				name: wtObj.obj.windturbine + "\n实际功率",
-		// 				type: "line",
-		// 				symbol: "line", //设定为实心点
-		// 				symbolSize: 0, //设定实心点的大小
-		// 				smooth: true, //这个是把线变成曲线
-		// 				data: wtObj.sjgl || [],
-		// 				xAxisIndex: 0,
-		// 			},
-		// 		)
-		// 		wtData.value.push(wtObj.obj)
-		// 	}
-		// }
-	// }
 }
 /**created */
 // funGetTree()
 /**mounted */
 onMounted(() => {
-	tableHeight.value = window.innerHeight - 314 + 'px'
-	excelHeight.value = window.innerHeight - 260 + 'px'
-	treeHeight.value = window.innerHeight - 260 + 'px'
+	tableHeight.value = window.innerHeight - 214 + 'px'
+	excelHeight.value = window.innerHeight - 160 + 'px'
+	treeHeight.value = window.innerHeight - 160 + 'px'
 	window.addEventListener('resize', () => {
-		tableHeight.value = window.innerHeight - 314 + 'px'
-		excelHeight.value = window.innerHeight - 260 + 'px'
-		treeHeight.value = window.innerHeight - 260 + 'px'
+		tableHeight.value = window.innerHeight - 214 + 'px'
+		excelHeight.value = window.innerHeight - 160 + 'px'
+		treeHeight.value = window.innerHeight - 160 + 'px'
 	})
 })
 /**activated */
 onActivated(() => {
-	// funGetTree()
+	funGetTree()
 	// funSubmit()
 })
 </script>
 <template>
 	<div class="bg-white py-[10px] px-[10px] relative">
-		<search-cop class="mb-[20px] shadow rounded-[6px] shadow-blue-500" @submit="funSubmit">
-		</search-cop>
+		<!-- <search-cop class="mb-[20px] shadow rounded-[6px] shadow-blue-500" @submit="funSubmit">
+		</search-cop> -->
 		<div class="relative shadow rounded-[6px] shadow-blue-500 px-[10px] pt-[20px] pb-[10px]">
 			<div class="text-[14px] absolute top-[-7px] text-[#838383] left-[20px]">数据展示</div>
 			<el-row :gutter="10">
-				<!-- <el-col :span="5">
+				<el-col :span="4">
 					<tree-cop :data="treeData" :height="treeHeight" @currentChange="funCurrentChange" @refresh="funGetTree">
 					</tree-cop>
 				</el-col>
-				<el-col :span="3">
-					<excel-cop :data="excelList" :height="excelHeight" @excelChange="funExcelChange"></excel-cop>
-				</el-col> -->
-				<el-col :span="24">
+				<el-col :span="4">
+					<excel-cop :data="excelList" :height="excelHeight" showCheckbox @excelChange="funExcelChange" @checkChange="funExcelCheckChange"></excel-cop>
+				</el-col>
+				<el-col :span="16">
 					<div class="px-[10px] shadow rounded-[6px] shadow-blue-500 ">
 						<el-tabs v-model="activeTab">
 							<el-tab-pane label="表格数据" name="1">
@@ -225,7 +198,7 @@ onActivated(() => {
 								:style="{ height: typeof tableHeight === 'string' ? tableHeight : tableHeight + 'px' }"
 								class="p-[10px]">
 								<CurrentScatterChart ref="chartRef" width="100%" :height="`calc( ${tableHeight} - 20px )`" :chartTitle="''"
-									:xAxisData="xAxisData" :yAxisData="{ splitLine: { show: false } }" :seriesData="seriesData"
+									:xAxisData="xAxisData" :seriesData="seriesData"
 									:showLegend="true" :brushSelected="false" :dataSet="dataSet" @getSelected="funChartSelect" />
 							</div>
 						</el-tabs>

+ 12 - 0
src/router/index.js

@@ -146,6 +146,18 @@ const routes = [{
                             '../pages/dataAnalysis/agcAnalysis/index.vue'
                         ),
                 },
+                {
+                    icon: 'el-icon-s-home',
+                    path: '/dataAnalysis/windAnalysis',
+                    name: 'dataAnalysisWindAnalysis',
+                    meta: {
+                        title: '风机绩效榜',
+                    },
+                    component: () =>
+                        import(
+                            '../pages/dataAnalysis/windAnalysis/index.vue'
+                        ),
+                },
             ]
         },
         {