feat: 增加设备名称

This commit is contained in:
砂糖
2025-10-09 10:00:09 +08:00
parent 98c2aeaa9b
commit 4f064c2e3e
3 changed files with 8 additions and 1 deletions

View File

@@ -19,8 +19,9 @@
<div class="card" @click="handleVideoCameraFilled(item)" v-for="item in deviceList" :key="item.deviceId"> <div class="card" @click="handleVideoCameraFilled(item)" v-for="item in deviceList" :key="item.deviceId">
<el-row> <el-row>
<el-col :span="16"> <el-col :span="16">
<h3 style="display: flex; align-items: center;"><img :src="DeviceImage" alt="" style="width: 20px; height: 20px; margin-right: 10px;"> {{ item.ip }}</h3> <h3 style="display: flex; align-items: center;"><img :src="DeviceImage" alt="" style="width: 20px; height: 20px; margin-right: 10px;"> {{ item.deviceName }}</h3>
<div class="li" style="display: flex; align-items: center;">设备分类<dict-tag :options="device_type" :value="item.type" /></div> <div class="li" style="display: flex; align-items: center;">设备分类<dict-tag :options="device_type" :value="item.type" /></div>
<div class="li" style="display: flex; align-items: center;">设备IP{{ item.ip }}</div>
<div class="li" style="display: flex; align-items: center;">用户名{{ item.username ?? '-' }}</div> <div class="li" style="display: flex; align-items: center;">用户名{{ item.username ?? '-' }}</div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">

View File

@@ -63,6 +63,7 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="设备ID" align="center" prop="deviceId" />--> <!-- <el-table-column label="设备ID" align="center" prop="deviceId" />-->
<el-table-column label="IP地址" align="center" prop="ip" width="150" fixed /> <el-table-column label="IP地址" align="center" prop="ip" width="150" fixed />
<el-table-column label="设备名称" align="center" prop="deviceName" width="150" />
<el-table-column label="设备类型" align="center" prop="type" width="80"> <el-table-column label="设备类型" align="center" prop="type" width="80">
<template #default="scope"> <template #default="scope">
<dict-tag :options="device_type" :value="scope.row.type"/> <dict-tag :options="device_type" :value="scope.row.type"/>
@@ -103,6 +104,9 @@
<el-form-item label="IP地址" prop="ip"> <el-form-item label="IP地址" prop="ip">
<el-input v-model="form.ip" placeholder="请输入IP地址" /> <el-input v-model="form.ip" placeholder="请输入IP地址" />
</el-form-item> </el-form-item>
<el-form-item label="设备名称">
<el-input v-model="form.deviceName" placeholder="请输入设备名称" />
</el-form-item>
<el-form-item label="设备类型" prop="type"> <el-form-item label="设备类型" prop="type">
<el-select v-model="form.type" placeholder="请选择设备类型"> <el-select v-model="form.type" placeholder="请选择设备类型">
<el-option <el-option
@@ -218,6 +222,7 @@ function reset() {
form.value = { form.value = {
deviceId: null, deviceId: null,
ip: null, ip: null,
deviceName: null,
type: null, type: null,
userName: null, userName: null,
password: null, password: null,

View File

@@ -52,6 +52,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="任务名称" align="center" prop="taskName" /> <el-table-column label="任务名称" align="center" prop="taskName" />
<el-table-column label="设备IP" align="center" prop="deviceIp" />
<el-table-column label="设备名称" align="center" prop="deviceName" /> <el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="Cron表达式" align="center" prop="cronExpression" /> <el-table-column label="Cron表达式" align="center" prop="cronExpression" />
<el-table-column label="巡检时长(秒)" align="center" prop="duration" /> <el-table-column label="巡检时长(秒)" align="center" prop="duration" />