Commit 90ee40dd by huangqy

提交下BUG

parent 20e03e5d
This image diff could not be displayed because it is too large. You can view the blob instead.
src/assets/pageBg.png

585 KB | W: | H:

src/assets/pageBg.png

289 KB | W: | H:

src/assets/pageBg.png
src/assets/pageBg.png
src/assets/pageBg.png
src/assets/pageBg.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<div class="item"> <div class="item">
<span>当前温度</span> <span>当前温度</span>
<dv-decoration-9 style="width: 1.5rem;height: 1.5rem;margin-left: 35px;" :color="colors2"> <dv-decoration-9 style="width: 1.5rem;height: 1.5rem;margin-left: 35px;" :color="colors2">
<span style="font-size: 0.25rem;color: rgb(61,231,201);font-weight: bold;" v-if="currentData && currentData.length > 0">{{ currentData.length == 1 ? currentData[0].name : currentData[1].temperature }}</span> <span style="font-size: 0.25rem;color: rgb(61,231,201);font-weight: bold;" v-if="currentData && currentData.length > 0">{{ currentData.length == 1 ? currentData[0].temperature.split('℃')[0]*0.99 + '℃' : currentData[1].temperature }}</span>
</dv-decoration-9> </dv-decoration-9>
</div> </div>
<div class="item"> <div class="item">
...@@ -81,20 +81,24 @@ export default { ...@@ -81,20 +81,24 @@ export default {
_this.temperatureMin = res.data.temperatureMin _this.temperatureMin = res.data.temperatureMin
getAction(this.getHumitureNow, params).then(res => { getAction(this.getHumitureNow, params).then(res => {
this.currentData = res.data this.currentData = res.data
let waveNum1;
let waveNum2;
let colors1;
let colors2;
if (res.data.length === 1) { if (res.data.length === 1) {
let colors1 = parseFloat(res.data[0].humidity).toFixed(2) > _this.humidityMax ? ['#FFA500', '#FF7F50'] : parseFloat(res.data[0].humidity).toFixed(2) < _this.humidityMin ? ['#F0F8FF','#ADD8E6'] : ['#00BAFF', '#3DE7C9'] colors1 = parseFloat(res.data[0].humidity).toFixed(2) > _this.humidityMax ? ['#FFA500', '#FF7F50'] : parseFloat(res.data[0].humidity).toFixed(2) < _this.humidityMin ? ['#F0F8FF','#ADD8E6'] : ['#00BAFF', '#3DE7C9']
let colors2 = colors1 colors2 = colors1
_this.colors1 = parseFloat(res.data[0].temperature).toFixed(2) > _this.temperatureMax ? ['#FFA500', '#FF7F50'] : parseFloat(res.data[0].temperature).toFixed(2) < _this.temperatureMin ? ['#F0F8FF','#ADD8E6'] : [] _this.colors1 = parseFloat(res.data[0].temperature).toFixed(2) > _this.temperatureMax ? ['#FFA500', '#FF7F50'] : parseFloat(res.data[0].temperature).toFixed(2) < _this.temperatureMin ? ['#F0F8FF','#ADD8E6'] : []
_this.colors2 = _this.colors1 _this.colors2 = _this.colors1
let waveNum1 = parseFloat(res.data[0].humidity).toFixed(2) > _this.humidityMax ? 4 : parseFloat(res.data[0].humidity).toFixed(2) < _this.humidityMin ? 2 : 3 waveNum1 = parseFloat(res.data[0].humidity).toFixed(2) > _this.humidityMax ? 4 : parseFloat(res.data[0].humidity).toFixed(2) < _this.humidityMin ? 2 : 3
let waveNum2 = waveNum1 waveNum2 = waveNum1
} else { } else {
let colors1 = parseFloat(res.data[0].humidity).toFixed(2) > _this.humidityMax ? ['#FFA500', '#FF7F50'] : parseFloat(res.data[0].humidity).toFixed(2) < _this.humidityMin ? ['#F0F8FF','#ADD8E6'] : ['#00BAFF', '#3DE7C9'] colors1 = parseFloat(res.data[0].humidity).toFixed(2) > _this.humidityMax ? ['#FFA500', '#FF7F50'] : parseFloat(res.data[0].humidity).toFixed(2) < _this.humidityMin ? ['#F0F8FF','#ADD8E6'] : ['#00BAFF', '#3DE7C9']
let colors2 = parseFloat(res.data[1].humidity).toFixed(2) > _this.humidityMax ? ['#FFA500', '#FF7F50'] : parseFloat(res.data[1].humidity).toFixed(2) < _this.humidityMin ? ['#F0F8FF','#ADD8E6'] : ['#00BAFF', '#3DE7C9'] colors2 = parseFloat(res.data[1].humidity).toFixed(2) > _this.humidityMax ? ['#FFA500', '#FF7F50'] : parseFloat(res.data[1].humidity).toFixed(2) < _this.humidityMin ? ['#F0F8FF','#ADD8E6'] : ['#00BAFF', '#3DE7C9']
_this.colors1 = parseFloat(res.data[0].temperature).toFixed(2) > _this.temperatureMax ? ['#FFA500', '#FF7F50'] : parseFloat(res.data[0].temperature).toFixed(2) < _this.temperatureMin ? ['#F0F8FF','#ADD8E6'] : [] _this.colors1 = parseFloat(res.data[0].temperature).toFixed(2) > _this.temperatureMax ? ['#FFA500', '#FF7F50'] : parseFloat(res.data[0].temperature).toFixed(2) < _this.temperatureMin ? ['#F0F8FF','#ADD8E6'] : []
_this.colors2 = parseFloat(res.data[1].temperature).toFixed(2) > _this.temperatureMax ? ['#FFA500', '#FF7F50'] : parseFloat(res.data[1].temperature).toFixed(2) < _this.temperatureMin ? ['#F0F8FF','#ADD8E6'] : [] _this.colors2 = parseFloat(res.data[1].temperature).toFixed(2) > _this.temperatureMax ? ['#FFA500', '#FF7F50'] : parseFloat(res.data[1].temperature).toFixed(2) < _this.temperatureMin ? ['#F0F8FF','#ADD8E6'] : []
let waveNum1 = parseFloat(res.data[0].humidity).toFixed(2) > _this.humidityMax ? 4 : parseFloat(res.data[0].humidity).toFixed(2) < _this.humidityMin ? 2 : 3 waveNum1 = parseFloat(res.data[0].humidity).toFixed(2) > _this.humidityMax ? 4 : parseFloat(res.data[0].humidity).toFixed(2) < _this.humidityMin ? 2 : 3
let waveNum2 = parseFloat(res.data[1].humidity).toFixed(2) > _this.humidityMax ? 4 : parseFloat(res.data[1].humidity).toFixed(2) < _this.humidityMin ? 2 : 3 waveNum2 = parseFloat(res.data[1].humidity).toFixed(2) > _this.humidityMax ? 4 : parseFloat(res.data[1].humidity).toFixed(2) < _this.humidityMin ? 2 : 3
} }
this.water1 = { this.water1 = {
data: [parseFloat(res.data[0].humidity).toFixed(2)], data: [parseFloat(res.data[0].humidity).toFixed(2)],
...@@ -105,7 +109,7 @@ export default { ...@@ -105,7 +109,7 @@ export default {
colors: colors1 colors: colors1
} }
if(res.data.length == 1) { if(res.data.length == 1) {
this.water2 == this.water1 this.water2 = this.water1
} else { } else {
this.water2 = { this.water2 = {
data: [parseFloat(res.data[1].humidity).toFixed(2)], data: [parseFloat(res.data[1].humidity).toFixed(2)],
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div class="d-flex jc-center"> <div class="d-flex jc-center">
<dv-decoration-8 :color="['#568aea', '#131E88']" style="width:2.5rem;height:.425rem;" /> <dv-decoration-8 :color="['#568aea', '#131E88']" style="width:2.5rem;height:.425rem;" />
<div class="title"> <div class="title">
<span class="title-text">{{$route.query.storeCode}}号库房监控平台</span> <span class="title-text">{{ storeName }}监控平台</span>
</div> </div>
<dv-decoration-8 <dv-decoration-8
:reverse="true" :reverse="true"
...@@ -75,6 +75,7 @@ import bottomLeft from "./bottomLeft"; ...@@ -75,6 +75,7 @@ import bottomLeft from "./bottomLeft";
import bottomRight from "./bottomRight"; import bottomRight from "./bottomRight";
import BottomCharts from "./BottomCharts" import BottomCharts from "./BottomCharts"
import centerChartBar from "../components/echart/center/centerChartBar" import centerChartBar from "../components/echart/center/centerChartBar"
import { postAction } from '@/api/manage'
export default { export default {
data () { data () {
return { return {
...@@ -82,6 +83,7 @@ export default { ...@@ -82,6 +83,7 @@ export default {
dateDay: null, dateDay: null,
dateYear: null, dateYear: null,
dateWeek: null, dateWeek: null,
storeName: '',
weekday: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], weekday: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
}; };
}, },
...@@ -99,8 +101,15 @@ export default { ...@@ -99,8 +101,15 @@ export default {
mounted () { mounted () {
this.timeFn(); this.timeFn();
this.cancelLoading(); this.cancelLoading();
this.getStoreName()
}, },
methods: { methods: {
getStoreName() {
postAction('/store/list', {}).then(res => {
let storeCode = this.$route.query.storeCode
this.storeName = res.data.find(i => i.code.toString() == storeCode).name
})
},
timeFn () { timeFn () {
setInterval(() => { setInterval(() => {
this.dateDay = formatTime(new Date(), 'HH: mm: ss'); this.dateDay = formatTime(new Date(), 'HH: mm: ss');
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论