|
|
@@ -60,15 +60,15 @@
|
|
|
>
|
|
|
<!-- <div class="contentshow"> -->
|
|
|
<div class="envir-conditoin" v-show="item.temp ? true : false">
|
|
|
- 温度:{{ item.temp }}
|
|
|
+ 温度:{{ item.temp|numToFixed }}
|
|
|
</div>
|
|
|
<div
|
|
|
class="envir-conditoin"
|
|
|
v-show="item.humidness ? true : false"
|
|
|
>
|
|
|
- 湿度:{{ item.humidness }}
|
|
|
+ 湿度:{{ item.humidness|numToFixed }}
|
|
|
</div>
|
|
|
- <div class="envir-conditoin">气压:{{ item.airPressure }}</div>
|
|
|
+ <div class="envir-conditoin">气压:{{ item.airPressure |numToFixed}}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -92,6 +92,7 @@
|
|
|
|
|
|
<script>
|
|
|
import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
|
|
|
+import { number } from 'echarts/lib/export';
|
|
|
export default {
|
|
|
name: "DataView",
|
|
|
data() {
|
|
|
@@ -316,6 +317,9 @@ export default {
|
|
|
},
|
|
|
filters: {
|
|
|
numToFixed: function (value) {
|
|
|
+ if(!value){
|
|
|
+ return
|
|
|
+ }
|
|
|
return value.toFixed(2);
|
|
|
},
|
|
|
},
|
|
|
@@ -361,7 +365,6 @@ export default {
|
|
|
let newdata = [];
|
|
|
curdPost("sql", sqlString).then((response) => {
|
|
|
newdata = response.variables.data;
|
|
|
- console.log(newdata);
|
|
|
this_.newTiMe = this_.fmtDate(newdata[0].saveTime);
|
|
|
for (let i = 0; i < newdata.length; i++) {
|
|
|
setTimeout(() => {
|
|
|
@@ -384,8 +387,6 @@ export default {
|
|
|
this.mapChange();
|
|
|
},
|
|
|
mapEvent(e) {
|
|
|
- console.log(e.offsetX, e.offsetY, " x ");
|
|
|
- console.log(e.target.height, e.target.width, "y");
|
|
|
},
|
|
|
screenChange() {
|
|
|
this.fullHeight = `${document.documentElement.clientHeight}`;
|
|
|
@@ -460,9 +461,9 @@ export default {
|
|
|
ifshow = "true";
|
|
|
return ifshow;
|
|
|
}
|
|
|
- let temp = t.toFixed(2);
|
|
|
- let humidness = h.toFixed(2);
|
|
|
- let airPressure = p.toFixed(2);
|
|
|
+ let temp = t.toFixed(2); //温度
|
|
|
+ let humidness = h.toFixed(2); //湿度
|
|
|
+ let airPressure =Math.abs(p.toFixed(2)) ; //气压
|
|
|
// let ifshow = "";
|
|
|
|
|
|
if (temp > 999 || temp <= 0) {
|
|
|
@@ -478,9 +479,11 @@ export default {
|
|
|
} else {
|
|
|
ifshow = "false";
|
|
|
}
|
|
|
+
|
|
|
if (airPressure > 999) {
|
|
|
//不给予赋值
|
|
|
} else if (airPressure >= qiya) {
|
|
|
+ console.log(airPressure > qiya,Math.abs(airPressure),airPressure ,qiya,"数据")
|
|
|
ifshow = "true";
|
|
|
} else {
|
|
|
ifshow = "false";
|
|
|
@@ -882,7 +885,6 @@ export default {
|
|
|
// this_.newweizhi[31].ifshow = this_.returnifShow(999,999,data[0].p5);
|
|
|
// this_.newweizhi[37].run = data[0].run;
|
|
|
|
|
|
- console.log(this_.newweizhi, "新位置数据");
|
|
|
});
|
|
|
},
|
|
|
},
|
|
|
@@ -1146,7 +1148,7 @@ li {
|
|
|
}
|
|
|
.envir-conditoin {
|
|
|
text-align: left;
|
|
|
- width: 76px;
|
|
|
+ width: 80px;
|
|
|
white-space: nowrap;
|
|
|
height: 20px;
|
|
|
line-height: 20px;
|