Commit e2bbaee9 authored by yaqizhang's avatar yaqizhang

添加单位

parent f3f82940
...@@ -74,68 +74,68 @@ ...@@ -74,68 +74,68 @@
</div> </div>
<template v-if="data.deviceType ==3 || data.deviceType==4"> <template v-if="data.deviceType ==3 || data.deviceType==4">
<div v-if="data.deviceType==3" class="windowwarn-content" style=" <div v-if="data.deviceType==3" class="windowwarn-content" style="
border-bottom: 1px solid #e2e2e2; border-bottom: 1px solid #e2e2e2;
padding: 10px 0 2px 22px; padding: 10px 0 2px 22px;
height: 150px;padding-bottom: 2px; height: 150px;padding-bottom: 2px;
"> ">
<el-col :span="11"> <el-col :span="12">
<div class="windowwarn"> <div class="windowwarn">
标况累积量:<span class="standardConditionAccumulation"></span> 标况累积量:<span class="standardConditionAccumulation"></span>
</div> </div>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<div class="windowwarn"> <div class="windowwarn">
工况累积量:<span class="workingConditionAccumulation"></span> 工况累积量:<span class="workingConditionAccumulation"></span>
</div> </div>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="12">
<div class="windowwarn"> <div class="windowwarn">
剩余量:<span class="residualQuantity"></span> 剩余量:<span class="residualQuantity"></span>
</div> </div>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<div class="windowwarn"> <div class="windowwarn">
标况流量:<span class="standardConditionFlow"></span> 标况流量:<span class="standardConditionFlow"></span>
</div> </div>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="12">
<div class="windowwarn"> <div class="windowwarn">
工况流量:<span class="workingConditionFlow"></span> 工况流量:<span class="workingConditionFlow"></span>
</div> </div>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<div class="windowwarn"> <div class="windowwarn">
温度:<span class="temperature"></span> 温度:<span class="temperature"></span>
</div> </div>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="12">
<div class="windowwarn"> <div class="windowwarn">
压力:<span class="pressure"></span> 压力:<span class="pressure"></span>
</div> </div>
</el-col> </el-col>
<el-col :span="15"> <el-col :span="15">
<div class="windowwarn"> <div class="windowwarn">
上报时间:<span class="reportTime"></span> 上报时间:<span class="reportTime"></span>
</div> </div>
</el-col> </el-col>
</div> </div>
<div v-if="data.deviceType==4" class="windowwarn-content" style=" <div v-if="data.deviceType==4" class="windowwarn-content" style="
border-bottom: 1px solid #e2e2e2; border-bottom: 1px solid #e2e2e2;
padding: 10px 0 2px 22px; padding: 10px 0 2px 22px;
height: 70px;padding-bottom: 2px; height: 70px;padding-bottom: 2px;
"> ">
<el-col :span="24"> <el-col :span="24">
<div class="windowwarn"> <div class="windowwarn">
压力:<span class="pressure"></span> 压力:<span class="pressure"></span>
</div> </div>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<div class="windowwarn"> <div class="windowwarn">
上报时间:<span class="reportTime"></span> 上报时间:<span class="reportTime"></span>
</div> </div>
</el-col> </el-col>
</div> </div>
</template> </template>
...@@ -157,6 +157,7 @@ ...@@ -157,6 +157,7 @@
</template> </template>
<script> <script>
let closeInfoWindowTimer;
import { realtimeData, getData } from "@/api/dataMonitoring/reportData"; import { realtimeData, getData } from "@/api/dataMonitoring/reportData";
import moment from "moment"; import moment from "moment";
//line移入时的的infowindow //line移入时的的infowindow
...@@ -179,13 +180,23 @@ ...@@ -179,13 +180,23 @@
}; };
}, },
mounted() { mounted() {
clearInterval(this.data.view.deviceTimer); clearInterval(this.data.view.deviceTimer)
if (this.data.deviceType == 3 || this.data.deviceType == 4) { if (this.data.deviceType == 3 || this.data.deviceType == 4) {
this.getDataid(); this.getDataid();
this.data.view.deviceTimer = setInterval(this.getDataid, 5000); this.data.view.deviceTimer = setInterval(this.getDataid, 5000);
closeInfoWindowTimer = setInterval(() => {
const dom = document.getElementsByClassName("amap-info")[0];
const disPlay = dom?.style.display;
if (!dom || (dom && disPlay == "none")) {
clearInterval(this.data.view.deviceTimer)
clearInterval(closeInfoWindowTimer)
console.log("请求关闭")
}
}, 1000)
} }
}, },
computed: { computed: {
orderId() { orderId() {
...@@ -206,12 +217,28 @@ ...@@ -206,12 +217,28 @@
changeValue(data) { changeValue(data) {
const keyArr = Object.keys(data); const keyArr = Object.keys(data);
keyArr.forEach((item) => { keyArr.forEach((item) => {
const dw = this.danwei(item)
const dom = document.getElementsByClassName(item)[0]; const dom = document.getElementsByClassName(item)[0];
if (dom) { if (dom) {
dom.innerHTML = data[item]; dom.innerHTML = data[item] +"&nbsp"+dw;
} }
}) })
}, },
danwei(item) {
let dw='';
if(item =='standardConditionAccumulation' || item == 'workingConditionAccumulation' || item == 'residualQuantity'){
dw="m³"
}else if(item =='standardConditionFlow'|| item == 'workingConditionFlow'){
dw="m³/h"
}else if(item =='temperature'){
dw="℃"
}else if(item == 'pressure'){
dw="KPa"
}else if(item == 'reportTime'){
dw=" "
}
return dw;
} ,
createWork() { createWork() {
// 控制外层弹框 // 控制外层弹框
// console.log(this.data.view.$refs.CreateWork); // console.log(this.data.view.$refs.CreateWork);
...@@ -275,15 +302,17 @@ ...@@ -275,15 +302,17 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.windowwarn-content{ .windowwarn-content {
div{ div {
font-size: 14px; font-size: 14px;
font-wwight: 400; font-wwight: 400;
.windowwarn{
.windowwarn {
margin-bottom: 7px; margin-bottom: 7px;
} }
} }
} }
.wrapper { .wrapper {
width: 406px; width: 406px;
max-height: 600px; max-height: 600px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment