|
@@ -148,7 +148,35 @@
|
|
|
</panel>
|
|
|
<div class="table-info">
|
|
|
<panel class="table-panel" :title="'当日报警记录'" :showLine="false">
|
|
|
- <Table :data="warnTableData" :canScroll="true" :height="'100%'" />
|
|
|
+ <el-table
|
|
|
+ :data="warnTableData.data"
|
|
|
+ height="calc(100% - 33px)"
|
|
|
+ stripe
|
|
|
+ size="mini"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ v-for="(item, index) in warnTableData.column"
|
|
|
+ :key="index"
|
|
|
+ align="center"
|
|
|
+ :label="item.name"
|
|
|
+ :prop="item.field"
|
|
|
+ />
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ v-if="warnPage.total > 0"
|
|
|
+ hide-on-single-page
|
|
|
+ style="text-align: center"
|
|
|
+ @current-change="
|
|
|
+ (val) => {
|
|
|
+ warnPage.pageNum = val;
|
|
|
+ getWarnTableData();
|
|
|
+ }
|
|
|
+ "
|
|
|
+ :current-page="warnPage.pageNum"
|
|
|
+ :page-size="warnPage.pageSize"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="warnPage.total"
|
|
|
+ ></el-pagination>
|
|
|
</panel>
|
|
|
<panel class="table-panel" :title="'当日故障记录'" :showLine="false">
|
|
|
<Table :data="stopTableData" :canScroll="true" :height="'100%'" />
|
|
@@ -382,7 +410,35 @@
|
|
|
:title="'当日报警记录'"
|
|
|
:showLine="false"
|
|
|
>
|
|
|
- <Table :data="warnTableData" :canScroll="true" :height="'23vh'" />
|
|
|
+ <el-table
|
|
|
+ :data="warnTableData.data"
|
|
|
+ height="calc(100% - 33px)"
|
|
|
+ stripe
|
|
|
+ size="mini"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ v-for="(item, index) in warnTableData.column"
|
|
|
+ :key="index"
|
|
|
+ align="center"
|
|
|
+ :label="item.name"
|
|
|
+ :prop="item.field"
|
|
|
+ />
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ v-if="warnPage.total > 0"
|
|
|
+ hide-on-single-page
|
|
|
+ style="text-align: center"
|
|
|
+ @current-change="
|
|
|
+ (val) => {
|
|
|
+ warnPage.pageNum = val;
|
|
|
+ getWarnTableData();
|
|
|
+ }
|
|
|
+ "
|
|
|
+ :current-page="warnPage.pageNum"
|
|
|
+ :page-size="warnPage.pageSize"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="warnPage.total"
|
|
|
+ ></el-pagination>
|
|
|
</panel>
|
|
|
<panel
|
|
|
class="table-panel outline"
|
|
@@ -879,7 +935,8 @@ import RadarChart from "@/components/chart/radar/radar-chart.vue";
|
|
|
import panel from "@/components/coms/panel/panel.vue";
|
|
|
import Table from "@/components/coms/table/table.vue";
|
|
|
import randerNewChart from "./raderswithhart.vue";
|
|
|
-
|
|
|
+import dayjs from "dayjs";
|
|
|
+import { alarm_history } from "@/api/zhbj/index.js";
|
|
|
import {
|
|
|
getApifindWtRealPowerChar,
|
|
|
getApigetplotBands,
|
|
@@ -969,26 +1026,26 @@ export default {
|
|
|
column: [
|
|
|
{
|
|
|
name: "风机",
|
|
|
- field: "windturbineid",
|
|
|
+ field: "code",
|
|
|
is_num: false,
|
|
|
is_light: false,
|
|
|
},
|
|
|
{
|
|
|
name: "描述",
|
|
|
- field: "warnDesc",
|
|
|
+ field: "description",
|
|
|
is_num: false,
|
|
|
is_light: false,
|
|
|
},
|
|
|
{
|
|
|
name: "报警时间",
|
|
|
- field: "warningtime",
|
|
|
+ field: "ts",
|
|
|
is_num: false,
|
|
|
is_light: false,
|
|
|
},
|
|
|
],
|
|
|
data: [],
|
|
|
},
|
|
|
-
|
|
|
+ warnPage: { pageSize: 5, pageNum: 1, total: 0 },
|
|
|
stopTableData: {
|
|
|
column: [
|
|
|
{
|
|
@@ -1355,23 +1412,42 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// tab1 - 获取当日报警数据
|
|
|
- async getWarnData() {
|
|
|
- let that = this;
|
|
|
+ async getWarnTableData() {
|
|
|
let params = {
|
|
|
- wtId: that.wtId,
|
|
|
- recorddate: that.recorddate,
|
|
|
- pageNum: "1",
|
|
|
- pageSize: "5",
|
|
|
+ pageNum: this.warnPage.pageNum,
|
|
|
+ pageSize: this.warnPage.pageSize,
|
|
|
+ alarmId: "",
|
|
|
+ alarmType: "windturbine",
|
|
|
+ stationid: this.wpId,
|
|
|
+ deviceid: this.wtId,
|
|
|
+ modelId: "",
|
|
|
+ components: "",
|
|
|
+ description: "",
|
|
|
+ begin:
|
|
|
+ dayjs(this.recorddate).format("YYYY-MM-DD") !=
|
|
|
+ dayjs(new Date()).format("YYYY-MM-DD")
|
|
|
+ ? dayjs(this.recorddate)
|
|
|
+ .startOf("day")
|
|
|
+ .format("YYYY-MM-DD HH:mm:ss")
|
|
|
+ : dayjs(new Date()).startOf("day").format("YYYY-MM-DD HH:mm:ss"),
|
|
|
+ end:
|
|
|
+ dayjs(this.recorddate).format("YYYY-MM-DD") !=
|
|
|
+ dayjs(new Date()).format("YYYY-MM-DD")
|
|
|
+ ? dayjs(this.recorddate).endOf("day").format("YYYY-MM-DD HH:mm:ss")
|
|
|
+ : dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
|
|
|
};
|
|
|
- // const { data: datas } = await getApibjjllist(params);
|
|
|
- // if (datas && datas.data && datas.data.records.length > 0) {
|
|
|
- // datas.data.records.forEach((ele) => {
|
|
|
- // ele.warningtime = new Date(ele.warningtime).formatDate(
|
|
|
- // "yyyy-MM-dd hh:mm:ss"
|
|
|
- // );
|
|
|
- // });
|
|
|
- // that.warnTableData.data = datas.data.records;
|
|
|
- // }
|
|
|
+ const { data: datas } = await alarm_history(params);
|
|
|
+
|
|
|
+ if (datas && datas.ls && datas.ls.length > 0) {
|
|
|
+ datas.ls.forEach((ele) => {
|
|
|
+ ele.ts = dayjs(ele.ts).format("YYYY-MM-DD HH:mm:ss");
|
|
|
+ });
|
|
|
+ this.warnTableData.data = datas.ls;
|
|
|
+ this.warnPage.total = datas.total;
|
|
|
+ } else {
|
|
|
+ this.warnTableData.data = [];
|
|
|
+ this.warnPage.total = 0;
|
|
|
+ }
|
|
|
},
|
|
|
// tab1 - 获取当日故障数据
|
|
|
async getStopData() {
|
|
@@ -1752,11 +1828,11 @@ export default {
|
|
|
if (this.tabIndex === 0) {
|
|
|
this.getLostChartData();
|
|
|
this.getPowerChartData();
|
|
|
- this.getWarnData();
|
|
|
+ this.getWarnTableData();
|
|
|
this.getStopData();
|
|
|
this.getXdData();
|
|
|
} else if (this.tabIndex === 1) {
|
|
|
- this.getWarnData();
|
|
|
+ this.getWarnTableData();
|
|
|
this.getStopData();
|
|
|
this.getDayPowerInfo();
|
|
|
this.getMonthWarnRecord();
|
|
@@ -1893,6 +1969,7 @@ export default {
|
|
|
flex-wrap: wrap;
|
|
|
justify-content: space-between;
|
|
|
height: 100%;
|
|
|
+ color: #05bb4c;
|
|
|
&.month-3 {
|
|
|
.info-item {
|
|
|
height: calc((100% - 8px * 4) / 5);
|
|
@@ -1939,7 +2016,7 @@ export default {
|
|
|
|
|
|
.value {
|
|
|
font-size: 16px;
|
|
|
- color: #1c99ff;
|
|
|
+ color: #05bb4c;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1987,7 +2064,7 @@ export default {
|
|
|
.dot {
|
|
|
width: 7px;
|
|
|
height: 7px;
|
|
|
- background: #0046c7;
|
|
|
+ background: #05bb4c;
|
|
|
display: inline-block;
|
|
|
margin-right: 8px;
|
|
|
}
|
|
@@ -2023,7 +2100,7 @@ export default {
|
|
|
.dot {
|
|
|
width: 7px;
|
|
|
height: 7px;
|
|
|
- background: #0046c7;
|
|
|
+ background: #05bb4c;
|
|
|
display: inline-block;
|
|
|
margin-right: 8px;
|
|
|
}
|