2025-03-31 18:24:37 +08:00
|
|
|
<template>
|
|
|
|
<div class="deviceStatistics card">
|
|
|
|
<div class="card-head">
|
|
|
|
<div class="title">内容数据</div>
|
|
|
|
<div class="condition">
|
2025-04-02 18:40:20 +08:00
|
|
|
<el-input style="width: 240px" placeholder="搜索设备IMEI号" :suffix-icon="Search" />
|
2025-03-31 18:24:37 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<TableCustom :columns="columns" :tableData="tableData" :total="page.total" :refresh="getData" :currentPage="page.index" :changePage="changePage">
|
|
|
|
<template #location="{ rows }">
|
|
|
|
<el-button type="success" link :icon="View"> 查看 </el-button>
|
|
|
|
</template>
|
|
|
|
<template #state="{ rows }">
|
|
|
|
<el-tag :type="rows.state ? 'success' : 'danger'">
|
|
|
|
{{ rows.state ? "正常" : "异常" }}
|
|
|
|
</el-tag>
|
|
|
|
</template>
|
|
|
|
</TableCustom>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script setup>
|
|
|
|
import { ref } from "vue";
|
|
|
|
import { Search, View } from "@element-plus/icons-vue";
|
|
|
|
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: "IMEI号" },
|
|
|
|
{ prop: "time", label: "时间" },
|
|
|
|
{ prop: "location", label: "地理位置" },
|
|
|
|
{ prop: "state", label: "处理状态" },
|
|
|
|
];
|
|
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
|
|
.card {
|
|
|
|
height: 100%;
|
|
|
|
background: #ffffff;
|
|
|
|
padding: 16px 10px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
overflow: hidden;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2025-04-01 13:52:57 +08:00
|
|
|
border-radius: 5px;
|
|
|
|
box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.12);
|
2025-04-01 18:07:18 +08:00
|
|
|
margin-bottom: 20px;
|
2025-03-31 18:24:37 +08:00
|
|
|
.card-head {
|
|
|
|
color: #061451;
|
|
|
|
font-size: 20px;
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.condition {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
margin-left: 20px;
|
|
|
|
.condition-time {
|
|
|
|
border: 1px solid #dcdfe6;
|
|
|
|
overflow: hidden;
|
|
|
|
margin-left: 20px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|