Commit e2bbaee9 authored by yaqizhang's avatar yaqizhang

添加单位

parent f3f82940
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
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>
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
工况累积量:<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>
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
标况流量:<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>
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
温度:<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>
...@@ -140,20 +140,21 @@ ...@@ -140,20 +140,21 @@
</template> </template>
<script> <script>
import { realtimeData, getData } from "@/api/dataMonitoring/reportData"; let closeInfoWindowTimer = null;
import moment from "moment"; import { realtimeData, getData } from "@/api/dataMonitoring/reportData";
//line移入时的的infowindow import moment from "moment";
export default { //line移入时的的infowindow
export default {
props: { props: {
obj: { typs: Object }, obj: { typs: Object },
title: "", title: "",
data: {}, data: {},
map: null, map: null,
}, },
data(){ data() {
return{ return {
deviceId:"", deviceId: "",
alarm:{}, alarm: {},
} }
}, },
mounted() { mounted() {
...@@ -163,6 +164,16 @@ export default { ...@@ -163,6 +164,16 @@ export default {
if (this.data.deviceType == 3 || this.data.deviceType == 4) { if (this.data.deviceType == 3 || this.data.deviceType == 4) {
this.getDataid(); this.getDataid();
this.data.class.view.deviceTimer = setInterval(this.getDataid, 5000); this.data.class.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.class.view.deviceTimer)
clearInterval(closeInfoWindowTimer)
console.log("请求关闭")
}
}, 1000)
} }
}, },
...@@ -187,31 +198,49 @@ export default { ...@@ -187,31 +198,49 @@ export default {
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;
} ,
close() { close() {
this.map.clearInfoWindow(); this.map.clearInfoWindow();
this.data.class.view.domAllShow() this.data.class.view.domAllShow()
}, },
}, },
}; };
</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;
// background: #fff; // background: #fff;
...@@ -219,6 +248,7 @@ export default { ...@@ -219,6 +248,7 @@ export default {
background: rgba(7, 29, 51, 0.9); background: rgba(7, 29, 51, 0.9);
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16); box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
color: #fff; color: #fff;
// overflow: hidden; // overflow: hidden;
.top { .top {
width: 100%; width: 100%;
...@@ -227,6 +257,7 @@ export default { ...@@ -227,6 +257,7 @@ export default {
background-image: url(../../assets/images/blueTopBg.png); background-image: url(../../assets/images/blueTopBg.png);
background-size: 100% 100%; background-size: 100% 100%;
background-position: center; background-position: center;
&:before { &:before {
// content: ""; // content: "";
// position: absolute; // position: absolute;
...@@ -247,22 +278,27 @@ export default { ...@@ -247,22 +278,27 @@ export default {
height: 33px; height: 33px;
background-image: url(../../assets/images/blueLeftTriangle.png); background-image: url(../../assets/images/blueLeftTriangle.png);
} }
.text { .text {
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
color: #ffffff; color: #ffffff;
line-height: 51px; line-height: 51px;
} }
.left { .left {
padding-left: 22px; padding-left: 22px;
} }
.right { .right {
padding-right: 22px; padding-right: 22px;
img { img {
cursor: pointer; cursor: pointer;
} }
} }
} }
.content { .content {
position: relative; position: relative;
max-height: 300px; max-height: 300px;
...@@ -270,23 +306,28 @@ export default { ...@@ -270,23 +306,28 @@ export default {
overflow-y: auto; overflow-y: auto;
padding-bottom: 2px; padding-bottom: 2px;
border-bottom: 1px solid #eeeeee; border-bottom: 1px solid #eeeeee;
.eq-content { .eq-content {
// min-height: 156px; // min-height: 156px;
box-sizing: border-box; box-sizing: border-box;
padding: 13px 22px 0px 22px; padding: 13px 22px 0px 22px;
// border-bottom: 1px solid #e2e2e2; // border-bottom: 1px solid #e2e2e2;
.text-wrapper { .text-wrapper {
padding-top: 1px; padding-top: 1px;
& > div {
&>div {
margin-bottom: 6px; margin-bottom: 6px;
} }
.eq-text { .eq-text {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
// color: #1d1d1d; // color: #1d1d1d;
color: #fff; color: #fff;
opacity: 1; opacity: 1;
& > span {
&>span {
vertical-align: top; vertical-align: top;
display: inline-block; display: inline-block;
// white-space: nowrap; // white-space: nowrap;
...@@ -297,9 +338,11 @@ export default { ...@@ -297,9 +338,11 @@ export default {
} }
} }
} }
.pic { .pic {
width: 180px; width: 180px;
height: 103px; height: 103px;
// background-color: black; // background-color: black;
img { img {
width: 100%; width: 100%;
...@@ -318,11 +361,13 @@ export default { ...@@ -318,11 +361,13 @@ export default {
// padding-bottom: 10px; // padding-bottom: 10px;
// padding-top: 16px; // padding-top: 16px;
box-sizing: border-box; box-sizing: border-box;
// border-bottom: 1px solid #e2e2e2; // border-bottom: 1px solid #e2e2e2;
& > div { &>div {
margin-bottom: 8px; margin-bottom: 8px;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
span { span {
vertical-align: top; vertical-align: top;
display: inline-block; display: inline-block;
...@@ -331,21 +376,25 @@ export default { ...@@ -331,21 +376,25 @@ export default {
} }
} }
} }
.warn-wrapper { .warn-wrapper {
.warn-content { .warn-content {
box-sizing: border-box; box-sizing: border-box;
padding: 10px 0 2px 22px; padding: 10px 0 2px 22px;
border-bottom: 1px solid #e2e2e2; border-bottom: 1px solid #e2e2e2;
color: #fe5966; color: #fe5966;
& > div {
&>div {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
margin-bottom: 8px; margin-bottom: 8px;
} }
} }
.btn { .btn {
padding: 16px 0; padding: 16px 0;
text-align: center; text-align: center;
.elbtn { .elbtn {
background-color: #053b6a; background-color: #053b6a;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16); box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
...@@ -354,12 +403,12 @@ export default { ...@@ -354,12 +403,12 @@ export default {
} }
} }
} }
} }
.wrapperEditorPage { .wrapperEditorPage {}
}
.display-default { .display-default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
</style> </style>
\ No newline at end of file
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
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>
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
工况累积量:<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>
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
标况流量:<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>
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
温度:<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>
...@@ -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