pull/165/head
sunmeng 2024-08-23 16:39:45 +08:00
parent e38fce8aa7
commit 3106249d82
7 changed files with 547 additions and 35 deletions

View File

@ -30,6 +30,42 @@
/*滚动条边角*/ /*滚动条边角*/
} }
.tips-model {
padding: 10px;
}
.tips-model .tips-model-title {
font-size: 18px;
font-weight: bold;
}
.tips-model .tips-model-text {
font-size: 14px;
padding: 5px 20px;
}
.tips-model .tips-model-table {
width: 500px;
border: 1px solid #eee;
}
.tips-model .tips-model-th, .tips-model .tips-model-tr {
width: 500px;
display: flex;
align-items: center;
justify-content: space-between;
height: 20px;
}
.tips-model .tips-model-th > div, .tips-model .tips-model-tr > div {
width: 20%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
}
.mobile-scroll { .mobile-scroll {
overflow-y: auto; overflow-y: auto;
} }
@ -319,6 +355,7 @@
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
font-weight: 400; font-weight: 400;
color: #00FFBA; color: #00FFBA;
cursor: pointer;
} }
.table-title .title-text { .table-title .title-text {
@ -854,6 +891,13 @@
min-width: 302px; min-width: 302px;
} }
.page-title.title-402 {
background: url(../image/title-302.png) no-repeat center;
background-size: 402px 43px;
background-position: left center;
min-width: 402px;
}
.formula { .formula {
width: 100%; width: 100%;
height: 100%; height: 100%;

File diff suppressed because one or more lines are too long

View File

@ -32,7 +32,36 @@
} }
} }
.tips-model{
padding: 10px;
.tips-model-title{
font-size: 18px;
font-weight: bold;
}
.tips-model-text{
font-size:14px;
padding: 5px 20px;
}
.tips-model-table{
width: 500px;
border: 1px solid #eee;
}
.tips-model-th,.tips-model-tr{
width: 500px;
display: flex;
align-items: center;
justify-content: space-between;
height: 20px;
>div{
width: 20%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
}
}
}
.mobile-scroll { .mobile-scroll {
overflow-y: auto; overflow-y: auto;
@ -343,6 +372,7 @@
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
font-weight: 400; font-weight: 400;
color: #00FFBA; color: #00FFBA;
cursor: pointer;
} }
.title-text { .title-text {
@ -906,6 +936,12 @@
background-position: left center; background-position: left center;
min-width: 302px; min-width: 302px;
} }
&.title-402 {
background: url(../image/title-302.png) no-repeat center;
background-size: 402px 43px;
background-position: left center;
min-width:402px;
}
} }
.formula { .formula {

View File

@ -364,7 +364,7 @@ modelConfirm(){
}, },
changeData(data) { changeData(data) {
var store = this.$store.state var store = this.$store.state
this.api.postControlWrite(data).then((res) => { this.api.postwriteFi_write(data).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.$message({ this.$message({
message: res.data.msg, message: res.data.msg,

View File

@ -2,6 +2,8 @@
<div class="irrigateSet sensorSet sensorSet-con"> <div class="irrigateSet sensorSet sensorSet-con">
<div class="table-title"> <div class="table-title">
<img src="../../assets/image/sensor.png" alt=""> 传感器配置界面 <img src="../../assets/image/sensor.png" alt=""> 传感器配置界面
<div class="tips" @click="model = true">传感器说明</div>
</div> </div>
<div class="sensor-view"> <div class="sensor-view">
<div class="left scroll"> <div class="left scroll">
@ -116,6 +118,119 @@
</div> </div>
</div> </div>
</div> --> </div> -->
<el-dialog :modal-append-to-body="false" :show-close="false" :close-on-click-modal="true" :visible.sync="model"
width="760px">
<div class="page-title title-402">温室控制器匹配传感器说明</div>
<div class="tips-model">
<div class="tips-model-title">温室控制器的前36个通道对应6个通讯类有线和无线传感器通用六参数传感器</div>
<div class="tips-model-text">
1. 1#-6# 对应温度湿度光照CO2土温土湿
</div>
<div class="tips-model-text">
2. 7#-12# 对应温度湿度光照CO2土温土湿
</div>
<div class="tips-model-text">
3. 13#-18#对应温度湿度光照CO2土温土湿
</div>
<div class="tips-model-text">
4. 19#-24#对应温度湿度光照CO2土温土湿
</div>
<div class="tips-model-text">
5. 25#-30#对应温度湿度光照CO2土温土湿
</div>
<div class="tips-model-text">
6. 31#-36#对应温度湿度光照CO2土温土湿
</div>
<div class="">
通信类传感器AD值匹配关系如下
</div>
<div class="tips-model-table">
<div class="tips-model-th">
<div></div>
<div class="tips-model-text">低点AD值</div>
<div class="tips-model-text">低点数据</div>
<div class="tips-model-text">高点AD值</div>
<div class="tips-model-text">高点数据</div>
</div>
<div class="tips-model-tr">
<div class="tips-model-text">温度</div>
<div class="tips-model-text">0</div>
<div class="tips-model-text">-40</div>
<div class="tips-model-text">1000</div>
<div class="tips-model-text">60</div>
</div>
<div class="tips-model-tr">
<div class="tips-model-text">湿度</div>
<div class="tips-model-text">0</div>
<div class="tips-model-text">0</div>
<div class="tips-model-text">1000</div>
<div class="tips-model-text">100</div>
</div>
<div class="tips-model-tr">
<div class="tips-model-text">光照</div>
<div class="tips-model-text">0</div>
<div class="tips-model-text">0</div>
<div class="tips-model-text">2000</div>
<div class="tips-model-text">200</div>
</div>
<div class="tips-model-tr">
<div class="tips-model-text">二氧化碳</div>
<div class="tips-model-text">0</div>
<div class="tips-model-text">0</div>
<div class="tips-model-text">5000</div>
<div class="tips-model-text">5000</div>
</div>
<div class="tips-model-tr">
<div class="tips-model-text">土温</div>
<div class="tips-model-text">0</div>
<div class="tips-model-text">-40</div>
<div class="tips-model-text">1000</div>
<div class="tips-model-text">60</div>
</div>
<div class="tips-model-tr">
<div class="tips-model-text">土湿</div>
<div class="tips-model-text">0</div>
<div class="tips-model-text">-40</div>
<div class="tips-model-text">1000</div>
<div class="tips-model-text">100</div>
</div>
</div>
<div class="">
&nbsp;
</div>
<div class="tips-model-title">37通道-40通道通讯类土壤PH,EC二合一传感器</div>
<div class="tips-model-text">
37通道对应1#PH传感器(匹配关系0 -0,1000-100)
</div>
<div class="tips-model-text">
38通道对应1#EC传感器(匹配关系0 -0,1000-1000)
</div>
<div class="tips-model-text">
39通道对应2#PH传感器(匹配关系0 -0,1000-100)
</div>
<div class="tips-model-text">
40通道对应2#EC传感器(匹配关系0 -0,1000-1000)
</div>
<div class="">
&nbsp;
</div>
<div class="tips-model-title">41通道-48通道8个模拟量传感器数据</div>
<div class="">
匹配关系
</div>
<div class="tips-model-text">
655-低量程,3276-满量程
</div>
</div>
<div class="model-return">
<div @click="model = false" class="btn green">
<img src="../../assets/image/return.png" alt="" />返回
</div>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -135,6 +250,8 @@ export default {
openTypeList: [],// openTypeList: [],//
typeList: this.$store.state.typeList, typeList: this.$store.state.typeList,
loading:null, loading:null,
model: false,
} }
}, },
watch: { watch: {

View File

@ -2,6 +2,7 @@
<div class="irrigateSet sensorSet"> <div class="irrigateSet sensorSet">
<div class="table-title"> <div class="table-title">
<img src="../../assets/image/sensor.png" alt=""> 传感器配置界面 <img src="../../assets/image/sensor.png" alt=""> 传感器配置界面
<div class="tips" @click="model = true">传感器说明</div>
</div> </div>
<div class="sensor-view"> <div class="sensor-view">
<div class="left scroll"> <div class="left scroll">
@ -30,7 +31,7 @@
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="item, index in typeList" :key="index" :command="item.value">{{ <el-dropdown-item v-for="item, index in typeList" :key="index" :command="item.value">{{
item.label }}</el-dropdown-item> item.label }}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
@ -80,6 +81,71 @@
</div> </div>
</div> </div>
</div> </div>
<el-dialog :modal-append-to-body="false" :show-close="false" :close-on-click-modal="true" :visible.sync="model"
width="760px">
<div class="page-title title-402">智能灌溉控制器匹配传感器说明</div>
<div class="tips-model">
<div class="tips-model-title">温室控制器的前80个通道对应40个通讯类土壤温湿度传感器</div>
<div class="tips-model-text">
1. 1#-2# 对应1#土温1#土湿
</div>
<div class="tips-model-text">
2. 3#-4# 对应2#土温2#土湿
</div>
<div class="tips-model-text">
3. 5#-6# 对应3#土温3#土湿
</div>
<div class="tips-model-text">
4. ......
</div>
<div class="tips-model-text">
5. 79#-80# 对应40#土温40#土湿
</div>
<div class="">
通信类传感器AD值匹配关系如下
</div>
<div class="tips-model-table">
<div class="tips-model-th">
<div></div>
<div class="tips-model-text">低点AD值</div>
<div class="tips-model-text">低点数据</div>
<div class="tips-model-text">高点AD值</div>
<div class="tips-model-text">高点数据</div>
</div>
<div class="tips-model-tr">
<div class="tips-model-text">土温</div>
<div class="tips-model-text">0</div>
<div class="tips-model-text">-40</div>
<div class="tips-model-text">1000</div>
<div class="tips-model-text">60</div>
</div>
<div class="tips-model-tr">
<div class="tips-model-text">土湿</div>
<div class="tips-model-text">0</div>
<div class="tips-model-text">0</div>
<div class="tips-model-text">1000</div>
<div class="tips-model-text">100</div>
</div>
</div>
<div class="">
&nbsp;
</div>
<div class="tips-model-title">81通道-90通道10个模拟量传感器数据</div>
<div class="">
匹配关系
</div>
<div class="tips-model-text">
655-低量程,3276-满量程
</div>
</div>
<div class="model-return">
<div @click="model = false" class="btn green">
<img src="../../assets/image/return.png" alt="" />返回
</div>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -97,12 +163,13 @@ export default {
openList: [],// openList: [],//
typeList: this.$store.state.typeList, typeList: this.$store.state.typeList,
loading: null, loading: null,
list1:'', list1: '',
list2:'', list2: '',
list3:'', list3: '',
list4:'', list4: '',
list5:'', list5: '',
list6:'', list6: '',
model: false,
} }
}, },
watch: { watch: {
@ -111,9 +178,9 @@ export default {
// this.getCountData() // this.getCountData()
}, },
}, },
created(){ created() {
for (let i = 0; i < 96; i++) { for (let i = 0; i < 96; i++) {
this.numberList.push(10206+(i*5)) this.numberList.push(10206 + (i * 5))
} }
}, },
mounted() { mounted() {
@ -258,10 +325,10 @@ export default {
var listIndex = 16 var listIndex = 16
var listnum = Math.floor(this.active / listIndex) + 1 var listnum = Math.floor(this.active / listIndex) + 1
console.log(this['list' + listnum],123,'list' + listnum); console.log(this['list' + listnum], 123, 'list' + listnum);
var listData = this['list' + listnum].split('') var listData = this['list' + listnum].split('')
if (Number(listData[listIndex - 1 - (this.active % listIndex)])) { if (Number(listData[listIndex - 1 - (this.active % listIndex)])) {
listData[listData.length - 1 - (this.active % listIndex)] = '0' listData[listData.length - 1 - (this.active % listIndex)] = '0'
this['list' + listnum] = listData.join('') this['list' + listnum] = listData.join('')
@ -281,7 +348,7 @@ export default {
}; };
// console.log(num + listnum, dataNum); // console.log(num + listnum, dataNum);
this.changeBtn(10200 + listnum -1, dataNum); this.changeBtn(10200 + listnum - 1, dataNum);
}, },
getData272() { getData272() {
var inputData = this.inputData var inputData = this.inputData

View File

@ -28,7 +28,7 @@
<div class="page-title upload-title"> <div class="page-title upload-title">
水肥参数 水肥参数
</div> </div>
<div class="upload-content"> <div class="upload-content upload-content1">
<div @click="selList2(index)" v-for="item, index in list2" :key="index"> <div @click="selList2(index)" v-for="item, index in list2" :key="index">
<div v-if="actList2.indexOf(index) == -1" class="no-sel"></div> <div v-if="actList2.indexOf(index) == -1" class="no-sel"></div>
<div v-else class="sel"></div> <div v-else class="sel"></div>
@ -36,6 +36,78 @@
</div> </div>
</div> </div>
</div> </div>
<div class="upload-view">
<div class="page-title upload-title">
通道传感器1-16
</div>
<div class="upload-content">
<div @click="selList3(index)" v-for="item, index in list3" :key="index">
<div v-if="actList3.indexOf(index) == -1" class="no-sel"></div>
<div v-else class="sel"></div>
{{ item }}
</div>
</div>
</div>
<div class="upload-view">
<div class="page-title upload-title">
通道传感器17-32
</div>
<div class="upload-content">
<div @click="selList4(index)" v-for="item, index in list4" :key="index">
<div v-if="actList4.indexOf(index) == -1" class="no-sel"></div>
<div v-else class="sel"></div>
{{ item }}
</div>
</div>
</div>
<div class="upload-view">
<div class="page-title upload-title">
通道传感器33-48
</div>
<div class="upload-content">
<div @click="selList5(index)" v-for="item, index in list5" :key="index">
<div v-if="actList5.indexOf(index) == -1" class="no-sel"></div>
<div v-else class="sel"></div>
{{ item }}
</div>
</div>
</div>
<div class="upload-view">
<div class="page-title upload-title">
通道传感器49-64
</div>
<div class="upload-content">
<div @click="selList6(index)" v-for="item, index in list6" :key="index">
<div v-if="actList6.indexOf(index) == -1" class="no-sel"></div>
<div v-else class="sel"></div>
{{ item }}
</div>
</div>
</div>
<div class="upload-view">
<div class="page-title upload-title">
通道传感器65-80
</div>
<div class="upload-content">
<div @click="selList7(index)" v-for="item, index in list7" :key="index">
<div v-if="actList7.indexOf(index) == -1" class="no-sel"></div>
<div v-else class="sel"></div>
{{ item }}
</div>
</div>
</div>
<div class="upload-view">
<div class="page-title upload-title">
通道传感器81-96
</div>
<div class="upload-content">
<div @click="selList8(index)" v-for="item, index in list8" :key="index">
<div v-if="actList8.indexOf(index) == -1" class="no-sel"></div>
<div v-else class="sel"></div>
{{ item }}
</div>
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -61,25 +133,128 @@ export default {
'室外平均土湿传感器', '室外平均土湿传感器',
'室外平均大气压传感器', '室外平均大气压传感器',
"室外平均太阳总辐射传感器",], "室外平均太阳总辐射传感器",],
actList2: [], actList2: [],
actList2New: [], actList2New: [],
list2: ['目标水肥PH数据', list2: ['1#水肥PH',
'目标水肥EC数据', '1#水肥EC',
'平均水肥PH数据', '1#水温传感器',
'平均水肥EC数据',
'1#水肥PH数据',
'1#水肥EC数据',
'2#水肥PH数据',
'2#水肥EC数据',
'1#通道传感器数据',
'2#通道传感器数据',
'3#通道传感器数据',
'4#通道传感器数据',
'5#通道传感器数据',
'6#通道传感器数据',
"1#水温传感器数据",
"2#水温传感器数据",
], ],
actList3: [],
actList3New: [],
list3: ['通道传感器1',
'通道传感器2',
'通道传感器3',
'通道传感器4',
'通道传感器5',
'通道传感器6',
'通道传感器7',
'通道传感器8',
'通道传感器9',
'通道传感器10',
'通道传感器11',
'通道传感器12',
'通道传感器13',
'通道传感器14',
'通道传感器15',
'通道传感器16',],
actList4: [],
actList4New: [],
list4: ['通道传感器17',
'通道传感器18',
'通道传感器19',
'通道传感器20',
'通道传感器21',
'通道传感器22',
'通道传感器23',
'通道传感器24',
'通道传感器25',
'通道传感器26',
'通道传感器27',
'通道传感器28',
'通道传感器29',
'通道传感器30',
'通道传感器31',
'通道传感器32',],
actList5: [],
actList5New: [],
list5: ['通道传感器33',
'通道传感器34',
'通道传感器35',
'通道传感器36',
'通道传感器37',
'通道传感器38',
'通道传感器39',
'通道传感器40',
'通道传感器41',
'通道传感器42',
'通道传感器43',
'通道传感器44',
'通道传感器45',
'通道传感器46',
'通道传感器47',
'通道传感器48',],
actList6: [],
actList6New: [],
list6: ['通道传感器49',
'通道传感器50',
'通道传感器51',
'通道传感器52',
'通道传感器53',
'通道传感器54',
'通道传感器55',
'通道传感器56',
'通道传感器57',
'通道传感器58',
'通道传感器59',
'通道传感器60',
'通道传感器61',
'通道传感器62',
'通道传感器63',
'通道传感器64',],
actList7: [],
actList7New: [],
list7: ['通道传感器65',
'通道传感器66',
'通道传感器67',
'通道传感器68',
'通道传感器69',
'通道传感器70',
'通道传感器71',
'通道传感器72',
'通道传感器73',
'通道传感器74',
'通道传感器75',
'通道传感器76',
'通道传感器77',
'通道传感器78',
'通道传感器79',
'通道传感器80',],
actList8: [],
actList8New: [],
list8: ['通道传感器81',
'通道传感器82',
'通道传感器83',
'通道传感器84',
'通道传感器85',
'通道传感器86',
'通道传感器87',
'通道传感器88',
'通道传感器89',
'通道传感器90',
'通道传感器91',
'通道传感器92',
'通道传感器93',
'通道传感器94',
'通道传感器95',
'通道传感器96',],
inputData: [], inputData: [],
loading:null, loading:null,
@ -118,7 +293,7 @@ export default {
getAct2() { getAct2() {
this.actList2=[] this.actList2=[]
var num = this.inputData['10002'] var num = this.inputData['10002']
var num2 = this.padString(num.toString(2), 16) var num2 = this.padString(num.toString(2), 3)
this.actList2New=num2.split("") this.actList2New=num2.split("")
this.actList2New.forEach((el,index)=>{ this.actList2New.forEach((el,index)=>{
if(el=='1'){ if(el=='1'){
@ -126,6 +301,73 @@ export default {
} }
}) })
}, },
getActList1() {
this.actList3=[]
var num = this.inputData['10003']
var num3 = this.padString(num.toString(2), 16)
this.actList3New=num3.split("")
this.actList3New.forEach((el,index)=>{
if(el=='1'){
this.actList3.push(this.actList3New.length-index-1)
}
})
},
getActList2() {
this.actList4=[]
var num = this.inputData['10004']
var num4 = this.padString(num.toString(2), 16)
this.actList4New=num4.split("")
this.actList4New.forEach((el,index)=>{
if(el=='1'){
this.actList4.push(this.actList4New.length-index-1)
}
})
},
getActList3() {
this.actList5=[]
var num = this.inputData['10005']
var num5 = this.padString(num.toString(2), 16)
this.actList5New=num5.split("")
this.actList5New.forEach((el,index)=>{
if(el=='1'){
this.actList5.push(this.actList5New.length-index-1)
}
})
},
getActList4() {
this.actList6=[]
var num = this.inputData['10006']
var num6 = this.padString(num.toString(2), 16)
this.actList6New=num6.split("")
this.actList6New.forEach((el,index)=>{
if(el=='1'){
this.actList6.push(this.actList6New.length-index-1)
}
})
},
getActList5() {
this.actList7=[]
var num = this.inputData['10007']
var num7 = this.padString(num.toString(2), 16)
this.actList7New=num7.split("")
this.actList7New.forEach((el,index)=>{
if(el=='1'){
this.actList7.push(this.actList7New.length-index-1)
}
})
},
getActList6() {
this.actList8=[]
var num = this.inputData['10008']
var num8 = this.padString(num.toString(2), 16)
this.actList8New=num8.split("")
this.actList8New.forEach((el,index)=>{
if(el=='1'){
this.actList8.push(this.actList8New.length-index-1)
}
})
},
dataInit() { dataInit() {
this.actList1New = [] this.actList1New = []
this.list1.forEach((el, index) => { this.list1.forEach((el, index) => {
@ -147,6 +389,12 @@ export default {
this.getAct1() this.getAct1()
this.getAct2() this.getAct2()
this.getActList1()
this.getActList2()
this.getActList3()
this.getActList4()
this.getActList5()
this.getActList6()
} else { } else {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
@ -227,7 +475,7 @@ export default {
}, },
changeData(data) { changeData(data) {
var store = this.$store.state var store = this.$store.state
this.api.postWriteFs(data).then((res) => { this.api.postwriteFi_write(data).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.$message({ this.$message({
message: res.data.msg, message: res.data.msg,