|
@@ -350,6 +350,10 @@
|
|
|
import hlsVideo from "./component/hls.vue";
|
|
|
import dataJson from "./component/dataBJJson.json"
|
|
|
import weatherDialog from "./component/weatherDia.vue"
|
|
|
+ import dayjs from "dayjs";
|
|
|
+ import {
|
|
|
+ alarm_history,
|
|
|
+ } from "@/api/zhbj/index.js";
|
|
|
export default {
|
|
|
// 名称
|
|
|
name: "SandTable",
|
|
@@ -554,35 +558,55 @@
|
|
|
data: [],
|
|
|
},
|
|
|
sels: {
|
|
|
- column: [{
|
|
|
- name: "风机编号",
|
|
|
- field: "windPowerStationId"
|
|
|
+ column: [
|
|
|
+ // {
|
|
|
+ // name: "风机编号",
|
|
|
+ // field: "windPowerStationId"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // name: "停机时间",
|
|
|
+ // field: "stopTime",
|
|
|
+ // width: "120px"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // name: "时长",
|
|
|
+ // field: "stopHours"
|
|
|
+ // }
|
|
|
+ {
|
|
|
+ name: "机组",
|
|
|
+ field: "code",
|
|
|
+ width: "60px",
|
|
|
},
|
|
|
{
|
|
|
- name: "停机时间",
|
|
|
- field: "stopTime",
|
|
|
- width: "120px"
|
|
|
+ name: "预警时间",
|
|
|
+ field: "selsTime",
|
|
|
},
|
|
|
{
|
|
|
- name: "时长",
|
|
|
- field: "stopHours"
|
|
|
- }
|
|
|
+ name: "状态",
|
|
|
+ field: "isCloseName",
|
|
|
+ width: "60px",
|
|
|
+ },
|
|
|
],
|
|
|
data: []
|
|
|
},
|
|
|
rmls: {
|
|
|
column: [{
|
|
|
- name: "风机编号",
|
|
|
- field: "wtId",
|
|
|
+ // name: "风机编号",
|
|
|
+ name: "机组",
|
|
|
+ field: "code",
|
|
|
+ width: "60px",
|
|
|
},
|
|
|
{
|
|
|
- name: "推荐时间",
|
|
|
- field: "recodedate",
|
|
|
- width: "120px",
|
|
|
+ // name: "推荐时间",
|
|
|
+ name: "报警时间",
|
|
|
+ field: "rmlsTime",
|
|
|
},
|
|
|
{
|
|
|
- name: "类型",
|
|
|
- field: "operation",
|
|
|
+ // name: "类型",
|
|
|
+ name: "状态",
|
|
|
+ // field: "operation",
|
|
|
+ field: "isCloseName",
|
|
|
+ width: "60px",
|
|
|
},
|
|
|
],
|
|
|
data: [],
|
|
@@ -613,67 +637,65 @@
|
|
|
|
|
|
getWtInfo() {
|
|
|
let that = this;
|
|
|
+ that.bjChartData = dataJson.data.bjChartData;
|
|
|
+ that.warnChartData = dataJson.data.warnChartData;
|
|
|
that.tqmap1 = dataJson.data.tqmap1;
|
|
|
that.sels.data = dataJson.data.sels.data;
|
|
|
that.rmls.data = dataJson.data.rmls.data;
|
|
|
that.gxkmap = dataJson.data.gxkmap;
|
|
|
- that.API.requestData({
|
|
|
- method: "POST",
|
|
|
- subUrl: "sandtable/findWtInfo",
|
|
|
- data: {
|
|
|
- wpId: that.wpId,
|
|
|
- },
|
|
|
- success(res) {
|
|
|
- res.data.tqmap5.ls.forEach((ele) => {
|
|
|
- ele.time = new Date(ele.time).formatDate("yyyy-MM-dd hh:mm");
|
|
|
- });
|
|
|
-
|
|
|
- const keys = ["wd", "sd"];
|
|
|
- let weatherChart = [{
|
|
|
- title: "温度",
|
|
|
- smooth: true,
|
|
|
- value: [],
|
|
|
- },
|
|
|
- {
|
|
|
- title: "湿度",
|
|
|
- smooth: true,
|
|
|
- value: [],
|
|
|
- },
|
|
|
- ];
|
|
|
-
|
|
|
- keys.forEach((key, keyIndex) => {
|
|
|
- res.data.tqmap5.ls.forEach((ele) => {
|
|
|
- weatherChart[keyIndex].value.push({
|
|
|
- text: ele.time,
|
|
|
- value: ele[key],
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
-
|
|
|
- that.tqmap1 = res.data.tqmap1;
|
|
|
- that.tqmap5 = res.data.tqmap5.ls;
|
|
|
-
|
|
|
- res.data.sels.forEach((ele) => {
|
|
|
- ele.stopTime = new Date(ele.stopTime).formatDate(
|
|
|
- "yyyy-MM-dd hh:mm:ss"
|
|
|
- );
|
|
|
- ele.startTime = new Date(ele.stopTime).formatDate(
|
|
|
- "yyyy-MM-dd hh:mm:ss"
|
|
|
- );
|
|
|
- });
|
|
|
-
|
|
|
- res.data.rmls.forEach((ele) => {
|
|
|
- ele.recodedate = new Date(ele.recodedate).formatDate(
|
|
|
- "yyyy-MM-dd hh:mm:ss"
|
|
|
- );
|
|
|
- });
|
|
|
+
|
|
|
+ let dateTime = [
|
|
|
+ dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"),
|
|
|
+ dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
|
|
+ ];
|
|
|
+ let params = {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 5,
|
|
|
+ alarmId: "",
|
|
|
+ modelId: "",
|
|
|
+ components: "",
|
|
|
+ description: "",
|
|
|
+ begin: dateTime[0],
|
|
|
+ end: dateTime[1]
|
|
|
+ };
|
|
|
+ //预警
|
|
|
+ this.getAlarmHistoryt(params, 'custom')
|
|
|
+ //报警
|
|
|
+ this.getAlarmHistoryt(params, 'history')
|
|
|
+ },
|
|
|
+ // 获取历史记录表
|
|
|
+ async getAlarmHistoryt(params, type) {
|
|
|
|
|
|
- that.sels.data = res.data.sels;
|
|
|
- that.rmls.data = res.data.rmls;
|
|
|
- that.gxkmap = res.data.gxkmap;
|
|
|
- that.weatherChart = weatherChart;
|
|
|
- }
|
|
|
- });
|
|
|
+ if (type === 'history') {
|
|
|
+ params.alarmType = 'windturbine',
|
|
|
+ params.stationid = 'NX_FGS_HA_FDC_STA',
|
|
|
+ params.deviceid = ""
|
|
|
+ } else {
|
|
|
+ params.alarmType = 'custom',
|
|
|
+ params.stationid = 'NX_FGS_HA_FDC_STA',
|
|
|
+ params.deviceid = "",
|
|
|
+ params.deviceType = "windturbine"
|
|
|
+ }
|
|
|
+
|
|
|
+ const { data } = await alarm_history(params);
|
|
|
+
|
|
|
+ if (type === 'history') {
|
|
|
+ data?.ls?.forEach((ele) => {
|
|
|
+ ele.isCloseName = ele.endts ? "已解除" : "未解除";
|
|
|
+ ele.rmlsTime = ele.ts > 0 ? this.formatTime(ele.ts) : "--";
|
|
|
+ });
|
|
|
+ this.rmls.data = data?.ls;
|
|
|
+ } else {
|
|
|
+ data?.ls?.forEach((ele) => {
|
|
|
+ ele.isCloseName = ele.endts ? "已解除" : "未解除";
|
|
|
+ ele.selsTime = ele.ts > 0 ? this.formatTime(ele.ts) : "--";
|
|
|
+ });
|
|
|
+ this.sels.data = data?.ls;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 时间格式化
|
|
|
+ formatTime(val) {
|
|
|
+ return dayjs(val).format("YYYY-MM-DD HH:mm:ss");
|
|
|
},
|
|
|
|
|
|
// 获取中部地图数据
|
|
@@ -694,7 +716,6 @@
|
|
|
// 获取报警玫瑰图
|
|
|
getWarnMGT() {
|
|
|
let that = this;
|
|
|
- that.warnChartData = dataJson.data.warnChartData;
|
|
|
that.API.requestData({
|
|
|
method: "GET",
|
|
|
baseURL: "http://192.168.1.82:8075/",
|
|
@@ -743,7 +764,6 @@
|
|
|
// 获取库存玫瑰图
|
|
|
getRepertoryMGT() {
|
|
|
let that = this;
|
|
|
- that.bjChartData = dataJson.data.bjChartData;
|
|
|
that.API.requestData({
|
|
|
method: "GET",
|
|
|
baseURL: "http://10.155.32.4:9988/",
|
|
@@ -941,10 +961,10 @@
|
|
|
},
|
|
|
created() {
|
|
|
this.getWtInfo();
|
|
|
- this.getWpHealthInfo();
|
|
|
- this.getTop4Info();
|
|
|
- this.getWarnMGT();
|
|
|
- this.getRepertoryMGT();
|
|
|
+ // this.getWpHealthInfo();
|
|
|
+ // this.getTop4Info();
|
|
|
+ // this.getWarnMGT();
|
|
|
+ // this.getRepertoryMGT();
|
|
|
this.timeStr = new Date().formatDate("MM-dd hh:mm");
|
|
|
this.timmer1 = setInterval(() => {
|
|
|
this.timeStr = new Date().formatDate("MM-dd hh:mm");
|