装置信息

master
liuyi 2 years ago
parent 1084e4c4ae
commit 200ca65013

@ -36,6 +36,24 @@ export function getChannelByTermidJoggle(data) {
}); });
} }
//获取装置信息
export function getDeviceList(data) {
return request({
url: "/api/getTerminalStatus",
method: "post",
data,
headers:{ 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' }
});
}
//获取最新装置信息
export function getNewDeviceList(data) {
return request({
url: "/api/getLastedTerminalStatus",
method: "post",
data,
});
}
//图片轮巡 //图片轮巡
//获取图片轮巡接口 //获取图片轮巡接口
export function getPictureList(data) { export function getPictureList(data) {

@ -5,37 +5,36 @@
:visible.sync="isShow" :visible.sync="isShow"
:close-on-click-modal="false" :close-on-click-modal="false"
width="50%" width="50%"
@close="handleclose"
> >
<div class="infoTable"> <div class="infoTable">
<el-descriptions class="margin-top" :column="1" border> <el-descriptions class="margin-top" :column="1" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 图像监测装置 ID </template> <template slot="label"> 装置编号 </template>{{ infornr.termId }}
XYIGQ10C230300104
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 装置名称 </template> <template slot="label"> 电池电量 </template>{{ infornr.batteryCapacity }}
XYIGQ10C230300104
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 装置型号 </template> <template slot="label"> 电池电压 </template>{{ infornr.batteryVoltage }}
xxx
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 装置基本信息版本号 </template> <template slot="label"> MEID </template>{{ infornr.cmld }}
xxxxxxxxxxxx
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 生产厂家 </template> <template slot="label"> 网络连接状态 </template>{{ infornr.connectionState }}
xxxxxxxxxxxxxxxxxxxxxxxx
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 生产日期 </template> <template slot="label"> 浮充状态 </template>{{ infornr.floatingCharge }}
xxxxxxxxxxxxxxxxxxxxx
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 出厂编号 </template> <template slot="label"> 工作总时间小时 </template>{{ infornr.totalWorkingTime }}
xxxxxxxxxxxxxxxxxx </el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 本次连续工作时间小时 </template>{{ infornr.workingTime }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 工作状态更新时间 </template>{{ infornr.wsUpdateTime }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</div> </div>
@ -46,7 +45,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { getChannelListJoggle } from "@/utils/api/index"; import { getDeviceList, getNewDeviceList } from "@/utils/api/index";
export default { export default {
props: { props: {
title: String, title: String,
@ -55,16 +54,53 @@ export default {
return { return {
loading: true, loading: true,
isShow: false, isShow: false,
infornr:{},//
timer:null,
queryTime:'',//
}; };
}, },
mounted() {}, mounted() {},
methods: { methods: {
//
getListData(val){
getDeviceList({
termId: val,
}).then((res) => {
this.infornr = res.data;
this.queryTime = res.data.queryTime
console.log(this.queryTime)
this.timer = window.setInterval(() => {
this.getNewListData(val);
}, 10000);
})
.catch((err) => {});
},
//
getNewListData(val){
getNewDeviceList({
termId: val,
queryTime: this.queryTime
}).then((res) => {
if (res.data!==null) {
this.infornr = res.data;
this.$message({
message: "装置信息已更新",
type: "success",
});
clearInterval(this.timer);
}
})
.catch((err) => {});
},
display() { display() {
this.isShow = true; this.isShow = true;
}, },
hide() { hide() {
this.isShow = false; this.isShow = false;
}, },
handleclose(){
clearInterval(this.timer);
}
}, },
}; };
</script> </script>

@ -467,6 +467,7 @@ export default {
//handleShowInfo //handleShowInfo
handleShowInfo() { handleShowInfo() {
this.$refs.infodialog_ref.display(); this.$refs.infodialog_ref.display();
this.$refs.infodialog_ref.getListData(this.channelId);
}, },
// //
// handlehistoryPic() { // handlehistoryPic() {

Loading…
Cancel
Save