update alert list screen
This commit is contained in:
부모
9c3b9218d2
커밋
822732742d
@ -21,7 +21,7 @@ const store = useWsStore();
|
||||
connect0(store);
|
||||
|
||||
const alarmList = ref(
|
||||
(store.data1.alarmArrList || []).map((item, index) => ({
|
||||
(store.mainDataAlarm.alarmArrList || []).map((item, index) => ({
|
||||
id: item.id,
|
||||
eqName: item.equipmentName,
|
||||
eqIndex: index + 1,
|
||||
@ -30,16 +30,16 @@ const alarmList = ref(
|
||||
position: `${item.productLine} - ${item.segment}`,
|
||||
}))
|
||||
);
|
||||
// store.$subscribe((mutation, state) => {
|
||||
// alarmList.value = state.data1.alarmArrList.map((item, index) => ({
|
||||
// id: item.id,
|
||||
// eqName: item.equipmentName,
|
||||
// eqIndex: index + 1,
|
||||
// alarmGrade: item.alarmLevel,
|
||||
// alarmDetail: item.alarmDetails,
|
||||
// position: `${item.productLine} - ${item.segment}`,
|
||||
// }));
|
||||
// });
|
||||
store.$subscribe((mutation, state) => {
|
||||
alarmList.value = state.mainDataAlarm.alarmArrList.map((item, index) => ({
|
||||
id: item.id,
|
||||
eqName: item.equipmentName,
|
||||
eqIndex: index + 1,
|
||||
alarmGrade: item.alarmLevel,
|
||||
alarmDetail: item.alarmDetails,
|
||||
position: `${item.productLine} - ${item.segment}`,
|
||||
}));
|
||||
});
|
||||
|
||||
// function handleIgnore() {
|
||||
// alarmList.value.splice(0)
|
||||
@ -65,14 +65,13 @@ function handleResolutionChange(width, height) {
|
||||
<el-table
|
||||
class="dark-table"
|
||||
:data="alarmList"
|
||||
:show-overflow-tooltip="true"
|
||||
row-class-name="dark-row"
|
||||
header-row-class-name="dark-header"
|
||||
>
|
||||
<el-table-column
|
||||
prop="eqName"
|
||||
label="设备名"
|
||||
width="80"
|
||||
width="90"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="eqIndex"
|
||||
@ -81,15 +80,34 @@ function handleResolutionChange(width, height) {
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="alarmGrade"
|
||||
label="报警等级"
|
||||
width="100"
|
||||
label="等级"
|
||||
width="60"
|
||||
></el-table-column>
|
||||
<el-table-column prop="alarmDetail" label="报警细节">
|
||||
<template v-slot="{ row }">
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
:content="row.alarmDetail || '---'"
|
||||
placement="top-start"
|
||||
>
|
||||
<span
|
||||
style="
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
"
|
||||
>{{ row.alarmDetail || "---" }}</span
|
||||
>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="alarmDetail"
|
||||
label="报警细节"
|
||||
width="144"
|
||||
prop="position"
|
||||
width="128"
|
||||
label="定位"
|
||||
></el-table-column>
|
||||
<el-table-column prop="position" label="定位"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- <button @click="handleIgnore" class="alert-btn">忽略</button> -->
|
||||
@ -182,7 +200,7 @@ function handleResolutionChange(width, height) {
|
||||
|
||||
.alert-list {
|
||||
height: calc(100% - 56px);
|
||||
width: 520px;
|
||||
width: 640px;
|
||||
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
|
@ -4,7 +4,6 @@ import * as echarts from "echarts";
|
||||
import Container from "../Base/Container.vue";
|
||||
import { useWsStore } from "../../store";
|
||||
|
||||
|
||||
const setupFn = (chart, datalist = [0.0, 0.0, 0.0, 0.0]) => {
|
||||
console.log("datalist", datalist);
|
||||
const option = {
|
||||
@ -79,14 +78,14 @@ function loadData(yieldArray) {
|
||||
if (yieldArray == undefined || yieldArray?.length == 0) return null;
|
||||
for (let i = 0; i < yieldArray.length; ++i) {
|
||||
if (yieldArray[i].name == "钢1线") {
|
||||
result[0] = parseInt(yieldArray[i].data);
|
||||
result[0] = parseFloat(yieldArray[i].data) || 0;
|
||||
} else if (yieldArray[i].name == "钢2线") {
|
||||
result[1] = parseInt(yieldArray[i].data);
|
||||
result[1] = parseFloat(yieldArray[i].data) || 0;
|
||||
} else if (yieldArray[i].name == "钢3线") {
|
||||
result[2] = parseInt(yieldArray[i].data);
|
||||
result[2] = parseFloat(yieldArray[i].data) || 0;
|
||||
} else {
|
||||
// 合计
|
||||
result[3] = parseInt(yieldArray[i].data);
|
||||
result[3] = parseFloat(yieldArray[i].data) || 0;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -79,14 +79,14 @@ function loadData(yieldArray) {
|
||||
if (yieldArray == undefined || yieldArray?.length == 0) return null;
|
||||
for (let i = 0; i < yieldArray.length; ++i) {
|
||||
if (yieldArray[i].name == "钢1线") {
|
||||
result[0] = parseInt(yieldArray[i].data);
|
||||
result[0] = parseFloat(yieldArray[i].data) || 0;
|
||||
} else if (yieldArray[i].name == "钢2线") {
|
||||
result[1] = parseInt(yieldArray[i].data);
|
||||
result[1] = parseFloat(yieldArray[i].data) || 0;
|
||||
} else if (yieldArray[i].name == "钢3线") {
|
||||
result[2] = parseInt(yieldArray[i].data);
|
||||
result[2] = parseFloat(yieldArray[i].data) || 0;
|
||||
} else {
|
||||
// 合计
|
||||
result[3] = parseInt(yieldArray[i].data);
|
||||
result[3] = parseFloat(yieldArray[i].data) || 0;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
불러오는 중...
Reference in New Issue
Block a user