86 lines
2.0 KiB
Vue
Raw Normal View History

2025-03-31 18:24:37 +08:00
<template>
<div class="deviceStatistics card">
<div class="card-head">
<div class="title">当前设备告警记录</div>
<div class="search">
<el-select class="select" style="width: 120px; margin-right: 20px">
<el-option label="户外押送" value="1" />
<el-option label="审讯模式" value="2" />
</el-select>
<el-select class="select" style="width: 120px">
<el-option label="户外押送" value="1" />
<el-option label="审讯模式" value="2" />
</el-select>
</div>
</div>
<TableCustom :columns="columns" :tableData="tableData" :total="page.total" :refresh="getData" :currentPage="page.index" :changePage="changePage">
<template #state="{ rows }">
<el-tag :type="rows.state ? 'success' : 'danger'">
{{ rows.state ? "正常" : "异常" }}
</el-tag>
</template>
</TableCustom>
</div>
</template>
<script setup>
defineProps({
tableData: {
type: Array,
default: () => [],
},
page: {
type: Object,
default: () => ({}),
},
getData: {
type: Function,
default: () => {},
},
changePage: {
type: Function,
default: () => {},
},
});
// 表格相关
let columns = [
{ type: "index", label: "序号", width: 55, align: "center" },
{ prop: "name", label: "事件类型" },
{ prop: "name", label: "触发时间" },
{ prop: "state", label: "处理状态" },
];
</script>
<style scoped lang="less">
.card {
height: 100%;
background: #ffffff;
padding: 16px 10px;
box-sizing: border-box;
.card-head {
color: #061451;
2025-04-08 18:31:37 +08:00
font-size: 18px;
2025-03-31 18:24:37 +08:00
display: flex;
align-items: center;
justify-content: space-between;
2025-04-01 13:52:57 +08:00
transform: translateX(-10px);
2025-03-31 18:24:37 +08:00
.title {
&::before {
display: inline-block;
margin-right: 10px;
content: "";
width: 2px;
height: 14px;
border-radius: 20px;
background: #061451;
}
}
.search {
display: flex;
align-items: center;
}
}
}
</style>