feat: 优化报警状态显示,合并一级和二级报警为统一显示

This commit is contained in:
LokerL 2024-12-15 20:11:42 +08:00
parent 285df1f96b
commit e98809b93a
11 changed files with 119 additions and 149 deletions

View File

@ -53,10 +53,10 @@
</el-table-column> </el-table-column>
<el-table-column prop="zt" label="报警状态" header-align="center" align="center"> <el-table-column prop="zt" label="报警状态" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.zt == '一级报警'" style="color: #c00808"> <span v-if="scope.row.zt === '一级报警' || scope.row.zt === '二级报警'" style="color: #c00808">
{{ scope.row.zt }} 报警
</span> </span>
<span v-if="scope.row.zt == '二级报警'" style="color: #e23434"> <span v-else style="color: #000">
{{ scope.row.zt }} {{ scope.row.zt }}
</span> </span>
</template> </template>

View File

@ -56,10 +56,10 @@
</el-table-column> </el-table-column>
<el-table-column prop="zt" label="报警状态" header-align="center" align="center"> <el-table-column prop="zt" label="报警状态" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.zt == '一级报警'" style="color: #c00808;"> <span v-if="scope.row.zt === '一级报警' || scope.row.zt === '二级报警'" style="color: #c00808">
{{ scope.row.zt }} 报警
</span> </span>
<span v-if="scope.row.zt == '二级报警'" style="color: #e23434;"> <span v-else style="color: #000">
{{ scope.row.zt }} {{ scope.row.zt }}
</span> </span>
</template> </template>
@ -442,4 +442,3 @@
}; };
</script> </script>

View File

@ -56,10 +56,10 @@
</el-table-column> </el-table-column>
<el-table-column prop="zt" label="报警状态" header-align="center" align="center"> <el-table-column prop="zt" label="报警状态" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.zt == '一级报警'" style="color: #c00808;"> <span v-if="scope.row.zt === '一级报警' || scope.row.zt === '二级报警'" style="color: #c00808">
{{ scope.row.zt }} 报警
</span> </span>
<span v-if="scope.row.zt == '二级报警'" style="color: #e23434;"> <span v-else style="color: #000">
{{ scope.row.zt }} {{ scope.row.zt }}
</span> </span>
</template> </template>
@ -442,4 +442,3 @@
}; };
</script> </script>

View File

@ -56,10 +56,10 @@
</el-table-column> </el-table-column>
<el-table-column prop="zt" label="报警状态" header-align="center" align="center"> <el-table-column prop="zt" label="报警状态" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.zt == '一级报警'" style="color: #c00808;"> <span v-if="scope.row.zt === '一级报警' || scope.row.zt === '二级报警'" style="color: #c00808">
{{ scope.row.zt }} 报警
</span> </span>
<span v-if="scope.row.zt == '二级报警'" style="color: #e23434;"> <span v-else style="color: #000">
{{ scope.row.zt }} {{ scope.row.zt }}
</span> </span>
</template> </template>
@ -216,4 +216,3 @@ export default {
}; };
</script> </script>

View File

@ -45,13 +45,10 @@
</el-table-column> </el-table-column>
<el-table-column prop="zt" label="报警状态" header-align="center" align="center"> <el-table-column prop="zt" label="报警状态" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.zt == '一级报警'" style="color: #c00808;"> <span v-if="scope.row.zt === '一级报警' || scope.row.zt === '二级报警'" style="color: #c00808">
{{ scope.row.zt }} 报警
</span> </span>
<span v-else-if="scope.row.zt == '二级报警'" style="color: #e23434;"> <span v-else style="color: #000">
{{ scope.row.zt }}
</span>
<span v-else>
{{ scope.row.zt }} {{ scope.row.zt }}
</span> </span>
</template> </template>
@ -158,4 +155,3 @@ export default {
}; };
</script> </script>

View File

@ -41,13 +41,10 @@
<el-table-column prop="zt" label="报警状态" header-align="center" align="center"> <el-table-column prop="zt" label="报警状态" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.zt == '一级报警'" style="color: #c00808;"> <span v-if="scope.row.zt === '一级报警' || scope.row.zt === '二级报警'" style="color: #c00808">
{{ scope.row.zt }} 报警
</span> </span>
<span v-else-if="scope.row.zt == '二级报警'" style="color: #e23434;"> <span v-else style="color: #000">
{{ scope.row.zt }}
</span>
<span v-else>
{{ scope.row.zt }} {{ scope.row.zt }}
</span> </span>
</template> </template>

View File

@ -43,13 +43,10 @@
</el-table-column> </el-table-column>
<el-table-column prop="zt" label="报警状态" header-align="center" align="center"> <el-table-column prop="zt" label="报警状态" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.zt == '一级报警'" style="color: #c00808;"> <span v-if="scope.row.zt === '一级报警' || scope.row.zt === '二级报警'" style="color: #c00808">
{{ scope.row.zt }} 报警
</span> </span>
<span v-else-if="scope.row.zt == '二级报警'" style="color: #e23434;"> <span v-else style="color: #000">
{{ scope.row.zt }}
</span>
<span v-else>
{{ scope.row.zt }} {{ scope.row.zt }}
</span> </span>
</template> </template>
@ -373,4 +370,3 @@
}; };
</script> </script>

View File

@ -43,13 +43,10 @@
</el-table-column> </el-table-column>
<el-table-column prop="zt" label="报警状态" header-align="center" align="center"> <el-table-column prop="zt" label="报警状态" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.zt == '一级报警'" style="color: #c00808;"> <span v-if="scope.row.zt === '一级报警' || scope.row.zt === '二级报警'" style="color: #c00808">
{{ scope.row.zt }} 报警
</span> </span>
<span v-else-if="scope.row.zt == '二级报警'" style="color: #e23434;"> <span v-else style="color: #000">
{{ scope.row.zt }}
</span>
<span v-else>
{{ scope.row.zt }} {{ scope.row.zt }}
</span> </span>
</template> </template>
@ -372,4 +369,3 @@
}; };
</script> </script>

View File

@ -43,13 +43,10 @@
</el-table-column> </el-table-column>
<el-table-column prop="zt" label="报警状态" header-align="center" align="center"> <el-table-column prop="zt" label="报警状态" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.zt == '一级报警'" style="color: #c00808;"> <span v-if="scope.row.zt === '一级报警' || scope.row.zt === '二级报警'" style="color: #c00808">
{{ scope.row.zt }} 报警
</span> </span>
<span v-else-if="scope.row.zt == '二级报警'" style="color: #e23434;"> <span v-else style="color: #000">
{{ scope.row.zt }}
</span>
<span v-else>
{{ scope.row.zt }} {{ scope.row.zt }}
</span> </span>
</template> </template>
@ -372,4 +369,3 @@
}; };
</script> </script>

View File

@ -43,13 +43,10 @@
</el-table-column> </el-table-column>
<el-table-column prop="zt" label="报警状态" header-align="center" align="center"> <el-table-column prop="zt" label="报警状态" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.zt == '一级报警'" style="color: #c00808;"> <span v-if="scope.row.zt === '一级报警' || scope.row.zt === '二级报警'" style="color: #c00808">
{{ scope.row.zt }} 报警
</span> </span>
<span v-else-if="scope.row.zt == '二级报警'" style="color: #e23434;"> <span v-else style="color: #000">
{{ scope.row.zt }}
</span>
<span v-else>
{{ scope.row.zt }} {{ scope.row.zt }}
</span> </span>
</template> </template>
@ -373,4 +370,3 @@
}; };
</script> </script>

View File

@ -43,13 +43,10 @@
</el-table-column> </el-table-column>
<el-table-column prop="zt" label="报警状态" header-align="center" align="center"> <el-table-column prop="zt" label="报警状态" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.zt == '一级报警'" style="color: #c00808;"> <span v-if="scope.row.zt === '一级报警' || scope.row.zt === '二级报警'" style="color: #c00808">
{{ scope.row.zt }} 报警
</span> </span>
<span v-else-if="scope.row.zt == '二级报警'" style="color: #e23434;"> <span v-else style="color: #000">
{{ scope.row.zt }}
</span>
<span v-else>
{{ scope.row.zt }} {{ scope.row.zt }}
</span> </span>
</template> </template>
@ -372,4 +369,3 @@
}; };
</script> </script>