修改 电网一张图告警明细数据

This commit is contained in:
GGJ
2024-10-21 19:15:45 +08:00
parent 96ea25d0a6
commit 2e364d82ed
8 changed files with 274 additions and 116 deletions

View File

@@ -38,18 +38,16 @@
</h3>
<el-descriptions title="" border :column="2" size="small">
<el-descriptions-item width="140px" label="告警原因">
<span
style="font-weight: 550"
:style="TargetData.info == 0 ? 'color: #0e8780;' : 'color: #ff0000;'"
>
<span style="font-weight: 550"
:style="TargetData.info == 0 ? 'color: #0e8780;' : TargetData.info == 3 ? 'color: #000' : 'color: #ff0000;'">
{{
TargetData.info == 1
? '超标告警'
: TargetData.info == 2
? '完整性告警'
: TargetData.info == 0
? '无告警'
: ''
? '完整性告警'
: TargetData.info == 0
? '无告警'
: '暂无数据'
}}
</span>
</el-descriptions-item>
@@ -75,11 +73,8 @@
</h3>
<div style="display: flex">
<MyEChart :style="`height: calc(${rowHeight} - 31px)`" :options="ComCharts" @click="Integrity" />
<MyEChart
:style="`height: calc(${rowHeight} - 31px)`"
:options="onLineCharts"
@click="OnlineRate"
/>
<MyEChart :style="`height: calc(${rowHeight} - 31px)`" :options="onLineCharts"
@click="OnlineRate" />
</div>
</el-col>
</el-row>
@@ -98,18 +93,14 @@
<el-col :span="12" style="display: flex">
<div>
综合评估得分:
<span
class="conclusion"
:class="
dropList.assessData == '特质'
? 'background1'
: dropList.assessData == '较差'
? 'background2'
: dropList.assessData == '极差'
<span class="conclusion" :class="dropList.assessData == '特质'
? 'background1'
: dropList.assessData == '较差'
? 'background2'
: dropList.assessData == '极差'
? 'background3'
: ''
"
>
">
{{ dropList.assessData }}
</span>
</div>
@@ -123,18 +114,14 @@
<el-col :span="10" style="display: flex; align-items: center">
<div style="width: 100%">
评估得分
<span
class="conclusion"
:class="
item.avg == '特质'
? 'background1'
: item.avg == '较差'
? 'background2'
: item.avg == '极差'
<span class="conclusion" :class="item.avg == '特质'
? 'background1'
: item.avg == '较差'
? 'background2'
: item.avg == '极差'
? 'background3'
: ''
"
>
">
{{ item.avg }}
</span>
</div>
@@ -529,13 +516,16 @@ const open = async (id: string) => {
TargetData.value = res.data
let num = 0
let flag = 0
let judgment=true
for (let k in res.data) {
if (k != 'lineId') {
flag += res.data[k]
if(res.data[k] != '/'){
judgment=false
}
flag += (res.data[k] == '/' ? 0 : res.data[k])
}
}
// console.log('🚀 ~ getGridDiagramTargetData ~ flag:', flag)
if (IntegrityNum.value == 0) {
num = 2 //完整性告警
} else {
@@ -544,6 +534,9 @@ const open = async (id: string) => {
} else {
num = 0 //无告警
}
if(judgment){
num = 3
}
}
TargetData.value.info = num
@@ -685,29 +678,36 @@ defineExpose({ open })
.lineInfo {
padding: 0 10px 10px 10px;
}
:deep(.el-page-header__header) {
height: 45px;
border-bottom: 1px solid #f1eded;
}
:deep(.el-descriptions__header) {
margin-bottom: 10px;
}
.evaluationData {
display: grid;
grid-template-rows: repeat(5, auto);
height: 87%;
.row {
margin: 4px 2% 0;
width: 100%;
box-shadow: 1px 1px 1px 1px #e8e3e3;
}
img {
width: 6%;
margin: 0px 15px;
}
}
.iconBox {
display: flex;
span {
display: inline-block;
width: 3px;
@@ -717,20 +717,24 @@ defineExpose({ open })
margin-left: 3px;
}
}
.conclusion {
display: inline-block;
padding: 2px 5px;
height: 20px;
border-radius: 4px;
}
.background1 {
background-color: #339966;
color: #fff;
}
.background2 {
background-color: #97017e;
color: #fff;
}
.background3 {
background-color: #cc0000;
color: #fff;