2025-08-11 17:34:39 +08:00
|
|
|
<template>
|
2025-08-18 13:48:35 +08:00
|
|
|
<!-- <el-card shadow="always" class="common-card-container common-card-container-body-no-padding">
|
2025-08-11 17:34:39 +08:00
|
|
|
<div slot="header">
|
|
|
|
|
<span class="card-title">当前报警</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ssgj-container">
|
|
|
|
|
<el-table
|
|
|
|
|
class="common-table"
|
|
|
|
|
:data="tableData"
|
|
|
|
|
height="100%"
|
|
|
|
|
stripe
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="deviceName"
|
|
|
|
|
label="名称">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="状态"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span :class="{'circle warning-status' : scope.row.status !== 0}">{{ $store.state.ems.warnOptions[scope.row.status]}}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
class-name="alarm-content"
|
|
|
|
|
prop="alarmContent"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
label="告警内容">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="工单"
|
|
|
|
|
fixed="right"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button type="text" size="mini" v-if="scope.row.ticketNo" @click="toTicket">已生成工单(工单号:{{scope.row.ticketNo}})</el-button>
|
|
|
|
|
<el-button type="primary" size="mini" v-else @click="toTicket">生成工单</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
2025-08-18 13:48:35 +08:00
|
|
|
</el-card> -->
|
|
|
|
|
<el-alert type="error" :closable="false">
|
|
|
|
|
<template>
|
|
|
|
|
<div style="cursor: pointer" @click="toAlarm">设备告警</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-alert>
|
2025-08-11 17:34:39 +08:00
|
|
|
</template>
|
|
|
|
|
<script>
|
2025-08-18 13:48:35 +08:00
|
|
|
export default {
|
|
|
|
|
props: {
|
|
|
|
|
tableData: {
|
|
|
|
|
require: true,
|
|
|
|
|
type: Array,
|
|
|
|
|
default: () => {
|
|
|
|
|
return [];
|
|
|
|
|
},
|
2025-08-11 17:34:39 +08:00
|
|
|
},
|
2025-08-18 13:48:35 +08:00
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
toAlarm() {
|
|
|
|
|
this.$router.push({ path: "/dzjk/gzgj", query: this.$route.query });
|
2025-08-11 17:34:39 +08:00
|
|
|
},
|
2025-08-18 13:48:35 +08:00
|
|
|
toTicket() {
|
|
|
|
|
this.$router.push({ path: "/ticket" });
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
2025-08-11 17:34:39 +08:00
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
2025-08-18 13:48:35 +08:00
|
|
|
//实时告警
|
|
|
|
|
.ssgj-container {
|
|
|
|
|
padding: 20px;
|
|
|
|
|
height: 250px;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
::v-deep {
|
|
|
|
|
.el-table .el-table__header-wrapper th,
|
|
|
|
|
.el-table .el-table__fixed-header-wrapper th {
|
|
|
|
|
background: #fff2cb;
|
2025-08-11 17:34:39 +08:00
|
|
|
}
|
|
|
|
|
}
|
2025-08-18 13:48:35 +08:00
|
|
|
}
|
|
|
|
|
</style>
|