|
@@ -212,47 +212,112 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="height: calc(100% - 125px); padding-bottom: 10px">
|
|
|
- <!-- <ScatterLineChart
|
|
|
- xTitle="风速(m/s)"
|
|
|
- yTitle="功率(kw)"
|
|
|
- :showLegend="true"
|
|
|
- height="100%"
|
|
|
- :lineData="chartLineData"
|
|
|
- :data="chartData"
|
|
|
- /> -->
|
|
|
- <CurrentScatterChart
|
|
|
- ref="chartRef"
|
|
|
- width="100%"
|
|
|
- height="100%"
|
|
|
- :chartTitle="
|
|
|
- avgObj.title +
|
|
|
- ' ' +
|
|
|
- '平均Cp值:' +
|
|
|
- avgObj.cpavg +
|
|
|
- '; 静风频率:' +
|
|
|
- avgObj.frequency +
|
|
|
- '%; 曲线偏差率:' +
|
|
|
- avgObj.pcratio +
|
|
|
- '%'
|
|
|
- "
|
|
|
- :xAxisData="xAxisData"
|
|
|
- :yAxisData="{ splitLine: { show: false } }"
|
|
|
- :seriesData="seriesData"
|
|
|
- :brushSelected="!isChartArea"
|
|
|
- :showLegend="true"
|
|
|
- :dataSet="dataSet"
|
|
|
- />
|
|
|
+ <el-tabs v-model="activeTab">
|
|
|
+ <el-tab-pane label="表格数据" name="1"> </el-tab-pane>
|
|
|
+ <el-tab-pane label="图表展示" name="2"> </el-tab-pane>
|
|
|
+ <table-cop
|
|
|
+ v-show="activeTab === '1'"
|
|
|
+ :data="tableData"
|
|
|
+ :loading="tableLoading"
|
|
|
+ :column="tableColumn"
|
|
|
+ height="calc(100% - 20px)"
|
|
|
+ :tableId="tableShowId"
|
|
|
+ :tableName="tableName"
|
|
|
+ ></table-cop>
|
|
|
+ <div v-show="activeTab === '2'" style="height: 100%">
|
|
|
+ <CurrentScatterChart
|
|
|
+ ref="chartRef"
|
|
|
+ width="100%"
|
|
|
+ height="100%"
|
|
|
+ :chartTitle="
|
|
|
+ avgObj.title +
|
|
|
+ ' ' +
|
|
|
+ '平均Cp值:' +
|
|
|
+ avgObj.cpavg +
|
|
|
+ '; 静风频率:' +
|
|
|
+ avgObj.frequency +
|
|
|
+ '%; 曲线偏差率:' +
|
|
|
+ avgObj.pcratio +
|
|
|
+ '%'
|
|
|
+ "
|
|
|
+ :xAxisData="xAxisData"
|
|
|
+ :yAxisData="{ splitLine: { show: false } }"
|
|
|
+ :seriesData="seriesData"
|
|
|
+ :brushSelected="!isChartArea"
|
|
|
+ :showLegend="true"
|
|
|
+ :dataSet="dataSet"
|
|
|
+ @getSelected="funChartSelect"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </el-tabs>
|
|
|
</div>
|
|
|
+ <el-dialog v-model="wtDialog" width="60%" top="120px" draggable>
|
|
|
+ <template #title>
|
|
|
+ <div class="dialog-title">
|
|
|
+ <div class="title">风机功率点位</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <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="200"
|
|
|
+ align="center"
|
|
|
+ label="时间"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ property="speed"
|
|
|
+ sortable
|
|
|
+ width="140"
|
|
|
+ align="center"
|
|
|
+ label="风速(m/s)"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ property="power"
|
|
|
+ sortable
|
|
|
+ width="140"
|
|
|
+ align="center"
|
|
|
+ label="功率(kW)"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ property="rr"
|
|
|
+ sortable
|
|
|
+ width="140"
|
|
|
+ align="center"
|
|
|
+ label="转速"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ property="filter"
|
|
|
+ sortable
|
|
|
+ width="140"
|
|
|
+ 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>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import ScatterLineChart from "@com/chart/combination/scatter-line-chart.vue";
|
|
|
+// import ScatterLineChart from "@com/chart/combination/scatter-line-chart.vue";
|
|
|
+import tableCop from "./components/table.vue";
|
|
|
import CurrentScatterChart from "./components/current-scatter-chart.vue";
|
|
|
import api1 from "@api/economic/index.js";
|
|
|
-import api from "@api/wisdomOverhaul/energy/index.js";
|
|
|
+// import api from "@api/wisdomOverhaul/energy/index.js";
|
|
|
import dayjs from "dayjs";
|
|
|
-import { getPowerFittingId, getPowerFittingChart } from "@/api/powerAnalyse.js";
|
|
|
+import {
|
|
|
+ getPowerFittingId,
|
|
|
+ getPowerFittingChart,
|
|
|
+ getPowerFittingTable,
|
|
|
+ getPowerFittingSelectedChart,
|
|
|
+} from "@/api/powerAnalyse.js";
|
|
|
export default {
|
|
|
// 名称
|
|
|
name: "healthPowerCurve",
|
|
@@ -261,11 +326,13 @@ export default {
|
|
|
components: {
|
|
|
// ScatterLineChart,
|
|
|
CurrentScatterChart,
|
|
|
+ tableCop,
|
|
|
},
|
|
|
|
|
|
// 数据
|
|
|
data() {
|
|
|
return {
|
|
|
+ activeTab: "2",
|
|
|
checkList: [
|
|
|
{ name: "非并网", code: "isfbw" },
|
|
|
{ name: "非合理值", code: "isfhl" },
|
|
@@ -278,7 +345,6 @@ export default {
|
|
|
{ name: "合并拟合", code: 1 },
|
|
|
// { name: "同名拟合", code: 2 },
|
|
|
],
|
|
|
-
|
|
|
radioList: [
|
|
|
{ name: "一秒钟", code: 1 },
|
|
|
{ name: "一分钟", code: 60 },
|
|
@@ -319,6 +385,14 @@ export default {
|
|
|
xAxisData: [],
|
|
|
dataSet: "",
|
|
|
isChartArea: false,
|
|
|
+ tableShowId: "",
|
|
|
+ tableColumn: [],
|
|
|
+ tableLoading: false,
|
|
|
+ tableName: "",
|
|
|
+ tableData: [],
|
|
|
+ wtTab: "table",
|
|
|
+ wtDialog: false,
|
|
|
+ wtData: [],
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -408,6 +482,7 @@ export default {
|
|
|
if (res.code == 200) {
|
|
|
this.fittingId = res.data.id;
|
|
|
this.getChartData();
|
|
|
+ this.getTableData();
|
|
|
} else {
|
|
|
this.BASE.closeLoading();
|
|
|
this.$message.error(res.msg);
|
|
@@ -543,6 +618,26 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ // 获取表格数据
|
|
|
+ getTableData() {
|
|
|
+ this.tableLoading = true;
|
|
|
+ getPowerFittingTable({
|
|
|
+ id: this.fittingId,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.tableColumn = res.data.title.map((o) => {
|
|
|
+ return {
|
|
|
+ prop: o.key,
|
|
|
+ width: o.des === "时间" ? 100 : 80,
|
|
|
+ label: o.des,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ this.tableData = res.data.data;
|
|
|
+ this.$message.success(res.msg);
|
|
|
+ }
|
|
|
+ this.tableLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
// 获取图表数据
|
|
|
getChartData() {
|
|
|
getPowerFittingChart({
|
|
@@ -663,6 +758,78 @@ export default {
|
|
|
this.getChartId();
|
|
|
}
|
|
|
},
|
|
|
+ async funChartSelect(batch) {
|
|
|
+ const wDataArr = [];
|
|
|
+ const yDataArr = [];
|
|
|
+ let scatterls = [];
|
|
|
+ let scatterhs = [];
|
|
|
+ let dataSetObj = [];
|
|
|
+ this.wtData = [];
|
|
|
+ if (batch?.length && this.dataSet) {
|
|
|
+ scatterls = batch[0].selected[2].dataIndex;
|
|
|
+ scatterhs = batch[0].selected[3].dataIndex;
|
|
|
+ if (scatterls?.length || scatterhs?.length) {
|
|
|
+ dataSetObj = JSON.parse(this.dataSet);
|
|
|
+ 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 getPowerFittingSelectedChart({
|
|
|
+ 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++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.wtDialog = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.wtTab = "table";
|
|
|
+ this.wtData = tempArr;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
|
|
|
created() {
|
|
@@ -784,5 +951,24 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .el-tabs ::v-deep {
|
|
|
+ height: 100%;
|
|
|
+ .el-tabs__item {
|
|
|
+ color: #b3b3b3;
|
|
|
+ }
|
|
|
+ .el-tabs__nav-wrap::after {
|
|
|
+ background-color: #14221f;
|
|
|
+ }
|
|
|
+ .el-tabs__active-bar {
|
|
|
+ background-color: #05bb4c;
|
|
|
+ }
|
|
|
+ .el-tabs__item.is-active,
|
|
|
+ .el-tabs__item:hover {
|
|
|
+ color: #05bb4c;
|
|
|
+ }
|
|
|
+ .el-tabs__content {
|
|
|
+ height: calc(100% - 40px);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|