深基坑(测点监控):报警类型处理

This commit is contained in:
骆乐 2022-08-25 11:12:16 +08:00
parent 1c4bf7cdc1
commit 67be357736

View File

@ -479,7 +479,7 @@
<!-- 报警状态 -->
<el-table-column :label="$t('message.deepFoundConfig.alarmStatus')">
<template slot-scope="scope">
<span
<!-- <span
:class="{'alarm_status1': scope.row.alarmState == '0',
'alarm_status2': scope.row.alarmState == 2,
'alarm_status3': scope.row.alarmState == 1,
@ -489,6 +489,17 @@
? $t('message.deepFoundConfig.warning'):scope.row.alarmState == 1
? $t('message.deepFoundConfig.alarm'):scope.row.alarmState == 3
? $t('message.deepFoundConfig.control'):""}}
</span> -->
<span
:class="{'alarm_status1': scope.row.alarmState == 1,
'alarm_status2': scope.row.alarmState == 2,
'alarm_status3': scope.row.alarmState == 3,
'alarm_status4': scope.row.alarmState == 4}"
>
{{scope.row.alarmState == 1 ? '正常': scope.row.alarmState == 2
? '超报警' :scope.row.alarmState == 3
? '超控制':scope.row.alarmState == 4
? '变化速率报警':""}}
</span>
</template>
</el-table-column>
@ -626,15 +637,15 @@
<el-table-column :label="$t('message.deepFoundConfig.alarmStatus')">
<template slot-scope="scope">
<span
:class="{'alarm_status1': scope.row.alarmState == '0',
:class="{'alarm_status1': scope.row.alarmState == 1,
'alarm_status2': scope.row.alarmState == 2,
'alarm_status3': scope.row.alarmState == 1,
'alarm_status4': scope.row.alarmState == 3}"
'alarm_status3': scope.row.alarmState == 3,
'alarm_status4': scope.row.alarmState == 4}"
>
{{scope.row.alarmState == '0' ? $t('message.deepFoundConfig.normal'): scope.row.alarmState == 2
? $t('message.deepFoundConfig.alarm'):scope.row.alarmState == 1
? $t('message.deepFoundConfig.warning'):scope.row.alarmState == 3
? $t('message.deepFoundConfig.control'):""}}
{{scope.row.alarmState == 1 ? '正常': scope.row.alarmState == 2
? '超报警' :scope.row.alarmState == 3
? '超控制':scope.row.alarmState == 4
? '变化速率报警':""}}
</span>
</template>
</el-table-column>
@ -1177,24 +1188,24 @@ export default {
formTitle: "",
innerVisible: false,
dialogImageUrl: "",
safeLvList: [
{
label: "一级",
value: 1
},
{
label: "二级",
value: 2
},
{
label: "三级",
value: 3
},
{
label: "四级",
value: 4
}
],
// safeLvList: [
// {
// label: "",
// value: 1
// },
// {
// label: "",
// value: 2
// },
// {
// label: "",
// value: 3
// },
// {
// label: "",
// value: 4
// }
// ],
rules: {
engineeringName: [
{ required: true, message: "请输入基坑名称", trigger: "blur" }
@ -2511,26 +2522,26 @@ export default {
}
.alarm_status1 {
padding: 4px 6px;
background: #44d7b6;
color: #fefefe;
// background: #44d7b6;
color: #44d7b6;
border-radius: 3px;
}
.alarm_status2 {
padding: 4px 6px;
background: #7953f6;
color: #fefefe;
// background: #7953f6;
color: #f76462;
border-radius: 3px;
}
.alarm_status3 {
padding: 4px 6px;
background: #f67f52;
color: #fefefe;
// background: #f67f52;
color: #f76462;
border-radius: 3px;
}
.alarm_status4 {
padding: 4px 6px;
background: #5484f6;
color: #fefefe;
// background: #5484f6;
color: #f76462;
border-radius: 3px;
}
.formBox {