Compare commits
3 Commits
e8b736299a
...
f78510043e
Author | SHA1 | Date |
---|---|---|
xiaomeng | f78510043e | |
孙萌 | e9b0ccc21f | |
孙萌 | c3f0d872e0 |
|
@ -1522,10 +1522,7 @@
|
||||||
|
|
||||||
.realTime .page-content .timeNow {
|
.realTime .page-content .timeNow {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: absolute;
|
padding-left: 75px;
|
||||||
right: 30px;
|
|
||||||
top: 42px;
|
|
||||||
width: 240px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1602,10 +1602,11 @@
|
||||||
|
|
||||||
.timeNow {
|
.timeNow {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
right: 30px;
|
// right: 30px;
|
||||||
top: 42px;
|
// top: 42px;
|
||||||
width: 240px;
|
padding-left: 75px;
|
||||||
|
// width: 240px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="formula realTime">
|
<div class="formula realTime">
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<div class="timeNow" v-if="list.length">
|
|
||||||
<!-- {{ time.year.year }}-{{ time.year.month }}-{{ time.year.date }}<span> {{ time.time }}:{{ time.timeS
|
|
||||||
}}</span> -->
|
|
||||||
{{ list[0].updateTime ? list[0].updateTime : '' }}
|
|
||||||
</div>
|
|
||||||
<div class="control-view" v-if="deviceName == 10">
|
<div class="control-view" v-if="deviceName == 10">
|
||||||
<div class="title">气象站:</div>
|
<div class="title">气象站:</div>
|
||||||
<vue-seamless class="control-list" :data="controlList" :class-option="defaultOption1">
|
<vue-seamless class="control-list" :data="controlList" :class-option="defaultOption1">
|
||||||
|
@ -27,6 +23,12 @@
|
||||||
<img src="../../assets/image/real-time.png" alt="" />
|
<img src="../../assets/image/real-time.png" alt="" />
|
||||||
实时数据
|
实时数据
|
||||||
<!-- <div class="tips">种植作物1</div> -->
|
<!-- <div class="tips">种植作物1</div> -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="timeNow" v-if="list.length">
|
||||||
|
<!-- {{ time.year.year }}-{{ time.year.month }}-{{ time.year.date }}<span> {{ time.time }}:{{ time.timeS
|
||||||
|
}}</span> -->
|
||||||
|
{{ list[0].updateTime ? list[0].updateTime : '' }}
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-view border-none">
|
<div class="flex-view border-none">
|
||||||
<!-- <div class="input-btn">
|
<!-- <div class="input-btn">
|
||||||
|
@ -354,7 +356,7 @@ export default {
|
||||||
res.data.data.forEach((el, index) => {
|
res.data.data.forEach((el, index) => {
|
||||||
list.forEach((el1, index1) => {
|
list.forEach((el1, index1) => {
|
||||||
if (el.formula == el1.value) {
|
if (el.formula == el1.value) {
|
||||||
console.log(el1);
|
// console.log(el1);
|
||||||
var num = el.environmentData + el1.unit
|
var num = el.environmentData + el1.unit
|
||||||
this.controlList.push({
|
this.controlList.push({
|
||||||
...el,
|
...el,
|
||||||
|
@ -364,7 +366,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
console.log(this.controlList);
|
// console.log(this.controlList);
|
||||||
})
|
})
|
||||||
|
|
||||||
var data1 = store.equipmentList[this.indexs - 1].deviceId
|
var data1 = store.equipmentList[this.indexs - 1].deviceId
|
||||||
|
@ -389,7 +391,7 @@ export default {
|
||||||
// channelid: '1'
|
// channelid: '1'
|
||||||
// }
|
// }
|
||||||
this.api.getGethls(data2).then(res => {
|
this.api.getGethls(data2).then(res => {
|
||||||
console.log(res.data, 11);
|
// console.log(res.data, 11);
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
this.url = res.data.msg
|
this.url = res.data.msg
|
||||||
this.createVideo()
|
this.createVideo()
|
||||||
|
|
|
@ -37,8 +37,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="input-main">
|
<div class="input-main">
|
||||||
<div>控温宽度</div>
|
<div>控温宽度</div>
|
||||||
<input @blur="blurChange(21614 + ((indexs - 1) * 11), $event)" v-model="inputData[21614 + ((indexs - 1) * 11)]"
|
<input @blur="blurChange10(21614 + ((indexs - 1) * 11), $event)" v-model="inputData[21614 + ((indexs - 1) * 11)]"
|
||||||
@input="change(21614 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0">
|
@input="changeCount10(21614 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0">
|
||||||
<span>℃</span>
|
<span>℃</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -172,6 +172,30 @@ export default {
|
||||||
};
|
};
|
||||||
this.changeBtn(21657 + (this.indexs - 1), dataNum);
|
this.changeBtn(21657 + (this.indexs - 1), dataNum);
|
||||||
},
|
},
|
||||||
|
//失去焦点 计算公式 x/10
|
||||||
|
blurChange10(code, el) {
|
||||||
|
var store = this.$store.state
|
||||||
|
var data = {
|
||||||
|
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||||
|
regAddress: code,
|
||||||
|
num: el.target.value * 10,
|
||||||
|
}; //避免开启多个计时器
|
||||||
|
if (this.timer) {
|
||||||
|
this.timer && clearInterval(this.timer);
|
||||||
|
this.changeData(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
//反向计算 计算公式 x/10
|
||||||
|
changeCount10(code, el) {
|
||||||
|
var data = el.target.value * 10
|
||||||
|
var sendData = {
|
||||||
|
target: {
|
||||||
|
value: data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.change(code, sendData)
|
||||||
|
},
|
||||||
//失去焦点
|
//失去焦点
|
||||||
blurChangeCount(code, el) {
|
blurChangeCount(code, el) {
|
||||||
var store = this.$store.state
|
var store = this.$store.state
|
||||||
|
@ -202,6 +226,14 @@ export default {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 计算展示值 计算公式 x/10
|
||||||
|
countData10(data) {
|
||||||
|
if (data) {
|
||||||
|
return data / 10
|
||||||
|
} else {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
},
|
||||||
dataInit() {
|
dataInit() {
|
||||||
var store = this.$store.state
|
var store = this.$store.state
|
||||||
var data = {
|
var data = {
|
||||||
|
@ -212,18 +244,22 @@ export default {
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
this.inputData = res.data.data;
|
this.inputData = res.data.data;
|
||||||
this.getNowData()
|
this.getNowData()
|
||||||
|
this.inputData[21614] = this.countData10(this.inputData[21614])
|
||||||
this.inputData[21615] = this.countData(this.inputData[21615])
|
this.inputData[21615] = this.countData(this.inputData[21615])
|
||||||
this.inputData[21617] = this.countData(this.inputData[21617])
|
this.inputData[21617] = this.countData(this.inputData[21617])
|
||||||
this.inputData[21619] = this.countData(this.inputData[21619])
|
this.inputData[21619] = this.countData(this.inputData[21619])
|
||||||
|
|
||||||
|
this.inputData[21625] = this.countData10(this.inputData[21625])
|
||||||
this.inputData[21626] = this.countData(this.inputData[21626])
|
this.inputData[21626] = this.countData(this.inputData[21626])
|
||||||
this.inputData[21628] = this.countData(this.inputData[21628])
|
this.inputData[21628] = this.countData(this.inputData[21628])
|
||||||
this.inputData[21630] = this.countData(this.inputData[21630])
|
this.inputData[21630] = this.countData(this.inputData[21630])
|
||||||
|
|
||||||
|
this.inputData[21636] = this.countData10(this.inputData[21636])
|
||||||
this.inputData[21637] = this.countData(this.inputData[21637])
|
this.inputData[21637] = this.countData(this.inputData[21637])
|
||||||
this.inputData[21639] = this.countData(this.inputData[21639])
|
this.inputData[21639] = this.countData(this.inputData[21639])
|
||||||
this.inputData[21641] = this.countData(this.inputData[21641])
|
this.inputData[21641] = this.countData(this.inputData[21641])
|
||||||
|
|
||||||
|
this.inputData[21647] = this.countData10(this.inputData[21647])
|
||||||
this.inputData[21648] = this.countData(this.inputData[21648])
|
this.inputData[21648] = this.countData(this.inputData[21648])
|
||||||
this.inputData[21650] = this.countData(this.inputData[21650])
|
this.inputData[21650] = this.countData(this.inputData[21650])
|
||||||
this.inputData[21652] = this.countData(this.inputData[21652])
|
this.inputData[21652] = this.countData(this.inputData[21652])
|
||||||
|
@ -243,7 +279,7 @@ export default {
|
||||||
this.TypeSel = el.name
|
this.TypeSel = el.name
|
||||||
this.TypeSelIndex = el.value
|
this.TypeSelIndex = el.value
|
||||||
}
|
}
|
||||||
if(this.inputData[21657 + (this.indexs - 1)]==0){
|
if (this.inputData[21657 + (this.indexs - 1)] == 0) {
|
||||||
this.TypeSel = ''
|
this.TypeSel = ''
|
||||||
this.TypeSelIndex = 0
|
this.TypeSelIndex = 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue