Browse Source

优化;摄像机获取4g信号

master
4670101279 2 years ago
parent
commit
37ed6170c3
  1. 4
      src/views/data/currdata/index.vue
  2. 47
      src/views/data/photo/index.vue
  3. 83
      src/views/web/camera/index.vue

4
src/views/data/currdata/index.vue

@ -9,14 +9,14 @@ @@ -9,14 +9,14 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="水位计名称" prop="stcd">
<!-- <el-form-item label="水位计名称" prop="stcd">
<el-input
v-model="queryParams.stcd"
placeholder="请输入水位计名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item> -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>

47
src/views/data/photo/index.vue

@ -9,14 +9,14 @@ @@ -9,14 +9,14 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="水位计" prop="ip">
<!-- <el-form-item label="水位计" prop="ip">
<el-input
v-model="queryParams.stcd"
placeholder="请输入水位计名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item> -->
<el-form-item label="开始时间">
<el-date-picker
v-model="queryParams.startTime"
@ -48,13 +48,13 @@ @@ -48,13 +48,13 @@
:src="item.imgName"
:preview-src-list="srcList"
@click="show(item.imgName)"
></el-image>
<div class="info">
<div class="station">
<div class="nm">{{item.stnm}}</div>
<div class="ip">{{item.ip}}</div>
<!-- <div class="ip">{{item.ip}}</div> -->
</div>
<div class="data">
<div class="value">{{item.value}}</div>
@ -76,9 +76,9 @@ @@ -76,9 +76,9 @@
<!-- <img class="show-img" :src="showImg" /> -->
</el-dialog>
</div>
</template>
<script>
@ -96,7 +96,7 @@ export default { @@ -96,7 +96,7 @@ export default {
//
currdataList: [],
imgUrl:'',
//
queryParams: {
endTime: '2022-06-26 10:55:00',
@ -104,31 +104,31 @@ export default { @@ -104,31 +104,31 @@ export default {
page: 1,
limit: 10,
stnmId: null,
stnm: '鄞州公园',
stcd: '视频水位计-yzgy',
stnm: null,
stcd: null,
mainType: null,
type: null,
deviceTypeId: null,
stcdTypeId: null,
latestTm: null,
latestValue: null,
},
open: false,
showImg : '',
srcList:[],
}
},
created() {
this.getTime();
this.getList();
},
methods: {
/** 查询实时数据列表 */
getList() {
this.loading = true;
@ -141,16 +141,16 @@ export default { @@ -141,16 +141,16 @@ export default {
this.total=response.count;
this.currdataList.forEach(function(e,index){
if(e.imgName=='' ||e.imgName==null){
e.imgName=errorImg
}else{
e.imgName='https://www.huastech.com.cn'+e.imgName
}
})
this.loading = false;
})
},
/** 搜索按钮操作 */
@ -173,10 +173,10 @@ export default { @@ -173,10 +173,10 @@ export default {
/** 设置初始时间*/
getTime(){
var timestamp = new Date();
this.queryParams.endTime=formatDate(timestamp,'yyyy-MM-dd hh:mm:ss')
this.queryParams.startTime=formatDate(new Date(timestamp.getTime()-86400*2000),('yyyy-MM-dd hh:mm:ss'));
}
}
};
@ -211,5 +211,10 @@ export default { @@ -211,5 +211,10 @@ export default {
}
.nm {
color: #333;
margin-top: 10px;
font-size: 20px;
}
.value{
text-align: center;
}
</style>

83
src/views/web/camera/index.vue

@ -70,6 +70,7 @@ @@ -70,6 +70,7 @@
<el-table-column label="设备序列号" align="center" prop="devsn" />
<el-table-column label="首次注册时间" align="center" prop="firstTime" />
<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">
<template slot-scope="scope">
<span v-if="scope.row.status == 1"><el-tag type="success">在线</el-tag></span>
@ -78,7 +79,7 @@ @@ -78,7 +79,7 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
<!-- <el-button
size="mini"
type="text"
icon="el-icon-setting"
@ -91,7 +92,7 @@ @@ -91,7 +92,7 @@
icon="el-icon-search"
@click="showVideo(scope.row)"
v-hasPermi="['web:camera:remove']"
>查看视频</el-button>
>查看视频</el-button> -->
<el-button
size="mini"
type="text"
@ -99,13 +100,14 @@ @@ -99,13 +100,14 @@
@click="handleUpdate(scope.row)"
v-hasPermi="['web:camera:edit']"
>修改</el-button>
<el-button
<!-- <el-button
size="mini"
type="text"
icon="el-icon-refresh"
@click="reboot(scope.row)"
v-hasPermi="['web:camera:remove']"
>重启</el-button>
v-loading.fullscreen.lock="fullscreenLoading"
>重启</el-button> -->
<el-button
size="mini"
type="text"
@ -113,6 +115,22 @@ @@ -113,6 +115,22 @@
@click="handleDelete(scope.row)"
v-hasPermi="['web:camera:remove']"
>删除</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>
</el-table-column>
</el-table>
@ -210,6 +228,8 @@ export default { @@ -210,6 +228,8 @@ export default {
return {
//
loading: true,
fullscreenLoading: false,
//
ids: [],
//
@ -328,6 +348,25 @@ export default { @@ -328,6 +348,25 @@ export default {
this.open = true;
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) {
this.reset();
@ -339,9 +378,27 @@ export default { @@ -339,9 +378,27 @@ export default {
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){
this.ftpCfgReset();
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});
if(res.code === 0){
this.ftp.form = res.data;
@ -358,16 +415,30 @@ export default { @@ -358,16 +415,30 @@ export default {
this.ftp.open = false;
}
},
async reboot(row) {
reboot(row) {
const id = row.id;
const status = row.status;
if(status != 1){
this.$modal.msg("设备未在线");
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);
if(res.code === 0){
this.$modal.msgSuccess("执行成功");
// this.fullscreenLoading = false;
loading.close();
this.$modal.msgSuccess("执行成功,请稍等几分钟后继续操作");
this.getList();
}
},

Loading…
Cancel
Save