|
@@ -63,6 +63,9 @@
|
|
|
class="alarm-table"
|
|
|
border
|
|
|
style="width: 100%; height: 100%"
|
|
|
+ height="100%"
|
|
|
+ header-cell-style="height:30px;padding:4px 0;"
|
|
|
+ cell-style="height:30px;padding:4px 0;"
|
|
|
>
|
|
|
<el-table-column
|
|
|
prop="scadaTime"
|
|
@@ -525,7 +528,7 @@ export default {
|
|
|
const data = { type: 1 };
|
|
|
let res = await this.getScadaData(data);
|
|
|
try {
|
|
|
- if (res && res.hasOwnProperty('code') && res.code == 1) {
|
|
|
+ if (res && res.hasOwnProperty("code") && res.code == 1) {
|
|
|
var scada = (this.scada = {});
|
|
|
res.result.map((e) => {
|
|
|
if (e.allocations) {
|
|
@@ -553,13 +556,14 @@ export default {
|
|
|
getAlarmData() {
|
|
|
if (this.indexCodes.length < 1) return;
|
|
|
const frontHelfTime = parseTime(
|
|
|
- new Date(new Date().getTime() - 1 * 60 * 30 * 1000),
|
|
|
+ new Date(new Date().getTime() - 1 * 60 * 60 * 1000),
|
|
|
"{y}-{m}-{d} {h}:{i}:{s}"
|
|
|
);
|
|
|
const nowTime = parseTime(new Date(), "{y}-{m}-{d} {h}:{i}:{s}");
|
|
|
const params = {
|
|
|
codes: this.indexCodes.toString(), //指标编码
|
|
|
- status: 0, //处理状态未处理
|
|
|
+ //status: 0, //处理状态未处理
|
|
|
+ dealStatus: 0, //处理状态 未处理
|
|
|
start: frontHelfTime,
|
|
|
end: nowTime,
|
|
|
current: 1,
|
|
@@ -568,7 +572,7 @@ export default {
|
|
|
|
|
|
getScadaAlarmDataPage(params)
|
|
|
.then((res) => {
|
|
|
- if (res && res.hasOwnProperty('code') && res.code == 1) {
|
|
|
+ if (res && res.hasOwnProperty("code") && res.code == 1) {
|
|
|
let result = res.result.records;
|
|
|
result.forEach((item) => {
|
|
|
let scadaTime =
|
|
@@ -581,9 +585,7 @@ export default {
|
|
|
this.isOpenAlarmList = this.tableData.length > 0 ? true : false;
|
|
|
}
|
|
|
})
|
|
|
- .catch((ex) => {
|
|
|
-
|
|
|
- });
|
|
|
+ .catch((ex) => {});
|
|
|
},
|
|
|
|
|
|
setSide() {
|
|
@@ -624,46 +626,48 @@ export default {
|
|
|
data: {
|
|
|
type: 1,
|
|
|
},
|
|
|
- }).then((res) => {
|
|
|
- if (res && res.hasOwnProperty('code') && res.code == 1) {
|
|
|
- res = res.result;
|
|
|
- for (var item in res) {
|
|
|
- var di = res[item];
|
|
|
- if (di.allocations) {
|
|
|
- for (const i in di.allocations) {
|
|
|
- var t = di.allocations[i].variableCode;
|
|
|
- if (infos.hasOwnProperty(t)) {
|
|
|
- let n = di.allocations[i]
|
|
|
- ? di.allocations[i].scada.value
|
|
|
- : "null";
|
|
|
- if (n == "null") n = "-";
|
|
|
- if (t == "S7.300.1#F_POWER_FAULT")
|
|
|
- n = n == "1" ? "开" : "关";
|
|
|
- if (t == "S7.300.1#F_OPEN") n = n == "1" ? "开" : "关";
|
|
|
- if (t == "S7.300.2#F_OPEN") n = n == "1" ? "开" : "关";
|
|
|
- if (t == "S7.300.2#F_POWER_FAULT")
|
|
|
- n = n == "1" ? "开" : "关";
|
|
|
- if (t == "S7.300.CHU_SS") n = parseFloat(n).toFixed(3);
|
|
|
- if (t == "S7.300.CHU_CL") n = parseFloat(n).toFixed(3);
|
|
|
- if (t == "S7.300.CHU_FT") n = parseFloat(n).toFixed(3);
|
|
|
- if (t == "S7.300.1#QSYW") n = parseFloat(n).toFixed(3);
|
|
|
- if (t == "S7.300.2#QSYW") n = parseFloat(n).toFixed(3);
|
|
|
- infos[t].innerHTML = n;
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res && res.hasOwnProperty("code") && res.code == 1) {
|
|
|
+ res = res.result;
|
|
|
+ for (var item in res) {
|
|
|
+ var di = res[item];
|
|
|
+ if (di.allocations) {
|
|
|
+ for (const i in di.allocations) {
|
|
|
+ var t = di.allocations[i].variableCode;
|
|
|
+ if (infos.hasOwnProperty(t)) {
|
|
|
+ let n = di.allocations[i]
|
|
|
+ ? di.allocations[i].scada.value
|
|
|
+ : "null";
|
|
|
+ if (n == "null") n = "-";
|
|
|
+ if (t == "S7.300.1#F_POWER_FAULT")
|
|
|
+ n = n == "1" ? "开" : "关";
|
|
|
+ if (t == "S7.300.1#F_OPEN") n = n == "1" ? "开" : "关";
|
|
|
+ if (t == "S7.300.2#F_OPEN") n = n == "1" ? "开" : "关";
|
|
|
+ if (t == "S7.300.2#F_POWER_FAULT")
|
|
|
+ n = n == "1" ? "开" : "关";
|
|
|
+ if (t == "S7.300.CHU_SS") n = parseFloat(n).toFixed(3);
|
|
|
+ if (t == "S7.300.CHU_CL") n = parseFloat(n).toFixed(3);
|
|
|
+ if (t == "S7.300.CHU_FT") n = parseFloat(n).toFixed(3);
|
|
|
+ if (t == "S7.300.1#QSYW") n = parseFloat(n).toFixed(3);
|
|
|
+ if (t == "S7.300.2#QSYW") n = parseFloat(n).toFixed(3);
|
|
|
+ infos[t].innerHTML = n;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ this.nextDo = setTimeout(loadInfo, 1000 * 10); //10秒一次
|
|
|
+ this.setAlarm(res, infos);
|
|
|
+ } else {
|
|
|
+ // this.$message.error("获取指标失败:" + res.message);
|
|
|
+ this.nextDo = setTimeout(loadInfo, 1000 * 10); //10秒一次
|
|
|
}
|
|
|
+ //this.loading = false;
|
|
|
+ })
|
|
|
+ .catch((ex) => {
|
|
|
+ this.$message.error("连接异常:" + ex);
|
|
|
this.nextDo = setTimeout(loadInfo, 1000 * 10); //10秒一次
|
|
|
- this.setAlarm(res, infos);
|
|
|
- } else{
|
|
|
- // this.$message.error("获取指标失败:" + res.message);
|
|
|
- this.nextDo = setTimeout(loadInfo, 1000 * 10); //10秒一次
|
|
|
- }
|
|
|
- //this.loading = false;
|
|
|
- }).catch(ex=>{
|
|
|
- this.$message.error("连接异常:" + ex);
|
|
|
- this.nextDo = setTimeout(loadInfo, 1000 * 10); //10秒一次
|
|
|
- });
|
|
|
+ });
|
|
|
this.getAlarmData();
|
|
|
};
|
|
|
this.$nextTick(loadSite);
|
|
@@ -675,7 +679,7 @@ export default {
|
|
|
return new Promise((resolve) => {
|
|
|
getScadaData(data)
|
|
|
.then((res) => {
|
|
|
- if (res && res.hasOwnProperty('code') && res.code == 1) {
|
|
|
+ if (res && res.hasOwnProperty("code") && res.code == 1) {
|
|
|
res.result;
|
|
|
resolve({
|
|
|
code: 1,
|
|
@@ -686,7 +690,7 @@ export default {
|
|
|
resolve({
|
|
|
code: 0,
|
|
|
result: [],
|
|
|
- message: '获取数据异常:'+res,
|
|
|
+ message: "获取数据异常:" + res,
|
|
|
});
|
|
|
})
|
|
|
.catch((ex) => {
|
|
@@ -796,8 +800,7 @@ export default {
|
|
|
top: 10px;
|
|
|
right: 10px;
|
|
|
background: rgba(255, 255, 255, 0.8);
|
|
|
- .alarm-table {
|
|
|
- }
|
|
|
+ z-index: 999;
|
|
|
}
|
|
|
}
|
|
|
|