From a73f2dc3d21d8146d0f6a7d0993e109291db7bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E8=90=8C?= <525441437@qq.com> Date: Fri, 13 Oct 2023 14:49:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/js/charts.js | 22 +++++++++++----------- src/views/HomeView.vue | 1 + src/views/page/formula.vue | 7 +++++-- src/views/page/status.vue | 1 + 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/assets/js/charts.js b/src/assets/js/charts.js index abd2c0a..9440c68 100644 --- a/src/assets/js/charts.js +++ b/src/assets/js/charts.js @@ -16,16 +16,16 @@ export function realTimeLine(id,data) { var data10=[]//1#管道压力 data.forEach((el,index)=>{ Xdata.push(el.time) - data1.push(el.value['目标水肥PH']) - data2.push(el.value['目标水肥EC']) - data3.push(el.value['1#平均水肥EC']) - data4.push(el.value['1#平均水肥PH']) - data5.push(el.value['1#水肥PH']) - data6.push(el.value['2#水肥PH']) - data7.push(el.value['1#水肥EC']) - data8.push(el.value['2#水肥EC']) - data10.push(el.value['1#管道压力']) - data9.push(el.value['1#空气温度']) + data1.push(el.value['目标水肥PH']?el.value['目标水肥PH']:0) + data2.push(el.value['目标水肥EC']?el.value['目标水肥EC']:0) + data3.push(el.value['1#平均水肥EC']?el.value['1#平均水肥EC']:0) + data4.push(el.value['1#平均水肥PH']?el.value['1#平均水肥PH']:0) + data5.push(el.value['1#水肥PH']?el.value['1#水肥PH']:0) + data6.push(el.value['2#水肥PH']?el.value['2#水肥PH']:0) + data7.push(el.value['1#水肥EC']?el.value['1#水肥EC']:0) + data8.push(el.value['2#水肥EC']?el.value['2#水肥EC']:0) + data10.push(el.value['1#管道压力']?el.value['1#管道压力']:0) + data9.push(el.value['1#空气温度']?el.value['1#空气温度']:0) }) @@ -411,7 +411,7 @@ export function realTimeLine(id,data) { }, { name: '1#管道压力', - data: data9, + data: data10, type: "line", symbol: "circle", smooth: true, diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index b017a9b..b69550a 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -111,6 +111,7 @@ export default { width: 100%; height: 100%; min-height: 900px; + min-width: 1553px; overflow: auto; background: url(../assets/image/background.jpg) no-repeat; background-size: 1920px 1080px; diff --git a/src/views/page/formula.vue b/src/views/page/formula.vue index ff8acbe..87e6ae2 100644 --- a/src/views/page/formula.vue +++ b/src/views/page/formula.vue @@ -212,11 +212,14 @@ export default { setTimeout(() => { that.dataInit(); }, 0); - //input获取焦点后全选 - let inputList = document.querySelectorAll('input'); + this.$nextTick(() => { + let inputList = document.querySelectorAll('input'); for (let index = 0; index < inputList.length; index++) { inputList[index].onfocus = this.selectValue;//input放入焦点,全选文本 } + }); + //input获取焦点后全选 + }, methods: { openType(index){ diff --git a/src/views/page/status.vue b/src/views/page/status.vue index cc29b4e..173f154 100644 --- a/src/views/page/status.vue +++ b/src/views/page/status.vue @@ -571,6 +571,7 @@ export default { return i; }, getReg() { + var store = this.$store.state var deviceDetail = store.equipmentList[store.equipmentIndex - 1] //获取传感器种类 var data1 = { -- 2.40.1