|
|
@@ -3,37 +3,69 @@
|
|
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
|
|
|
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
|
|
<div v-show="showSearch" class="mb-[10px]">
|
|
|
- <el-card shadow="hover" :style="{ height: '70px' }">
|
|
|
- <el-row :gutter="20" align="middle">
|
|
|
- <!-- 设备数量 -->
|
|
|
- <el-col :span="6" style="display: flex; justify-content: center; align-items: center">
|
|
|
- <el-statistic :value="totalNum">
|
|
|
+ <el-card shadow="hover" class="statistic-card">
|
|
|
+ <el-row :gutter="20" justify="space-between">
|
|
|
+ <!-- 设备总数 -->
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-statistic :value="totalNum" class="statistic-item">
|
|
|
<template #title>
|
|
|
- <div style="display: inline-flex; align-items: center">设备总数</div>
|
|
|
+ <div class="statistic-title">
|
|
|
+ <el-icon><Monitor /></el-icon>
|
|
|
+ <span>设备总数</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #prefix>
|
|
|
+ <div class="statistic-icon total-icon">
|
|
|
+ <el-icon><Collection /></el-icon>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-statistic>
|
|
|
</el-col>
|
|
|
<!-- 在线设备 -->
|
|
|
- <el-col :span="6" style="display: flex; justify-content: center; align-items: center">
|
|
|
- <el-statistic :value="onlineNum">
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-statistic :value="onlineNum" class="statistic-item">
|
|
|
<template #title>
|
|
|
- <div style="display: inline-flex; align-items: center">在线设备</div>
|
|
|
+ <div class="statistic-title">
|
|
|
+ <el-icon><SuccessFilled /></el-icon>
|
|
|
+ <span>在线设备</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #prefix>
|
|
|
+ <div class="statistic-icon online-icon">
|
|
|
+ <el-icon><Link /></el-icon>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-statistic>
|
|
|
</el-col>
|
|
|
<!-- 离线设备 -->
|
|
|
- <el-col :span="6" style="display: flex; justify-content: center; align-items: center">
|
|
|
- <el-statistic :value="offlineNum">
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-statistic :value="offlineNum" class="statistic-item">
|
|
|
<template #title>
|
|
|
- <div style="display: inline-flex; align-items: center">离线设备</div>
|
|
|
+ <div class="statistic-title">
|
|
|
+ <el-icon><CircleCloseFilled /></el-icon>
|
|
|
+ <span>离线设备</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #prefix>
|
|
|
+ <div class="statistic-icon offline-icon">
|
|
|
+ <el-icon><Connection /></el-icon>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-statistic>
|
|
|
</el-col>
|
|
|
- <!-- 未接入设备 -->
|
|
|
- <el-col :span="6" style="display: flex; justify-content: center; align-items: center">
|
|
|
- <el-statistic :value="initNum">
|
|
|
+ <!-- 待接入设备 -->
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-statistic :value="initNum" class="statistic-item">
|
|
|
<template #title>
|
|
|
- <div style="display: inline-flex; align-items: center">待接入</div>
|
|
|
+ <div class="statistic-title">
|
|
|
+ <el-icon><Warning /></el-icon>
|
|
|
+ <span>待接入</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #prefix>
|
|
|
+ <div class="statistic-icon pending-icon">
|
|
|
+ <el-icon><Loading /></el-icon>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-statistic>
|
|
|
</el-col>
|
|
|
@@ -71,9 +103,6 @@
|
|
|
</el-button>
|
|
|
<el-button type="success" plain icon="VideoPlay" :disabled="single" @click="startMonitor()">回调视频
|
|
|
</el-button>
|
|
|
- <el-button v-hasPermi="['smsb:device:remove']" type="danger" plain icon="Delete" :disabled="multiple"
|
|
|
- @click="handleDelete()">删除
|
|
|
- </el-button>
|
|
|
<el-button v-hasPermi="['smsb:device:query']" type="info" plain icon="Position" :disabled="single"
|
|
|
@click="handleInfo()">
|
|
|
详情
|
|
|
@@ -95,16 +124,11 @@
|
|
|
<div @click="handleInfo(scope.row)" class="two-line" style="text-decoration: underline;color: #1890FF;">{{ scope.row.name }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-<!--
|
|
|
- <el-table-column label="设备名称" align="left" prop="name" width="300" :show-overflow-tooltip="true" />
|
|
|
--->
|
|
|
<el-table-column label="设备型号" align="left" prop="deviceModel" width="120" :show-overflow-tooltip="true" />
|
|
|
<el-table-column label="设备SN" align="left" prop="serialNumber" width="220" :show-overflow-tooltip="true" />
|
|
|
<el-table-column label="设备MAC" align="left" prop="mac" width="180" />
|
|
|
<el-table-column label="设备标识" align="left" prop="identifier" width="220" :show-overflow-tooltip="true" />
|
|
|
<el-table-column label="分辨率" align="left" prop="resolution" width="100" />
|
|
|
-<!-- <el-table-column label="开机时间" align="left" prop="openTime" width="80" />
|
|
|
- <el-table-column label="关机时间" align="left" prop="closeTime" width="80" />-->
|
|
|
<el-table-column label="在线状态" align="center" prop="onlineStatus" width="80">
|
|
|
<template #default="scope">
|
|
|
<dict-tag :options="sys_device_online" :value="scope.row.onlineStatus" />
|
|
|
@@ -127,15 +151,15 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="备注" align="left" prop="remark" width="200" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="100">
|
|
|
+ <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="150">
|
|
|
<template #default="scope">
|
|
|
<el-tooltip content="修改" placement="top">
|
|
|
<el-button v-hasPermi="['smsb:device:edit']" link type="primary" icon="Edit"
|
|
|
- @click="handleUpdate(scope.row)"></el-button>
|
|
|
+ @click="handleUpdate(scope.row)">修改</el-button>
|
|
|
</el-tooltip>
|
|
|
<el-tooltip content="删除" placement="top">
|
|
|
<el-button v-hasPermi="['smsb:device:remove']" link type="primary" icon="Delete"
|
|
|
- @click="handleDelete(scope.row)"></el-button>
|
|
|
+ @click="handleDelete(scope.row)">删除</el-button>
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -846,7 +870,7 @@ const handleAdd = () => {
|
|
|
form.value.isAlien = 0;
|
|
|
form.value.isWatch = 0;
|
|
|
dialog.visible = true;
|
|
|
- dialog.title = '添加设备';
|
|
|
+ dialog.title = '添加';
|
|
|
};
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
@@ -856,7 +880,7 @@ const handleUpdate = async (row?: DeviceVO) => {
|
|
|
const res = await getDevice(_id);
|
|
|
Object.assign(form.value, res.data);
|
|
|
dialog.visible = true;
|
|
|
- dialog.title = '修改设备';
|
|
|
+ dialog.title = '修改';
|
|
|
};
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
@@ -1074,5 +1098,100 @@ onMounted(() => {
|
|
|
background-color: rgba(0, 0, 0, 0.3);
|
|
|
border-radius: 4px;
|
|
|
}
|
|
|
+.statistic-card {
|
|
|
+ border-radius: 8px;
|
|
|
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.08);
|
|
|
+ border: 1px solid #ebeef5;
|
|
|
+ padding: 15px 0;
|
|
|
+ height: 120px;
|
|
|
+}
|
|
|
|
|
|
+.statistic-item {
|
|
|
+ text-align: center;
|
|
|
+ padding: 10px 0;
|
|
|
+}
|
|
|
+
|
|
|
+.statistic-title {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ gap: 8px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #606266;
|
|
|
+ font-weight: 500;
|
|
|
+ margin-bottom: 8px;
|
|
|
+}
|
|
|
+
|
|
|
+.statistic-icon {
|
|
|
+ width: 40px;
|
|
|
+ height: 40px;
|
|
|
+ border-radius: 10px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ margin: 0 auto 10px;
|
|
|
+ color: white;
|
|
|
+ font-size: 18px;
|
|
|
+ box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
|
|
|
+}
|
|
|
+
|
|
|
+.total-icon {
|
|
|
+ background: linear-gradient(135deg, #409eff, #2282ff);
|
|
|
+}
|
|
|
+
|
|
|
+.online-icon {
|
|
|
+ background: linear-gradient(135deg, #67c23a, #48ab1f);
|
|
|
+}
|
|
|
+
|
|
|
+.offline-icon {
|
|
|
+ background: linear-gradient(135deg, #f56c6c, #d43d3d);
|
|
|
+}
|
|
|
+
|
|
|
+.pending-icon {
|
|
|
+ background: linear-gradient(135deg, #e6a23c, #d48c1f);
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.statistic-item .el-statistic__content) {
|
|
|
+ font-size: 24px;
|
|
|
+ font-weight: 700;
|
|
|
+ color: #303133;
|
|
|
+}
|
|
|
+
|
|
|
+/* 响应式设计 */
|
|
|
+@media (max-width: 1200px) {
|
|
|
+ :deep(.el-col) {
|
|
|
+ flex: 0 0 50%;
|
|
|
+ max-width: 50%;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ :deep(.el-row) {
|
|
|
+ flex-wrap: wrap;
|
|
|
+ }
|
|
|
+
|
|
|
+ .statistic-card {
|
|
|
+ padding: 10px 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+@media (max-width: 768px) {
|
|
|
+ :deep(.el-col) {
|
|
|
+ flex: 0 0 100%;
|
|
|
+ max-width: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .statistic-title {
|
|
|
+ font-size: 13px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .statistic-icon {
|
|
|
+ width: 36px;
|
|
|
+ height: 36px;
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+
|
|
|
+ :deep(.statistic-item .el-statistic__content) {
|
|
|
+ font-size: 20px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|