|
@@ -266,7 +266,7 @@
|
|
|
<div class="title">风机功率点位</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <el-tabs v-model="wtTab">
|
|
|
+ <el-tabs v-model="wtTab" @tab-click="handleClick">
|
|
|
<el-tab-pane label="数据" name="table">
|
|
|
<el-table :data="wtData" row-key="id" :max-height="550">
|
|
|
<el-table-column property="wtId" align="center" label="风机" />
|
|
@@ -307,8 +307,66 @@
|
|
|
/>
|
|
|
</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-tab-pane label="故障" name="problem">
|
|
|
+ <el-table :data="faultData" 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="tx"
|
|
|
+ sortable
|
|
|
+ align="center"
|
|
|
+ label="特性"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ property="bj"
|
|
|
+ sortable
|
|
|
+ align="center"
|
|
|
+ label="部件"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ property="alarmname"
|
|
|
+ sortable
|
|
|
+ align="center"
|
|
|
+ label="描述"
|
|
|
+ />
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="预警" name="warning">
|
|
|
+ <el-table :data="warnData" 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="tx"
|
|
|
+ sortable
|
|
|
+ align="center"
|
|
|
+ label="特性"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ property="bj"
|
|
|
+ sortable
|
|
|
+ align="center"
|
|
|
+ label="部件"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ property="alarmname"
|
|
|
+ sortable
|
|
|
+ align="center"
|
|
|
+ label="描述"
|
|
|
+ />
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -330,6 +388,9 @@ import {
|
|
|
import {
|
|
|
getApiequipmentListByWp2
|
|
|
} from "@/api/monthlyPerformanceAnalysis";
|
|
|
+import {
|
|
|
+ getWindFittingAlarms
|
|
|
+} from "@/api/powerGenerating/index.js";
|
|
|
import dataJson from "./dataJson.json"
|
|
|
export default {
|
|
|
// 名称
|
|
@@ -404,6 +465,7 @@ export default {
|
|
|
tableName: "",
|
|
|
tableData: [],
|
|
|
wtTab: "table",
|
|
|
+ allpowerFittingData: [],
|
|
|
wtDialog: false,
|
|
|
wtData: [],
|
|
|
isMultiple: false,
|
|
@@ -847,6 +909,34 @@ export default {
|
|
|
this.getChartId();
|
|
|
}
|
|
|
},
|
|
|
+ handleClick(val) {
|
|
|
+ this.wtTab = val;
|
|
|
+ if (this.wtTab === "problem") {
|
|
|
+ this.faultDataFn();
|
|
|
+ } else if (this.wtTab === "warning") {
|
|
|
+ this.warnDataFn();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //故障数据
|
|
|
+ async faultDataFn() {
|
|
|
+ let params = {
|
|
|
+ // only: dataRadom.value,
|
|
|
+ alarmList: this.allpowerFittingData,
|
|
|
+ table: "alarmWt",
|
|
|
+ };
|
|
|
+ const faultRes = await getWindFittingAlarms(params);
|
|
|
+ this.faultData = faultRes.data;
|
|
|
+ },
|
|
|
+ //预警数据
|
|
|
+ async warnDataFn() {
|
|
|
+ let params = {
|
|
|
+ // only: dataRadom.value,
|
|
|
+ alarmList: this.allpowerFittingData,
|
|
|
+ table: "alarmCt",
|
|
|
+ };
|
|
|
+ const warnRes = await getWindFittingAlarms(params);
|
|
|
+ this.warnData.value = warnRes.data;
|
|
|
+ },
|
|
|
async funChartSelect(batch) {
|
|
|
const wDataArr = [];
|
|
|
const yDataArr = [];
|
|
@@ -873,6 +963,14 @@ export default {
|
|
|
yk: yDataArr.join(","),
|
|
|
wk: wDataArr.join(","),
|
|
|
});
|
|
|
+ this.allpowerFittingData = [];
|
|
|
+ wtRes.data.forEach((it) => {
|
|
|
+ let obj = {
|
|
|
+ wtId: it.wtId,
|
|
|
+ time: it.time,
|
|
|
+ };
|
|
|
+ this.allpowerFittingData.push(obj);
|
|
|
+ });
|
|
|
if (wtRes.code === 200) {
|
|
|
let id = 1;
|
|
|
const tempArr = []; //用于以风机id 聚合dataArr
|