|
@@ -299,6 +299,55 @@ const lineDataSet = ref([
|
|
source: []
|
|
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 */
|
|
/**scatter chart */
|
|
const scatterxData = ref([
|
|
const scatterxData = ref([
|
|
{
|
|
{
|
|
@@ -343,6 +392,10 @@ const scatterSeries = ref(
|
|
}
|
|
}
|
|
]
|
|
]
|
|
)
|
|
)
|
|
|
|
+/**dialog 数据 */
|
|
|
|
+const wtDialog = ref(false)
|
|
|
|
+const wtData = ref([])
|
|
|
|
+const wtTab = ref('table')
|
|
/**dialog */
|
|
/**dialog */
|
|
const dialog = ref(false)
|
|
const dialog = ref(false)
|
|
const actChartName = ref('')
|
|
const actChartName = ref('')
|
|
@@ -388,7 +441,7 @@ const funActCop = (obj, type) => {
|
|
}
|
|
}
|
|
dialog.value = true
|
|
dialog.value = true
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
- actCopList.value = [{...obj, id: 0}]
|
|
|
|
|
|
+ actCopList.value = [{...obj, id: 0, isBrush: type === 'lineChartCop' ? true :false}]
|
|
})
|
|
})
|
|
}
|
|
}
|
|
const funDiaSubmit = async () => {
|
|
const funDiaSubmit = async () => {
|
|
@@ -423,6 +476,7 @@ const funDiaSubmit = async () => {
|
|
if(actChartName.value==='chartCop1'){
|
|
if(actChartName.value==='chartCop1'){
|
|
actCopList.value.push({
|
|
actCopList.value.push({
|
|
id: chartId,
|
|
id: chartId,
|
|
|
|
+ isBrush: false,
|
|
title: chart.wt,
|
|
title: chart.wt,
|
|
subtext: '风速风向玫瑰图',
|
|
subtext: '风速风向玫瑰图',
|
|
xAxis: {
|
|
xAxis: {
|
|
@@ -452,6 +506,7 @@ const funDiaSubmit = async () => {
|
|
if(actChartName.value === 'chartCop2'){
|
|
if(actChartName.value === 'chartCop2'){
|
|
actCopList.value.push({
|
|
actCopList.value.push({
|
|
id: chartId,
|
|
id: chartId,
|
|
|
|
+ isBrush: false,
|
|
title: chart.wt,
|
|
title: chart.wt,
|
|
subtext: '风速风向频次玫瑰图',
|
|
subtext: '风速风向频次玫瑰图',
|
|
xAxis: {
|
|
xAxis: {
|
|
@@ -490,6 +545,7 @@ const funDiaSubmit = async () => {
|
|
if(actChartName.value === 'lineChartCop'){
|
|
if(actChartName.value === 'lineChartCop'){
|
|
actCopList.value.push({
|
|
actCopList.value.push({
|
|
id: chartId,
|
|
id: chartId,
|
|
|
|
+ isBrush: false,
|
|
title: chart.wtId,
|
|
title: chart.wtId,
|
|
subtext: '对风偏差分析图',
|
|
subtext: '对风偏差分析图',
|
|
xAxis: {
|
|
xAxis: {
|
|
@@ -588,6 +644,26 @@ onActivated(() => {
|
|
<div class="bg-white py-[10px] px-[10px] relative s-rateAnalysis">
|
|
<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 class="mb-[20px] shadow rounded-[6px] shadow-blue-500" @submit="funSubmit">
|
|
</search-cop> -->
|
|
</search-cop> -->
|
|
|
|
+ <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-dialog draggable width="80%" v-model="dialog" :title="actDiaTitle">
|
|
<el-form class="whitespace-nowrap" :inline="true" :model="queryForm">
|
|
<el-form class="whitespace-nowrap" :inline="true" :model="queryForm">
|
|
<el-form-item label="" class="!mb-0">
|
|
<el-form-item label="" class="!mb-0">
|
|
@@ -602,7 +678,7 @@ onActivated(() => {
|
|
<div class="flex flex-wrap justify-center items-center h-[600px] overflow-y-auto overflow-x-hidden">
|
|
<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"
|
|
<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"
|
|
: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>
|
|
|
|
|
|
+ :series="item.series" :yAxis="item.yAxis" :dataset="item.dataset" :brush="item.isBrush" @getSelected="funChartSelect"></component>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<div class="relative shadow rounded-[6px] shadow-blue-500 px-[10px] pt-[10px] pb-[10px]">
|
|
<div class="relative shadow rounded-[6px] shadow-blue-500 px-[10px] pt-[10px] pb-[10px]">
|
|
@@ -630,7 +706,7 @@ onActivated(() => {
|
|
:title="item.title" :isRadar="item.isRadar" :series="item.series">
|
|
:title="item.title" :isRadar="item.isRadar" :series="item.series">
|
|
</chart-cop>
|
|
</chart-cop>
|
|
</div>
|
|
</div>
|
|
- <div class="mr-[10px] w-[49%] h-[49%] flex flex-col items-end shadow rounded-[6px] shadow-blue-500">
|
|
|
|
|
|
+ <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"
|
|
<el-icon class="mr-[10px] mt-[10px] cursor-pointer" size="18"
|
|
@click="funActCop({ xAxis: linexAxis, yAxis: lineyAxis, series: lineSeries, dataset: lineDataSet }, 'lineChartCop')">
|
|
@click="funActCop({ xAxis: linexAxis, yAxis: lineyAxis, series: lineSeries, dataset: lineDataSet }, 'lineChartCop')">
|
|
<ZoomIn />
|
|
<ZoomIn />
|
|
@@ -638,7 +714,7 @@ onActivated(() => {
|
|
<line-chart-cop class="" height="100%" width="100%" :xAxis="linexAxis" :yAxis="lineyAxis"
|
|
<line-chart-cop class="" height="100%" width="100%" :xAxis="linexAxis" :yAxis="lineyAxis"
|
|
:series="lineSeries" subtext="对风偏差分析图" :dataset="lineDataSet"></line-chart-cop>
|
|
:series="lineSeries" subtext="对风偏差分析图" :dataset="lineDataSet"></line-chart-cop>
|
|
</div>
|
|
</div>
|
|
- <div class="w-[49%] h-[49%] flex flex-col items-end shadow rounded-[6px] shadow-blue-500">
|
|
|
|
|
|
+ <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"
|
|
<el-icon class="mr-[10px] mt-[10px] cursor-pointer" size="18"
|
|
@click="funActCop({ xAxis: scatterxData, yAxis: scatteryData, series: scatterSeries }, 'scatterSingleChartCop')">
|
|
@click="funActCop({ xAxis: scatterxData, yAxis: scatteryData, series: scatterSeries }, 'scatterSingleChartCop')">
|
|
<ZoomIn />
|
|
<ZoomIn />
|