视频管理(设备监控插件管理):增删改查操作
This commit is contained in:
parent
db8b254b9b
commit
a73a91a73b
@ -41,3 +41,10 @@ export const getvideoNvrApi = data => get('/xmgl/videoNvr/selectPage', data); //
|
||||
export const addvideoNvrApi = data => post('/xmgl/videoNvr/addVideoNvr', data); //新增设备
|
||||
export const editvideoNvrApi = data => post('/xmgl/videoNvr/updateVideoNvr', data); //编辑设备
|
||||
export const delvideoNvrApi = data => get('/xmgl/videoNvr/deleteById', data); //删除设备
|
||||
export const getAllNvrApi = data => get('/xmgl/videoNvr/list', data); //获取所有视频nvr设备
|
||||
|
||||
// 监测插件控制器
|
||||
export const addPluginApi = data => post('/xmgl/devMonitorPlugin/addDevMonitorPlugin', data); //新增监测插件
|
||||
export const getPluginApi = data => get('/xmgl/devMonitorPlugin/selectPage', data); //分页查询监测插件
|
||||
export const editPluginApi = data => post('/xmgl/devMonitorPlugin/updateDevMonitorPlugin', data); //编辑监测插件
|
||||
export const delPluginApi = data => get('/xmgl/devMonitorPlugin/deleteById', data); //删除监测插件
|
||||
@ -41,6 +41,7 @@ if (process.env.NODE_ENV == 'development') {
|
||||
// tag: 本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.174:6023/' // 老大本地
|
||||
axios.defaults.baseURL = 'http://192.168.34.216:6023/' // 邱平毅本地
|
||||
// axios.defaults.baseURL = 'http://139.9.66.234:6324/' // 河南春笋
|
||||
// axios.defaults.baseURL ='http://124.71.67.160:8088/' //中建四局线上
|
||||
// axios.defaults.baseURL = 'http://192.168.34.125:6023/' //杨意本地 http/1.1
|
||||
// axios.defaults.baseURL ='http://47.97.202.104:6023/' //金林湾线上
|
||||
|
||||
@ -119,6 +119,7 @@
|
||||
</el-button>
|
||||
<!-- 设备监测插件管理-->
|
||||
<el-button
|
||||
@click="pluginManage"
|
||||
type="primary"
|
||||
size="medium"
|
||||
>
|
||||
@ -164,11 +165,11 @@
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="editBtn(scope.row)">编辑</el-button>
|
||||
@click="editBtn(scope.row,1)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="deleteBtn(scope.row)">删除</el-button>
|
||||
@click="deleteBtn(scope.row,1)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -231,6 +232,115 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<!-- 插件配置 -->
|
||||
<el-dialog :modal-append-to-body="false" title="设备监测插件管理" :visible.sync="pluginDevice"
|
||||
width="1200px" :close-on-click-modal="false">
|
||||
<el-form :inline="true" :model="formInline1" class="demo-form-inline">
|
||||
<!-- <el-form-item label="插件名称">
|
||||
<el-input v-model="formInline1.name" placeholder="请输入" clearable></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="ip">
|
||||
<el-input v-model="formInline1.ip" placeholder="请输入" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="插件sn">
|
||||
<el-input v-model="formInline1.sn" placeholder="请输入" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间">
|
||||
<el-date-picker
|
||||
v-model="timeRange"
|
||||
type="datetimerange"
|
||||
value-format="yyyy-MM-dd hh:mm:ss"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSearch1">查询</el-button>
|
||||
<el-button type="primary" @click="onAdd1">新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="tableData1" style="width:100%">
|
||||
<el-table-column prop="name" label="插件名称"></el-table-column>
|
||||
<el-table-column prop="sn" label="插件sn"></el-table-column>
|
||||
<el-table-column prop="ip" label="插件所在ip"></el-table-column>
|
||||
<el-table-column prop="lastDataTime" label="最后一次更新时间"></el-table-column>
|
||||
<el-table-column prop="deviceState" label="设备状态" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.deviceState == 1 ? '在线' : '离线'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="editBtn(scope.row,2)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="deleteBtn(scope.row,2)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagerBox">
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"
|
||||
:current-page="pageNo1"
|
||||
:page-sizes="pageSizes"
|
||||
:page-size="pageSize1"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
background
|
||||
:total="total1">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 新增插件配置的弹窗 -->
|
||||
<el-dialog :modal-append-to-body="false" :title="pluginTitle" :visible.sync="addPlugin"
|
||||
width="667px" :close-on-click-modal="false">
|
||||
<el-form
|
||||
ref="addForm"
|
||||
:rules="rules2"
|
||||
size="medium"
|
||||
label-width="140px"
|
||||
label-position="right"
|
||||
:model="addPluginData">
|
||||
<el-form-item label="插件名称" prop="name">
|
||||
<el-input
|
||||
clearable
|
||||
type="text"
|
||||
v-model="addPluginData.name"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="插件所在ip" prop="ip">
|
||||
<el-input
|
||||
clearable
|
||||
type="text"
|
||||
v-model="addPluginData.ip"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="插件sn" prop="sn">
|
||||
<el-input
|
||||
clearable
|
||||
type="text"
|
||||
v-model="addPluginData.sn"
|
||||
placeholder="请输入插件编号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备状态" prop="deviceState">
|
||||
<el-select v-model="addPluginData.deviceState" placeholder="请选择">
|
||||
<el-option label="在线" :value="1"></el-option>
|
||||
<el-option label="离线" :value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="addPlugin = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addPluginSubmit">确 定</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<!-- 配置视频类型 -->
|
||||
<el-dialog :modal-append-to-body="false" :title="$t('message.videoManage.dialog_video_config.title')" :visible.sync="configDialog"
|
||||
width="667px" :close-on-click-modal="false"
|
||||
@ -365,15 +475,29 @@
|
||||
<el-form-item :label="$t('message.videoManage.sort')">
|
||||
<el-input-number style="width:auto" v-model="currentVideoTypeDetail.sortNum" :placeholder="$t('message.videoManage.theSmaller')"></el-input-number>
|
||||
</el-form-item>
|
||||
<!-- 设备ip -->
|
||||
<el-form-item label="设备ip" prop="ip">
|
||||
<el-input
|
||||
v-model="currentVideoTypeDetail.ip"
|
||||
:placeholder="$t('message.videoManage.placeholder')"></el-input>
|
||||
</el-form-item>
|
||||
<!-- 设备NVR -->
|
||||
<el-form-item label="设备NVR" prop="nvrId">
|
||||
<el-input
|
||||
<el-select
|
||||
v-model="currentVideoTypeDetail.nvrId"
|
||||
:placeholder="$t('message.videoManage.pleaseSelect')" :clearable="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in nvrList"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-input
|
||||
v-model="currentVideoTypeDetail.nvrId"
|
||||
:placeholder="$t('message.videoManage.placeholder')"></el-input>
|
||||
:placeholder="$t('message.videoManage.placeholder')"></el-input> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="dialog-footer">
|
||||
@ -578,7 +702,12 @@
|
||||
getvideoNvrApi,
|
||||
addvideoNvrApi,
|
||||
editvideoNvrApi,
|
||||
delvideoNvrApi
|
||||
delvideoNvrApi,
|
||||
addPluginApi,
|
||||
getPluginApi,
|
||||
editPluginApi,
|
||||
delPluginApi,
|
||||
getAllNvrApi
|
||||
} from "@/assets/js/api/equipmentCenter/cameraList";
|
||||
import {
|
||||
getProjectChilderSystemUserListApi
|
||||
@ -612,18 +741,43 @@
|
||||
},
|
||||
addDevice:false,
|
||||
nvrTitle:'',
|
||||
pluginTitle:'',
|
||||
mode:1,
|
||||
pageNo:1,
|
||||
pageSizes:[5,10,20,50],
|
||||
pageSize:10,
|
||||
total:0,
|
||||
pageNo1:1,
|
||||
pageSize1:10,
|
||||
total1:0,
|
||||
tableData:[],
|
||||
tableData1:[],
|
||||
pluginDevice:false, // 插件弹窗
|
||||
formInline1:{
|
||||
name:"",
|
||||
ip:"",
|
||||
sn:""
|
||||
},
|
||||
timeRange:[],
|
||||
addPlugin:false,
|
||||
addPluginData:{
|
||||
name:"",
|
||||
ip:"",
|
||||
sn:"",
|
||||
deviceState:"",
|
||||
},
|
||||
rules1:{
|
||||
ip:[{ required: true, message: this.$t('message.videoManage.required'), trigger: 'blur' },],
|
||||
deviceState:[{ required: true, message: this.$t('message.videoManage.required'), trigger: 'blur' },],
|
||||
name:[{ required: true, message: this.$t('message.videoManage.required'), trigger: 'blur' },],
|
||||
nvrSn:[{ required: true, message: this.$t('message.videoManage.required'), trigger: 'blur' },],
|
||||
},
|
||||
rules2:{
|
||||
ip:[{ required: true, message: this.$t('message.videoManage.required'), trigger: 'blur' },],
|
||||
deviceState:[{ required: true, message: this.$t('message.videoManage.required'), trigger: 'blur' },],
|
||||
name:[{ required: true, message: this.$t('message.videoManage.required'), trigger: 'blur' },],
|
||||
sn:[{ required: true, message: this.$t('message.videoManage.required'), trigger: 'blur' },],
|
||||
},
|
||||
account_Config: {},
|
||||
projectVideoConfigList: [],
|
||||
configDialog: false,
|
||||
@ -660,6 +814,7 @@
|
||||
accountList:[],
|
||||
organizationID:'',
|
||||
groupList:[],
|
||||
nvrList:[],
|
||||
activeGroupIndex:'',
|
||||
currentGroupInfo:null,
|
||||
isAddGroup:true,
|
||||
@ -680,6 +835,7 @@
|
||||
this.getProjectVideoConfigList();
|
||||
this.getAccountList()
|
||||
this.getVideoGroup()
|
||||
this.getAll()
|
||||
},
|
||||
components: {cameraList,cameraListLc},
|
||||
methods: {
|
||||
@ -688,6 +844,13 @@
|
||||
this.nvrDevice = true
|
||||
this.getvideoNvrList()
|
||||
},
|
||||
getAll(){
|
||||
getAllNvrApi({projectSn : this.projectSn}).then((res)=>{
|
||||
this.nvrList = res.result.map((item,index)=>{
|
||||
return { value:item.id,label:index}
|
||||
})
|
||||
})
|
||||
},
|
||||
getvideoNvrList(){
|
||||
let data = this.formInline
|
||||
data.projectSn = this.projectSn
|
||||
@ -715,18 +878,32 @@
|
||||
this.nvrTitle = '新增nvr设备'
|
||||
this.mode = 1
|
||||
},
|
||||
editBtn(val){
|
||||
this.addFormData = val
|
||||
this.addDevice = true,
|
||||
this.nvrTitle = '编辑nvr设备'
|
||||
this.mode = 2
|
||||
editBtn(val,type){
|
||||
if(type == 1){
|
||||
this.addFormData = val
|
||||
this.addDevice = true,
|
||||
this.nvrTitle = '编辑nvr设备'
|
||||
this.mode = 2
|
||||
}else{
|
||||
this.addPluginData.ip = val.ip
|
||||
this.addPluginData.deviceState = val.deviceState
|
||||
this.addPluginData.sn = val.sn
|
||||
this.addPluginData.name = val.name
|
||||
this.addPluginData.id = val.id
|
||||
console.log('this.addPluginData',this.addPluginData)
|
||||
this.addPlugin = true
|
||||
this.pluginTitle = '编辑监控插件'
|
||||
this.mode = 4
|
||||
}
|
||||
|
||||
},
|
||||
deleteBtn(val){
|
||||
this.$confirm('删除当前nvr设备,相关联的摄像头也将被删除,确认删除吗?, 是否继续?', '提示', {
|
||||
deleteBtn(val,type){
|
||||
if(type == 1){
|
||||
this.$confirm('删除当前nvr设备,相关联的摄像头也将被删除,确认删除吗?, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
}).then(() => {
|
||||
delvideoNvrApi({id: val.id}).then(res=>{
|
||||
if(res.code == 200){
|
||||
this.$message({
|
||||
@ -742,6 +919,29 @@
|
||||
message: '已取消删除'
|
||||
});
|
||||
})
|
||||
}else{
|
||||
this.$confirm('删除当前插件会导致对应编号工地推送数据异常,确认删除吗?, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delPluginApi({id: val.id}).then(res=>{
|
||||
if(res.code == 200){
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
this.getPluginList();
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
addDeviceSubmit(){
|
||||
let data = this.addFormData
|
||||
@ -754,7 +954,7 @@
|
||||
this.addDevice = false
|
||||
}
|
||||
})
|
||||
}else{
|
||||
}else if(this.mode == 2){
|
||||
editvideoNvrApi(data).then((res)=>{
|
||||
if(res.code == 200){
|
||||
this.$message.success('编辑成功!')
|
||||
@ -763,6 +963,66 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 插件
|
||||
pluginManage(){
|
||||
this.pluginDevice = true
|
||||
this.getPluginList()
|
||||
},
|
||||
getPluginList(){
|
||||
let data = this.formInline1
|
||||
data.projectSn = this.projectSn
|
||||
data.size=this.pageSize1
|
||||
data.current = this.pageNo1,
|
||||
data.startLastDataTime = this.timeRange != null ? this.timeRange[0] : "",
|
||||
data.endLastDataTime = this.timeRange != null ? this.timeRange[1] : "",
|
||||
getPluginApi(data).then((res)=>{
|
||||
console.log('查询结果',res)
|
||||
if(res.code == 200){
|
||||
this.tableData1 = res.result.records
|
||||
this.total1 = res.result.total
|
||||
}
|
||||
})
|
||||
},
|
||||
onSearch1(){
|
||||
this.getPluginList()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.getPluginList()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageNo1 = val
|
||||
this.getPluginList()
|
||||
},
|
||||
onAdd1(){
|
||||
this.addPluginData = {}
|
||||
this.addPlugin = true
|
||||
this.pluginTitle = '新增监控插件'
|
||||
this.mode = 3
|
||||
},
|
||||
addPluginSubmit(){
|
||||
let data = this.addPluginData
|
||||
data.projectSn = this.projectSn
|
||||
if(this.mode == 3){
|
||||
addPluginApi(data).then((res)=>{
|
||||
if(res.code == 200) {
|
||||
this.$message.success('新增成功!')
|
||||
}
|
||||
this.addPlugin = false
|
||||
this.getPluginList()
|
||||
})
|
||||
}else if(this.mode == 4){
|
||||
console.log('编辑参数',data)
|
||||
editPluginApi(data).then((res)=>{
|
||||
if(res.code == 200){
|
||||
console.log('编辑的结果',res)
|
||||
this.$message.success('编辑成功!')
|
||||
this.getPluginList()
|
||||
this.addPlugin = false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
uploadThirdParty(){
|
||||
sendVideoInfoApi({projectSn: this.projectSn}).then(res=>{
|
||||
|
||||
@ -1687,6 +1687,25 @@ export default {
|
||||
},
|
||||
itemStyle: {
|
||||
color: "#3A7BFF"
|
||||
},
|
||||
markLine:{
|
||||
symbol:"none",
|
||||
label:{
|
||||
position:"end",
|
||||
},
|
||||
data:[{
|
||||
silent:false,
|
||||
// 警告线的样式
|
||||
lineStyle:{
|
||||
type:"solid",
|
||||
color:"#f76462",
|
||||
},
|
||||
label:{
|
||||
position:'end',
|
||||
formatter:'报警值(3)'
|
||||
},
|
||||
yAxis:3
|
||||
}]
|
||||
}
|
||||
// markLine:{
|
||||
// data:[{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user