Compare commits

..

3 Commits

Author SHA1 Message Date
xiaomeng f78510043e Merge pull request 'pc-master' (#30) from pc-master into portal
Reviewed-on: #30
2023-11-14 04:37:25 +00:00
孙萌 e9b0ccc21f 控温宽度计算修改 2023-11-14 08:49:22 +08:00
孙萌 c3f0d872e0 实时数据时间位置修改 2023-11-11 11:12:19 +08:00
5 changed files with 56 additions and 20 deletions

View File

@ -1522,10 +1522,7 @@
.realTime .page-content .timeNow {
text-align: center;
position: absolute;
right: 30px;
top: 42px;
width: 240px;
padding-left: 75px;
display: flex;
align-items: center;
font-size: 24px;

File diff suppressed because one or more lines are too long

View File

@ -1602,10 +1602,11 @@
.timeNow {
text-align: center;
position: absolute;
right: 30px;
top: 42px;
width: 240px;
// position: absolute;
// right: 30px;
// top: 42px;
padding-left: 75px;
// width: 240px;
display: flex;
align-items: center;
font-size: 24px;

View File

@ -1,11 +1,7 @@
<template>
<div class="formula realTime">
<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="title">气象站:</div>
<vue-seamless class="control-list" :data="controlList" :class-option="defaultOption1">
@ -27,6 +23,12 @@
<img src="../../assets/image/real-time.png" alt="" />
实时数据
<!-- <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 class="flex-view border-none">
<!-- <div class="input-btn">
@ -354,7 +356,7 @@ export default {
res.data.data.forEach((el, index) => {
list.forEach((el1, index1) => {
if (el.formula == el1.value) {
console.log(el1);
// console.log(el1);
var num = el.environmentData + el1.unit
this.controlList.push({
...el,
@ -364,7 +366,7 @@ export default {
}
})
})
console.log(this.controlList);
// console.log(this.controlList);
})
var data1 = store.equipmentList[this.indexs - 1].deviceId
@ -389,7 +391,7 @@ export default {
// channelid: '1'
// }
this.api.getGethls(data2).then(res => {
console.log(res.data, 11);
// console.log(res.data, 11);
if (res.data.code == 200) {
this.url = res.data.msg
this.createVideo()

View File

@ -37,8 +37,8 @@
</div>
<div class="input-main">
<div>控温宽度</div>
<input @blur="blurChange(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 @blur="blurChange10(21614 + ((indexs - 1) * 11), $event)" v-model="inputData[21614 + ((indexs - 1) * 11)]"
@input="changeCount10(21614 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0">
<span></span>
</div>
</div>
@ -172,6 +172,30 @@ export default {
};
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) {
var store = this.$store.state
@ -201,6 +225,14 @@ export default {
} else {
return 0
}
},
// x/10
countData10(data) {
if (data) {
return data / 10
} else {
return 0
}
},
dataInit() {
var store = this.$store.state
@ -212,18 +244,22 @@ export default {
if (res.data.code == 200) {
this.inputData = res.data.data;
this.getNowData()
this.inputData[21614] = this.countData10(this.inputData[21614])
this.inputData[21615] = this.countData(this.inputData[21615])
this.inputData[21617] = this.countData(this.inputData[21617])
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[21628] = this.countData(this.inputData[21628])
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[21639] = this.countData(this.inputData[21639])
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[21650] = this.countData(this.inputData[21650])
this.inputData[21652] = this.countData(this.inputData[21652])