|
|
@ -70,6 +70,7 @@ |
|
|
|
<el-table-column label="设备序列号" align="center" prop="devsn" /> |
|
|
|
<el-table-column label="设备序列号" align="center" prop="devsn" /> |
|
|
|
<el-table-column label="首次注册时间" align="center" prop="firstTime" /> |
|
|
|
<el-table-column label="首次注册时间" align="center" prop="firstTime" /> |
|
|
|
<el-table-column label="心跳时间" align="center" prop="updateTime" /> |
|
|
|
<el-table-column label="心跳时间" align="center" prop="updateTime" /> |
|
|
|
|
|
|
|
<el-table-column label="4G强度" align="center" prop="rssiLevel" /> |
|
|
|
<el-table-column label="状态" align="center" prop="status"> |
|
|
|
<el-table-column label="状态" align="center" prop="status"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.status == 1"><el-tag type="success">在线</el-tag></span> |
|
|
|
<span v-if="scope.row.status == 1"><el-tag type="success">在线</el-tag></span> |
|
|
@ -78,7 +79,7 @@ |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button |
|
|
|
<!-- <el-button |
|
|
|
size="mini" |
|
|
|
size="mini" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
icon="el-icon-setting" |
|
|
|
icon="el-icon-setting" |
|
|
@ -91,7 +92,7 @@ |
|
|
|
icon="el-icon-search" |
|
|
|
icon="el-icon-search" |
|
|
|
@click="showVideo(scope.row)" |
|
|
|
@click="showVideo(scope.row)" |
|
|
|
v-hasPermi="['web:camera:remove']" |
|
|
|
v-hasPermi="['web:camera:remove']" |
|
|
|
>查看视频</el-button> |
|
|
|
>查看视频</el-button> --> |
|
|
|
<el-button |
|
|
|
<el-button |
|
|
|
size="mini" |
|
|
|
size="mini" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
@ -99,13 +100,14 @@ |
|
|
|
@click="handleUpdate(scope.row)" |
|
|
|
@click="handleUpdate(scope.row)" |
|
|
|
v-hasPermi="['web:camera:edit']" |
|
|
|
v-hasPermi="['web:camera:edit']" |
|
|
|
>修改</el-button> |
|
|
|
>修改</el-button> |
|
|
|
<el-button |
|
|
|
<!-- <el-button |
|
|
|
size="mini" |
|
|
|
size="mini" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
|
icon="el-icon-refresh" |
|
|
|
icon="el-icon-refresh" |
|
|
|
@click="reboot(scope.row)" |
|
|
|
@click="reboot(scope.row)" |
|
|
|
v-hasPermi="['web:camera:remove']" |
|
|
|
v-hasPermi="['web:camera:remove']" |
|
|
|
>重启</el-button> |
|
|
|
v-loading.fullscreen.lock="fullscreenLoading" |
|
|
|
|
|
|
|
>重启</el-button> --> |
|
|
|
<el-button |
|
|
|
<el-button |
|
|
|
size="mini" |
|
|
|
size="mini" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
@ -113,6 +115,22 @@ |
|
|
|
@click="handleDelete(scope.row)" |
|
|
|
@click="handleDelete(scope.row)" |
|
|
|
v-hasPermi="['web:camera:remove']" |
|
|
|
v-hasPermi="['web:camera:remove']" |
|
|
|
>删除</el-button> |
|
|
|
>删除</el-button> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['web:camera:remove']"> |
|
|
|
|
|
|
|
<span class="el-dropdown-link"> |
|
|
|
|
|
|
|
<i class="el-icon-d-arrow-right el-icon--right"></i>更多 |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
<el-dropdown-menu slot="dropdown"> |
|
|
|
|
|
|
|
<el-dropdown-item command="refreshRssi" icon="el-icon-s-operation" |
|
|
|
|
|
|
|
v-hasPermi="['web:camera:remove']">刷新4G信号</el-dropdown-item> |
|
|
|
|
|
|
|
<el-dropdown-item command="openFtpCfg" icon="el-icon-setting" |
|
|
|
|
|
|
|
v-hasPermi="['web:camera:remove']">FTP配置</el-dropdown-item> |
|
|
|
|
|
|
|
<el-dropdown-item command="showVideo" icon="el-icon-view" |
|
|
|
|
|
|
|
v-hasPermi="['web:camera:remove']">查看视频</el-dropdown-item> |
|
|
|
|
|
|
|
<el-dropdown-item command="reboot" icon="el-icon-refresh" |
|
|
|
|
|
|
|
v-hasPermi="['web:camera:remove']">重启</el-dropdown-item> |
|
|
|
|
|
|
|
</el-dropdown-menu> |
|
|
|
|
|
|
|
</el-dropdown> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
@ -210,6 +228,8 @@ export default { |
|
|
|
return { |
|
|
|
return { |
|
|
|
// 遮罩层 |
|
|
|
// 遮罩层 |
|
|
|
loading: true, |
|
|
|
loading: true, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fullscreenLoading: false, |
|
|
|
// 选中数组 |
|
|
|
// 选中数组 |
|
|
|
ids: [], |
|
|
|
ids: [], |
|
|
|
// 非单个禁用 |
|
|
|
// 非单个禁用 |
|
|
@ -328,6 +348,25 @@ export default { |
|
|
|
this.open = true; |
|
|
|
this.open = true; |
|
|
|
this.title = "添加摄像机"; |
|
|
|
this.title = "添加摄像机"; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 更多操作触发 |
|
|
|
|
|
|
|
handleCommand(command, row) { |
|
|
|
|
|
|
|
switch (command) { |
|
|
|
|
|
|
|
case "refreshRssi": |
|
|
|
|
|
|
|
this.refreshRssi(row); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "openFtpCfg": |
|
|
|
|
|
|
|
this.openFtpCfg(row); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "showVideo": |
|
|
|
|
|
|
|
this.showVideo(row); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case "reboot": |
|
|
|
|
|
|
|
this.reboot(row); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
/** 修改按钮操作 */ |
|
|
|
/** 修改按钮操作 */ |
|
|
|
async handleUpdate(row) { |
|
|
|
async handleUpdate(row) { |
|
|
|
this.reset(); |
|
|
|
this.reset(); |
|
|
@ -339,9 +378,27 @@ export default { |
|
|
|
this.title = "修改"; |
|
|
|
this.title = "修改"; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
async refreshRssi(row){ |
|
|
|
|
|
|
|
const id = row.id; |
|
|
|
|
|
|
|
const status = row.status; |
|
|
|
|
|
|
|
if(status != 1){ |
|
|
|
|
|
|
|
this.$modal.msg("设备未在线"); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let res = await this.$axiosGet('/web/camera/refreshRssi/'+id); |
|
|
|
|
|
|
|
if(res.code === 0){ |
|
|
|
|
|
|
|
this.$modal.msgSuccess("执行成功"); |
|
|
|
|
|
|
|
this.getList(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
async openFtpCfg(row){ |
|
|
|
async openFtpCfg(row){ |
|
|
|
this.ftpCfgReset(); |
|
|
|
this.ftpCfgReset(); |
|
|
|
const id = row.id; |
|
|
|
const id = row.id; |
|
|
|
|
|
|
|
const status = row.status; |
|
|
|
|
|
|
|
if(status != 1){ |
|
|
|
|
|
|
|
this.$modal.msg("设备未在线"); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
let res = await this.$axiosGet('/camera/ftp/getNetCfg',{'cameraId': id}); |
|
|
|
let res = await this.$axiosGet('/camera/ftp/getNetCfg',{'cameraId': id}); |
|
|
|
if(res.code === 0){ |
|
|
|
if(res.code === 0){ |
|
|
|
this.ftp.form = res.data; |
|
|
|
this.ftp.form = res.data; |
|
|
@ -358,16 +415,30 @@ export default { |
|
|
|
this.ftp.open = false; |
|
|
|
this.ftp.open = false; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
async reboot(row) { |
|
|
|
reboot(row) { |
|
|
|
const id = row.id; |
|
|
|
const id = row.id; |
|
|
|
const status = row.status; |
|
|
|
const status = row.status; |
|
|
|
if(status != 1){ |
|
|
|
if(status != 1){ |
|
|
|
this.$modal.msg("设备未在线"); |
|
|
|
this.$modal.msg("设备未在线"); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.$modal.confirm('是否确认重启?').then(() => { |
|
|
|
|
|
|
|
this.exeReboot(id) |
|
|
|
|
|
|
|
}).catch(() => {}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
async exeReboot(id){ |
|
|
|
|
|
|
|
const loading = this.$loading({ |
|
|
|
|
|
|
|
lock: true, |
|
|
|
|
|
|
|
text: 'Loading', |
|
|
|
|
|
|
|
spinner: 'el-icon-loading', |
|
|
|
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
// this.fullscreenLoading = true; |
|
|
|
let res = await this.$axiosGet('/web/camera/reboot/'+id); |
|
|
|
let res = await this.$axiosGet('/web/camera/reboot/'+id); |
|
|
|
if(res.code === 0){ |
|
|
|
if(res.code === 0){ |
|
|
|
this.$modal.msgSuccess("执行成功"); |
|
|
|
// this.fullscreenLoading = false; |
|
|
|
|
|
|
|
loading.close(); |
|
|
|
|
|
|
|
this.$modal.msgSuccess("执行成功,请稍等几分钟后继续操作"); |
|
|
|
this.getList(); |
|
|
|
this.getList(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|