|
@@ -93,6 +93,7 @@ const funSubmit = async () => {
|
|
|
ElMessage.error('请勾选要预处理的项')
|
|
|
return false
|
|
|
}
|
|
|
+ wtData.value = []
|
|
|
const params = {
|
|
|
ids: excelCheckIds.value.join(',')
|
|
|
}
|
|
@@ -116,7 +117,7 @@ const funSubmit = async () => {
|
|
|
for(const wtObj of res.data.sjgl){
|
|
|
seriesData.value.push(
|
|
|
{
|
|
|
- name: wtObj.wtId + "\n实际功率",
|
|
|
+ name: wtObj.obj.windturbine + "\n实际功率",
|
|
|
type: "line",
|
|
|
symbol: "line", //设定为实心点
|
|
|
symbolSize: 0, //设定实心点的大小
|
|
@@ -125,6 +126,7 @@ const funSubmit = async () => {
|
|
|
xAxisIndex: 0,
|
|
|
},
|
|
|
)
|
|
|
+ wtData.value.push(wtObj.obj)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -135,77 +137,18 @@ const avgObj = reactive({ //平均cpz等
|
|
|
frequency: '',
|
|
|
pcratio: ''
|
|
|
})
|
|
|
-const markDot = reactive({ //3-5 point点等
|
|
|
- pcl5: 0,
|
|
|
- pcl10: 0,
|
|
|
- pcl12: 0,
|
|
|
- pcl25: 0
|
|
|
-})
|
|
|
const xAxisData = ref([])
|
|
|
const chartRef = ref() //chart 的ref
|
|
|
const seriesData = ref([])
|
|
|
const isChartArea = ref(false) // 用来控制图表是否区域划分
|
|
|
const dataSet = ref('')
|
|
|
const funChartSelect = async (batch) => {
|
|
|
- const wDataArr = []
|
|
|
- const yDataArr = []
|
|
|
- let scatterls = []
|
|
|
- let scatterhs = []
|
|
|
- let dataSetObj = []
|
|
|
- wtData.value = []
|
|
|
- if (batch?.length && dataSet.value) {
|
|
|
- scatterls = batch[0].selected[2].dataIndex
|
|
|
- scatterhs = batch[0].selected[3].dataIndex
|
|
|
- if (scatterls?.length || scatterhs?.length) {
|
|
|
- dataSetObj = JSON.parse(dataSet.value)
|
|
|
- if (scatterls?.length) {
|
|
|
- for (const scatterIndex of scatterls) {
|
|
|
- wDataArr.push(dataSetObj[0].source[scatterIndex].k)
|
|
|
- }
|
|
|
- }
|
|
|
- if (scatterhs?.length) {
|
|
|
- for (const scatterIndex of scatterhs) {
|
|
|
- yDataArr.push(dataSetObj[1].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
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ return false
|
|
|
}
|
|
|
const funChartArea = () => {
|
|
|
if (seriesData.value?.length) {
|
|
|
// 获取数据后 展示dialog table 数据
|
|
|
wtDialog.value = true
|
|
|
- wtData.value = []
|
|
|
if (!isChartArea.value) {
|
|
|
// 请求一下
|
|
|
seriesData.value[0] = {
|
|
@@ -256,7 +199,7 @@ const funChartArea = () => {
|
|
|
data: [
|
|
|
[
|
|
|
{
|
|
|
- name: `3~5m 偏差率: ${markDot.pcl5}%`,
|
|
|
+ name: `3~5m`,
|
|
|
xAxis: 3,
|
|
|
},
|
|
|
{
|
|
@@ -265,7 +208,7 @@ const funChartArea = () => {
|
|
|
],
|
|
|
[
|
|
|
{
|
|
|
- name: `5~10m 偏差率: ${markDot.pcl10}%`,
|
|
|
+ name: `5~10m`,
|
|
|
xAxis: 5,
|
|
|
},
|
|
|
{
|
|
@@ -274,7 +217,7 @@ const funChartArea = () => {
|
|
|
],
|
|
|
[
|
|
|
{
|
|
|
- name: `10~12m 偏差率: ${markDot.pcl12}%`,
|
|
|
+ name: `10~12m`,
|
|
|
xAxis: 10,
|
|
|
},
|
|
|
{
|
|
@@ -283,7 +226,7 @@ const funChartArea = () => {
|
|
|
],
|
|
|
[
|
|
|
{
|
|
|
- name: `12~25m 偏差率: ${markDot.pcl25}%`,
|
|
|
+ name: `12~25m`,
|
|
|
xAxis: 12,
|
|
|
},
|
|
|
{
|
|
@@ -337,33 +280,33 @@ onActivated(() => {
|
|
|
<div class="bg-white py-[10px] px-[10px]">
|
|
|
<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="windturbine" align="center" label="风机" />
|
|
|
<el-table-column
|
|
|
- property="speed"
|
|
|
+ property="pc5ratio"
|
|
|
sortable
|
|
|
align="center"
|
|
|
label="3~5m"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- property="power"
|
|
|
+ property="pc10ratio"
|
|
|
sortable
|
|
|
align="center"
|
|
|
label="5~10m"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- property="rr"
|
|
|
+ property="pc12ratio"
|
|
|
sortable
|
|
|
align="center"
|
|
|
label="10~12m"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- property="filter"
|
|
|
+ property="pc25ratio"
|
|
|
sortable
|
|
|
align="center"
|
|
|
label="12~25m"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- property="filter"
|
|
|
+ property="pcratio"
|
|
|
sortable
|
|
|
align="center"
|
|
|
label="3~25m"
|