Merge branch 'pc-master' of https://git.lihe-control.com/xiaomeng/wszhyWx into pc-master
|
@ -631,4 +631,69 @@ getIccid(data){
|
|||
controlReadValuedownload(data) {
|
||||
return sendPostRequest(`/control/read/value?devicecode=${data}`,'')
|
||||
},
|
||||
|
||||
// 智能灌注
|
||||
//主页查看智能灌溉控制器
|
||||
getFi_rtdata(data) {
|
||||
return sendGetRequest(`/getFi/rtdata`, data)
|
||||
},
|
||||
//当天折线图
|
||||
chart_fidata(data) {
|
||||
return sendPostRequest(`/chart/fidata?equipmentId=${data}`,'')
|
||||
},
|
||||
//智能灌溉1
|
||||
readFi_irrigate(url,data) {
|
||||
return sendGetRequest(url, data)
|
||||
},
|
||||
//智能灌溉写入
|
||||
postwriteFi_write(data) {
|
||||
return sendPostRequest("/writeFi/write", data);
|
||||
},
|
||||
//智能灌溉状态值
|
||||
getFI_getState(data) {
|
||||
return sendGetRequest("/getFI/getState", data);
|
||||
},
|
||||
|
||||
//智能灌溉系统参数
|
||||
readControl_getFIIccid(data) {
|
||||
return sendGetRequest("/readControl/getFIIccid", data);
|
||||
},
|
||||
|
||||
//智能灌溉系统导入txt的
|
||||
upLoadFIwritevalue(data) {
|
||||
return sendUploadRequest(`/FI/write/value`, data)
|
||||
},
|
||||
//智能灌溉系统导出下载txt
|
||||
FIreadvaluedownload(data) {
|
||||
return sendPostRequest(`/FI/read/value?devicecode=${data}`,'')
|
||||
},
|
||||
//智能灌溉系统数据上传
|
||||
readFi_datauploadfi(data) {
|
||||
return sendGetRequest("/readFi/datauploadfi", data);
|
||||
},
|
||||
//智能灌溉固有参数
|
||||
readFi_intrinsicparameterfi(data) {
|
||||
return sendGetRequest("/readFi/intrinsicparameterfi", data);
|
||||
},
|
||||
//智能灌溉传感器通道
|
||||
readFi_sensorchannelfi(data) {
|
||||
return sendGetRequest("/readFi/sensorchannelfi", data);
|
||||
},
|
||||
//智能灌溉的名称
|
||||
getFi_getName(data) {
|
||||
return sendGetRequest("/getFi/getName", data);
|
||||
},
|
||||
//修改智能灌溉名称
|
||||
getFi_updateName(data){
|
||||
return sendPutRequest(`/getFi/updateName`, data)
|
||||
},
|
||||
//系统页面备忘录获取
|
||||
readControl_getMemo(data){
|
||||
return sendGetRequest(`/readControl/getMemo`, data)
|
||||
},
|
||||
//系统页面备忘录修改
|
||||
readControl_setMemo(data){
|
||||
return sendPostRequest(`/readControl/setMemo`, data)
|
||||
},
|
||||
|
||||
};
|
||||
|
|
|
@ -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 {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
@ -80,6 +116,10 @@
|
|||
max-height: 300px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.border-none {
|
||||
border: none !important;
|
||||
}
|
||||
|
@ -319,6 +359,7 @@
|
|||
font-family: Microsoft YaHei;
|
||||
font-weight: 400;
|
||||
color: #00FFBA;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.table-title .title-text {
|
||||
|
@ -854,6 +895,13 @@
|
|||
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 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
@ -1221,6 +1269,10 @@
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.irrigateSet .open-btn.w-250 {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
.irrigateSet .open-btn > img {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
@ -1328,6 +1380,12 @@
|
|||
color: #A8B6C8;
|
||||
}
|
||||
|
||||
.system-tips.system-textarea {
|
||||
padding: 10px;
|
||||
height: auto;
|
||||
min-height: 101px;
|
||||
}
|
||||
|
||||
.upload .upload-view {
|
||||
width: 520px;
|
||||
height: 520px;
|
||||
|
|
|
@ -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 {
|
||||
overflow-y: auto;
|
||||
|
||||
|
@ -89,7 +118,9 @@
|
|||
max-height: 300px;
|
||||
@extend .scroll;
|
||||
}
|
||||
|
||||
textarea{
|
||||
resize: none;
|
||||
}
|
||||
.border-none {
|
||||
border: none !important;
|
||||
}
|
||||
|
@ -343,6 +374,7 @@
|
|||
font-family: Microsoft YaHei;
|
||||
font-weight: 400;
|
||||
color: #00FFBA;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
|
@ -906,6 +938,12 @@
|
|||
background-position: left center;
|
||||
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 {
|
||||
|
@ -1284,7 +1322,9 @@
|
|||
color: #00C8FF;
|
||||
margin: 7.5px 10px;
|
||||
cursor: pointer;
|
||||
|
||||
&.w-250{
|
||||
width: 250px;
|
||||
}
|
||||
>img {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
@ -1398,6 +1438,11 @@
|
|||
font-family: Microsoft YaHei;
|
||||
font-weight: 400;
|
||||
color: #A8B6C8;
|
||||
&.system-textarea{
|
||||
padding: 10px;
|
||||
height: auto;
|
||||
min-height: 101px;
|
||||
}
|
||||
}
|
||||
|
||||
.upload {
|
||||
|
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 6.4 MiB |
|
@ -0,0 +1,245 @@
|
|||
<template>
|
||||
<div class="set-params collapse scroll">
|
||||
<div class="set-top">
|
||||
<img src="../assets/image/set-icon.png" alt="">设定值参数
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="set-tips" @click="toHome($store.state.equipmentIndex)">
|
||||
<div>
|
||||
{{ $store.state.equipmentList[$store.state.equipmentIndex - 1].deviceTypeName }}</div>
|
||||
</div>
|
||||
<el-collapse v-model="$store.state.activeNames">
|
||||
<template v-for="item, index in routerList">
|
||||
<el-collapse-item :class="routerNow == item.router ? 'active' : ''" :name="index + 1" :key="index"
|
||||
v-if="!item.isRouter">
|
||||
<template slot="title" class="collapse-title">
|
||||
<span class="name">{{ item.name }}</span>
|
||||
</template>
|
||||
<!-- -->
|
||||
<ul class="table-ul">
|
||||
<li @click="toRouter(item1)"
|
||||
:class="routerNow == item1.router && routerIndex == index1 + 1 ? 'active' : ''"
|
||||
class="table-li" v-for="item1, index1 in item.list" :key="index1">{{
|
||||
item1.name }} <div class="status" :class="item1.status == 0 ? 'outline' : 'online'"
|
||||
v-if="item1.status >= 0">{{
|
||||
item1.status
|
||||
== 0
|
||||
? '离线' : '在线' }}</div>
|
||||
</li>
|
||||
</ul>
|
||||
</el-collapse-item>
|
||||
<div @click="toRouter(item)" :class="routerNow == item.router ? 'active' : ''" class="no-list" v-else>{{
|
||||
item.name
|
||||
}}</div>
|
||||
</template>
|
||||
</el-collapse>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
routerList: [
|
||||
// { name: '施肥机配方设置', list: [], router: 'formula' },
|
||||
{ name: `${this.$store.state.equipmentList[this.$store.state.equipmentIndex - 1].deviceTypeName}状态显示`, list: [], router: 'status-soil', isRouter: true, },
|
||||
{
|
||||
name: '灌溉组配置', router: 'irrigateSet-soil', list: [
|
||||
{ name: '1#灌溉组配置', status: -1, router: 'irrigateSet-soil', index: 1 },
|
||||
{ name: '2#灌溉组配置', status: -1, router: 'irrigateSet-soil', index: 2 },
|
||||
{ name: '3#灌溉组配置', status: -1, router: 'irrigateSet-soil', index: 3 },
|
||||
{ name: '4#灌溉组配置', status: -1, router: 'irrigateSet-soil', index: 4 },
|
||||
{ name: '5#灌溉组配置', status: -1, router: 'irrigateSet-soil', index: 5 },
|
||||
{ name: '6#灌溉组配置', status: -1, router: 'irrigateSet-soil', index: 6 },
|
||||
{ name: '7#灌溉组配置', status: -1, router: 'irrigateSet-soil', index: 7 },
|
||||
{ name: '8#灌溉组配置', status: -1, router: 'irrigateSet-soil', index: 8 },
|
||||
{ name: '9#灌溉组配置', status: -1, router: 'irrigateSet-soil', index: 9 },
|
||||
{ name: '10#灌溉组配置', status: -1, router: 'irrigateSet-soil', index: 10 },
|
||||
{ name: '11#灌溉组配置', status: -1, router: 'irrigateSet-soil', index: 11 },
|
||||
{ name: '12#灌溉组配置', status: -1, router: 'irrigateSet-soil', index: 12 },
|
||||
{ name: '13#灌溉组配置', status: -1, router: 'irrigateSet-soil', index: 13 },
|
||||
{ name: '14#灌溉组配置', status: -1, router: 'irrigateSet-soil', index: 14 },
|
||||
{ name: '15#灌溉组配置', status: -1, router: 'irrigateSet-soil', index: 15 },
|
||||
{ name: '16#灌溉组配置', status: -1, router: 'irrigateSet-soil', index: 16 }]
|
||||
},
|
||||
|
||||
{ name: '固有参数', list: [], router: 'intrinsicParameter-soil', isRouter: true, },
|
||||
{ name: '系统参数配置', list: [], router: 'systemSet-soil', isRouter: true, },
|
||||
{ name: '传感器通道配置', list: [], router: 'sensorSet-soil', isRouter: true, },
|
||||
{ name: '数据上传', list: [], router: 'upload-soil', isRouter: true, },],
|
||||
routerNow: 'irrigateSet-soil',
|
||||
routerIndex: 1,
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
"$route"(newName, oldName) {
|
||||
this.gerRouter();
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.gerRouter();
|
||||
this.dataInit()
|
||||
},
|
||||
methods: {
|
||||
//获取设备名称/配方名称
|
||||
getByid() {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
};
|
||||
this.api.getByid(data).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
store.equipmentName = res.data.data
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
this.loading = false
|
||||
});
|
||||
},
|
||||
dataInit() {
|
||||
// var store = this.$store.state
|
||||
// if(!store.equipmentName){
|
||||
// this.getByid()
|
||||
// }else{
|
||||
// this.getList()
|
||||
// }
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
};
|
||||
this.api.getFi_getName(data).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
// 将name1到name16转换成数组
|
||||
const namesArray = [];
|
||||
for (let i = 1; i <= 16; i++) {
|
||||
namesArray.push(res.data.data[`name${i}`]);
|
||||
}
|
||||
// 替换routerList[1].list中的name
|
||||
this.routerList[1].list.forEach((item, index) => {
|
||||
if (index < namesArray.length) {
|
||||
item.name = namesArray[index];
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
getList() {
|
||||
var store = this.$store.state
|
||||
// store.nameList.forEach((el, index) => {
|
||||
// if (index < 8) {
|
||||
// if (store.equipmentName['fertilization' + store.nameList[index]]) {
|
||||
// // store.equipmentName['fertilization'+store.nameList[index]]
|
||||
// this.routerList[0].list.push({
|
||||
// name: '配方' + (index + 1),
|
||||
// status: -1,
|
||||
// index: index + 1,
|
||||
// router: 'formula'
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// // if (store.equipmentName['solenoid' + store.nameList[index]]) {
|
||||
// // // store.equipmentName['fertilization'+store.nameList[index]]
|
||||
// // this.routerList[1].list.push({
|
||||
// // name: store.equipmentName['solenoid' + store.nameList[index]],
|
||||
// // status: -1,
|
||||
// // index: index + 1,
|
||||
// // router: 'irrigateSet'
|
||||
// // })
|
||||
// // }
|
||||
// })
|
||||
},
|
||||
//去首页
|
||||
toHome(index) {
|
||||
this.$router.push({ path: `/status-soil` })
|
||||
},
|
||||
gerRouter() {
|
||||
this.routerNow = this.$route.name;
|
||||
this.routerIndex = this.$route.query.id ? this.$route.query.id : 1
|
||||
},
|
||||
toRouter(item) {
|
||||
if (item.router) {
|
||||
if (item.http) {
|
||||
window.location.href = item.http;
|
||||
} else if (item.router == 'irrigateSet-soil' && this.$route.query.id != item.index) {
|
||||
this.$router.push({ path: `/irrigateSet-soil`,query:{
|
||||
id:item.index,name:item.name
|
||||
} })
|
||||
}
|
||||
// else if (item.router == 'formula' && this.$route.query.id != item.index) {
|
||||
// this.$router.push({ path: `/formula?id=${item.index}` })
|
||||
// }
|
||||
else if (item.router != this.routerNow && !item.http) {
|
||||
|
||||
this.$router.push({ name: item.router })
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.set-params {
|
||||
width: 280px;
|
||||
height: 100%;
|
||||
background: rgba(0, 92, 178, 0.15);
|
||||
border: 2px solid rgba(0, 186, 255, 0.20);
|
||||
|
||||
.set-top {
|
||||
font-size: 20px;
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
width: 100%;
|
||||
padding-left: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-top: 20px;
|
||||
|
||||
img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.el-collapse-item {
|
||||
&.active {}
|
||||
}
|
||||
|
||||
.no-list {
|
||||
color: #A8B6C8;
|
||||
|
||||
&.active {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.set-tips {
|
||||
width: 100%;
|
||||
border-bottom: 1px solid rgba(168, 182, 200, 0.2);
|
||||
margin-top: 17px;
|
||||
padding-bottom: 17px;
|
||||
padding-left: 10px;
|
||||
cursor: pointer;
|
||||
|
||||
>div {
|
||||
width: 220px;
|
||||
height: 40px;
|
||||
// background: rgba(255, 255, 255, 0.1);
|
||||
// border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -4,6 +4,7 @@ import HomeView from '../views/HomeView.vue'
|
|||
import index from '../views/index.vue'
|
||||
import login from '../views/login.vue'
|
||||
import control from '../views/control.vue'
|
||||
import soil from '../views/soil.vue'
|
||||
Vue.use(VueRouter)
|
||||
|
||||
const routes = [
|
||||
|
@ -132,7 +133,8 @@ const routes = [
|
|||
name: 'videoManage',
|
||||
component: () => import('../views/manage/videoManage.vue')
|
||||
},]
|
||||
}, {
|
||||
},
|
||||
{
|
||||
path: '/control',
|
||||
name: 'control',
|
||||
component: control,
|
||||
|
@ -257,6 +259,37 @@ const routes = [
|
|||
name: 'facadeInsulation',
|
||||
component: () => import('../views/page/facadeInsulation.vue')
|
||||
},]
|
||||
},
|
||||
{
|
||||
path: '/soil',
|
||||
name: 'soil',
|
||||
component: soil,
|
||||
redirect: '/irrigateSet-soil',
|
||||
children: [{
|
||||
path: '/irrigateSet-soil',
|
||||
name: 'irrigateSet-soil',
|
||||
component: () => import('../views/page/irrigateSet-soil.vue')
|
||||
},{
|
||||
path: '/intrinsicParameter-soil',
|
||||
name: 'intrinsicParameter-soil',
|
||||
component: () => import('../views/page/intrinsicParameter-soil.vue')
|
||||
},{
|
||||
path: '/systemSet-soil',
|
||||
name: 'systemSet-soil',
|
||||
component: () => import('../views/page/systemSet-soil.vue')
|
||||
},{
|
||||
path: '/upload-soil',
|
||||
name: 'upload-soil',
|
||||
component: () => import('../views/page/upload-soil.vue')
|
||||
},{
|
||||
path: '/sensorSet-soil',
|
||||
name: 'sensorSet-soil',
|
||||
component: () => import('../views/page/sensorSet-soil.vue')
|
||||
},{
|
||||
path: '/status-soil',
|
||||
name: 'status-soil',
|
||||
component: () => import('../views/page/status-soil.vue')
|
||||
},]
|
||||
},]
|
||||
},
|
||||
|
||||
|
|
|
@ -59,22 +59,22 @@ export default new Vuex.Store({
|
|||
{ label: '蒸发量', value: 36, countType: 2,unit:'mm' },
|
||||
{ label: '负氧离子', value: 37, countType: 0,unit:'个/cm3' },
|
||||
{ label: '露点温度', value: 38, countType: 3,unit:'℃' },
|
||||
{ label: '设备电压', value: 39, countType: 2,unit:'V' },
|
||||
{ label: '设备电流', value: 40, countType: 2,unit:'A' },
|
||||
{ label: '一氧化碳', value: 39, countType: 0,unit:'ppm' },
|
||||
{ label: '氨氮', value: 40, countType: 2,unit:'mg/L' },
|
||||
{ label: '土壤氮含量', value: 41, countType: 0,unit:'mg/kg' },
|
||||
{ label: '土壤磷含量', value: 42, countType: 0,unit:'mg/kg' },
|
||||
{ label: '土壤钾含量', value: 43, countType: 0,unit:'mg/kg' },
|
||||
{ label: '管道压力', value: 44, countType: 0,unit:'Kpa' },
|
||||
{ label: '水位', value: 45, countType: 0,unit:'cm' },
|
||||
{ label: '氨气', value: 46, countType: 0,unit:'ppm' },
|
||||
{ label: '硫化氢', value: 47, countType: 0,unit:'ppm' },
|
||||
{ label: '浊度', value: 47, countType: 0,unit:'NTU' },
|
||||
{ label: '氧气', value: 48, countType: 2,unit:'%vol' },
|
||||
{ label: '土壤张力', value: 49, countType: 4,unit:'KPa' },
|
||||
{ label: '铜(CU)', value: 50, countType: 0,unit:'mg/kg' },
|
||||
{ label: '镉(CD)', value: 51, countType: 2,unit:'mg/kg' },
|
||||
{ label: '铅(PB)', value: 52, countType: 0,unit:'mg/kg' },
|
||||
{ label: '噪声', value: 53, countType: 0,unit:'dB' },
|
||||
{ label: '叶面面积', value: 54, countType: 0,unit:'mm' },
|
||||
{ label: '溶解氧', value: 54, countType: 2,unit:'mg/L' },
|
||||
{ label: '虫数量', value: 55, countType: 0,unit:'个' },
|
||||
{ label: '无线传感器电池电压', value: 56, countType: 2,unit:'V' },
|
||||
{ label: '无线传感器无线信号强度', value: 57, countType: 1,unit:'dBm' },
|
||||
|
|
|
@ -25,10 +25,4 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
|
@ -30,7 +30,7 @@
|
|||
<template v-for="item, index in leftList">
|
||||
<el-collapse-item :name="index + 1" :key="index" v-if="!item.isRouter">
|
||||
<template slot="title" class="collapse-title">
|
||||
<div class="img"><img :src="item.img" alt=""></div> {{ item.name }}
|
||||
<div class="img"><img style="width: 16px;":src="item.img" alt=""></div> {{ item.name }}
|
||||
</template>
|
||||
<ul class="table-ul">
|
||||
<li class="table-li" @click="toRouter1(item1)"
|
||||
|
@ -111,6 +111,7 @@ export default {
|
|||
{ name: '温室', routerList: ['realTime', 'dataAnalysis', 'historyData', 'exitSettings', 'videoMonitoring','imageData', 'skylight', 'control', 'systemSet-con', 'fan', 'upload-con', 'sensorSet-con', 'synthesis-con', 'alarmSettings', 'waterPump', 'geothermalFan', 'uptake', 'downtake', 'rollByRoll', 'snowRemoval', "targetTemperature", "targetHumidity", "targetCo2", "sunroofControl", "outsizeSunshade", "insizeSunshade", "wetFan", "LED", 'electromagneticControl', "coercionMist", "circulationCan", "internalInsulation", "forceOutput", "intrinsicParameter", "parameterSet"], img: require('../assets/image/left-img0.png'), list: [] },
|
||||
// { name: '二号温室', img: require('../assets/image/left-img1.png'), list: [] },
|
||||
{ name: '施肥机', routerList: ['formula', 'dataAnalysis', 'historyData', 'irrigateSet', 'videoMonitoring','imageData', 'PIDSet', 'systemSet', 'upload', 'sensorSet', 'realTime', 'history', 'dataAnalysis'], img: require('../assets/image/left-img2.png'), list: [] },
|
||||
{ name: '智能灌溉', routerList: ['realTime', 'dataAnalysis', 'historyData','irrigateSet-soil', 'videoMonitoring','imageData','PIDSet-soil', 'systemSet-soil', 'upload-soil', 'sensorSet-soil', 'realTime', 'history', 'dataAnalysis'], img: require('../assets/image/irrigateSet-icon1-act.png'), list: [] },
|
||||
{ name: '生态气象站', routerList: ['realTime', 'historyData', 'exitSettings', 'skylight', 'control', 'systemSet-con','imageData', 'fan', 'upload-con', 'sensorSet-con', 'synthesis-con', 'alarmSettings', 'waterPump', 'geothermalFan', 'uptake', 'downtake', 'rollByRoll', 'snowRemoval', "targetTemperature", "targetHumidity", "targetCo2", "sunroofControl", "outsizeSunshade", "insizeSunshade", "wetFan", "LED", 'electromagneticControl', "coercionMist", "circulationCan", "internalInsulation", "forceOutput", "intrinsicParameter", "parameterSet"], img: require('../assets/image/left-img3.png'), list: [] },
|
||||
],
|
||||
leftList1: [
|
||||
|
@ -300,6 +301,7 @@ export default {
|
|||
this.leftList[1].list = []
|
||||
this.leftList[2].list = []
|
||||
this.leftList[3].list = []
|
||||
this.leftList[4].list = []
|
||||
this.$store.state.equipmentList.forEach((el, index) => {
|
||||
//链接中的deviceId
|
||||
if (this.deviceId && this.deviceId == el.deviceId) {
|
||||
|
@ -317,6 +319,12 @@ export default {
|
|||
this.leftList[index1].list.push(el)
|
||||
}
|
||||
})
|
||||
} else if (el.deviceName == 20) {
|
||||
this.leftList.forEach((el1, index1) => {
|
||||
if (el1.name == '智能灌溉') {
|
||||
this.leftList[index1].list.push(el)
|
||||
}
|
||||
})
|
||||
}
|
||||
// else if (el.deviceName == 30) {
|
||||
// this.leftList.forEach((el1, index1) => {
|
||||
|
@ -356,10 +364,14 @@ export default {
|
|||
if (el1.name == '施肥机') {
|
||||
this.leftList[index1].list.sort(this.compare('equipmentStatu'))
|
||||
}
|
||||
if (el1.name == '智能灌溉') {
|
||||
this.leftList[index1].list.sort(this.compare('equipmentStatu'))
|
||||
}
|
||||
if (el1.name == '生态气象站') {
|
||||
this.leftList[index1].list.sort(this.compare('equipmentStatu'))
|
||||
}
|
||||
})
|
||||
|
||||
this.gerRouter()
|
||||
this.getByid()
|
||||
var data = {
|
||||
|
@ -431,6 +443,8 @@ export default {
|
|||
}
|
||||
if (this.deviceName == '10') {
|
||||
this.$router.push({ path: `/control` })
|
||||
} else if(this.deviceName == '20'){
|
||||
this.$router.push({ path: `/soil` })
|
||||
} else {
|
||||
this.$router.push({ path: `/formula` })
|
||||
}
|
||||
|
@ -454,7 +468,7 @@ export default {
|
|||
// item.id == 2 东北;
|
||||
// item.id == 1 丽水;
|
||||
// item.id == 5 石门;
|
||||
const foundObject = this.limitUserId.find(item => item.id == 2 || item.id == 1 || item.id == 5);
|
||||
const foundObject = this.limitUserId.find(item => item.id == 2 || item.id == 1 || item.id == 5|| item.id == 7);
|
||||
if (!foundObject) {
|
||||
this.$message('您当前没有权限查看!')
|
||||
return
|
||||
|
@ -497,6 +511,7 @@ export default {
|
|||
} else {
|
||||
|
||||
if (item.deviceName == 10) {
|
||||
// 控制器跳转
|
||||
// 限制页面随意跳转
|
||||
this.$store.state.equipmentIndex = item.index
|
||||
this.routerIndex = item.index
|
||||
|
@ -505,6 +520,7 @@ export default {
|
|||
}
|
||||
this.$router.push({ path: `/control?change=${item.index}` })
|
||||
} else if (item.deviceName == 1 ) {
|
||||
// 施肥机跳转
|
||||
if(this.routerNow == 'irrigateSet'){
|
||||
this.$store.state.equipmentIndex = item.index
|
||||
this.routerIndex = item.index
|
||||
|
@ -513,10 +529,19 @@ export default {
|
|||
this.routerIndex = item.index
|
||||
this.$router.push({ path: `/irrigateSet?change=${item.index}` })
|
||||
}
|
||||
|
||||
|
||||
} else if (item.deviceName == 20 ) {
|
||||
// 智能灌溉
|
||||
|
||||
} else if (item.deviceName == 30) {
|
||||
if(this.routerNow == 'irrigateSet-soil'){
|
||||
this.$store.state.equipmentIndex = item.index
|
||||
this.routerIndex = item.index
|
||||
}else{
|
||||
this.$store.state.equipmentIndex = item.index
|
||||
this.routerIndex = item.index
|
||||
this.$router.push({ path: `/irrigateSet-soil?change=${item.index}` })
|
||||
}
|
||||
}
|
||||
else if (item.deviceName == 30) {
|
||||
this.$message('气象站无该页面');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,8 +12,12 @@
|
|||
<img src="../../assets/manageImg/manage-btn-icon1.png" alt="">
|
||||
控制器
|
||||
</div>
|
||||
<div class="manage-btn" @click="active = 2" :class="active == 2 ? 'active' : ''">
|
||||
<img src="../../assets/manageImg/manage-btn-icon1.png" alt="">
|
||||
智能控制器
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-view" v-if="active == 0">
|
||||
<div class="table-view" style="width: 100%;" v-if="active === 0">
|
||||
<el-table :data="tableData" :row-class-name="tableRowClassName" height="620" style="width: 100%">
|
||||
<!-- <el-table-column label="序号">
|
||||
<template slot-scope="scope">
|
||||
|
@ -25,7 +29,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="deviceTypeName" label="设备名称">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="260px">
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<div class="table-flex">
|
||||
<div class="table-operate blue" @click="openModel(scope.row, scope.$index)">
|
||||
|
@ -40,7 +44,8 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="table-view" v-else>
|
||||
|
||||
<div class="table-view" style="width: 100%;" v-if="active===1">
|
||||
<el-table :data="tableData1" :row-class-name="tableRowClassName" height="620" style="width: 100%">
|
||||
<!-- <el-table-column label="序号">
|
||||
<template slot-scope="scope">
|
||||
|
@ -64,7 +69,33 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="table-view" style="width: 100%;" v-if="active===2">
|
||||
<el-table :data="tableData2" :row-class-name="tableRowClassName" height="620" style="width: 100%">
|
||||
<!-- <el-table-column label="序号">
|
||||
<template slot-scope="scope">
|
||||
<div>{{scope.$index+1 }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="deviceId" label="设备code码">
|
||||
</el-table-column>
|
||||
<el-table-column prop="deviceTypeName" label="设备名称">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<div class="table-flex">
|
||||
<div class="table-operate blue" @click="openModel1(scope.row, scope.$index)">
|
||||
<img src="../../assets/manageImg/table-edit.png" alt="">编辑
|
||||
</div>
|
||||
<div class="table-operate red" @click="openModelName1(scope.row, scope.$index)">
|
||||
<img src="../../assets/manageImg/table-edit.png" alt="">修改更多名称
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-dialog title="提示" top="10vh" :visible.sync="addModel" width="700px" class="vrcode-model manage-model"
|
||||
:append-to-body="true">
|
||||
<div class="vrcode-model-title">
|
||||
|
@ -112,7 +143,7 @@
|
|||
<div class="vrcode-btn cancle-btn w-100" @click="addModel = false">取消</div>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 施肥机的修改名字 -->
|
||||
<el-dialog title="提示" top="10vh" :visible.sync="changeName" width="760px" class="vrcode-model manage-model"
|
||||
:append-to-body="true">
|
||||
<div class="vrcode-model-title">
|
||||
|
@ -223,7 +254,7 @@
|
|||
<div class="vrcode-btn cancle-btn w-100" @click="changeName = false">取消</div>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 控制器编辑 -->
|
||||
<el-dialog title="提示" top="10vh" :visible.sync="addModel1" width="564px" class="vrcode-model manage-model"
|
||||
:append-to-body="true">
|
||||
<div class="vrcode-model-title">
|
||||
|
@ -274,6 +305,73 @@
|
|||
<div class="vrcode-btn cancle-btn w-100" @click="addModel1 = false">取消</div>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- 智能灌溉 -->
|
||||
<el-dialog title="提示" top="10vh" :visible.sync="changeName1" width="760px" class="vrcode-model manage-model"
|
||||
:append-to-body="true">
|
||||
<div class="vrcode-model-title">
|
||||
修改更多名称
|
||||
</div>
|
||||
<div class="vrcode-content" v-if="name20List">
|
||||
<div class="manage-left">
|
||||
<div class="manage-input w-160">
|
||||
<div class="input-title">智能灌溉1-8</div>
|
||||
<input type="text" v-model="name20List.name1" placeholder="灌溉组1">
|
||||
</div>
|
||||
<div class="manage-input w-160">
|
||||
<input type="text" v-model="name20List.name2" placeholder="灌溉组2">
|
||||
</div>
|
||||
<div class="manage-input w-160">
|
||||
<input type="text" v-model="name20List.name3" placeholder="灌溉组3">
|
||||
</div>
|
||||
<div class="manage-input w-160">
|
||||
<input type="text" v-model="name20List.name4" placeholder="灌溉组4">
|
||||
</div>
|
||||
<div class="manage-input w-160">
|
||||
<input type="text" v-model="name20List.name5" placeholder="灌溉组5">
|
||||
</div>
|
||||
<div class="manage-input w-160">
|
||||
<input type="text" v-model="name20List.name6" placeholder="灌溉组6">
|
||||
</div>
|
||||
<div class="manage-input w-160">
|
||||
<input type="text" v-model="name20List.name7" placeholder="灌溉组7">
|
||||
</div>
|
||||
<div class="manage-input w-160">
|
||||
<input type="text" v-model="name20List.name8" placeholder="灌溉组8">
|
||||
</div>
|
||||
</div>
|
||||
<div class="manage-center">
|
||||
<div class="manage-input w-160">
|
||||
<div class="input-title">智能灌溉9-16</div>
|
||||
<input type="text" v-model="name20List.name9" placeholder="灌溉组1">
|
||||
</div>
|
||||
<div class="manage-input w-160">
|
||||
<input type="text" v-model="name20List.name10" placeholder="灌溉组2">
|
||||
</div>
|
||||
<div class="manage-input w-160">
|
||||
<input type="text" v-model="name20List.name11" placeholder="灌溉组3">
|
||||
</div>
|
||||
<div class="manage-input w-160">
|
||||
<input type="text" v-model="name20List.name12" placeholder="灌溉组4">
|
||||
</div>
|
||||
<div class="manage-input w-160">
|
||||
<input type="text" v-model="name20List.name13" placeholder="灌溉组5">
|
||||
</div>
|
||||
<div class="manage-input w-160">
|
||||
<input type="text" v-model="name20List.name14" placeholder="灌溉组6">
|
||||
</div>
|
||||
<div class="manage-input w-160">
|
||||
<input type="text" v-model="name20List.name15" placeholder="灌溉组7">
|
||||
</div>
|
||||
<div class="manage-input w-160">
|
||||
<input type="text" v-model="name20List.name16" placeholder="灌溉组8">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<div class="vrcode-btn blue-btn w-100" @click="changeAddModel3">确定</div>
|
||||
<div class="vrcode-btn cancle-btn w-100" @click="changeName = false">取消</div>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -283,14 +381,24 @@ export default {
|
|||
active: 0,
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
addModel: false,
|
||||
addModel1: false,
|
||||
changeName: false,
|
||||
nowData: null,
|
||||
nowData1: null,
|
||||
nameList:null,
|
||||
nameList:null,//施肥机名字
|
||||
name20List:null,//智能灌溉名字
|
||||
changeName1:false,//智能灌溉的弹窗
|
||||
}
|
||||
},
|
||||
// watch:{
|
||||
// active(){
|
||||
// setTimeout(() => {
|
||||
// this.$forceUpdate()
|
||||
// }, 10);
|
||||
// },
|
||||
// },
|
||||
mounted() { this.dataInit() },
|
||||
methods: {
|
||||
dataInit() {
|
||||
|
@ -298,12 +406,15 @@ export default {
|
|||
this.api.selUserbyid(user.userid).then(res => {
|
||||
this.tableData = []
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
if (res.data.code == 200) {
|
||||
res.data.data.devices.forEach((el, index) => {
|
||||
if (el.deviceName == 10) {
|
||||
this.tableData1.push(el)
|
||||
} else if (el.deviceName == 1) {
|
||||
this.tableData.push(el)
|
||||
} else if (el.deviceName == 20) {
|
||||
this.tableData2.push(el)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -347,6 +458,43 @@ export default {
|
|||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
openModelName1(item,index){
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
var data={deviceId:item.deviceId}
|
||||
this.api.getFi_getName(data).then(res=>{
|
||||
this.loading.close()
|
||||
if (res.data.code == 200) {
|
||||
this.name20List=res.data.data
|
||||
this.changeName1=true
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
changeAddModel3(){
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
var data = this.name20List
|
||||
this.api.getFi_updateName(data).then(res=>{
|
||||
this.loading.close()
|
||||
if (res.data.code == 200) {
|
||||
this.$message.success(res.data.msg);
|
||||
this.changeName1 = false
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
this.changeName1 = false
|
||||
}
|
||||
})
|
||||
},
|
||||
changeAddModel1() {
|
||||
this.loading = this.$loading({
|
||||
|
|
|
@ -154,7 +154,10 @@ export default {
|
|||
},
|
||||
|
||||
deviceType:'',
|
||||
deviceSel: [{ label: '控制器', value: 10, }, { label: '施肥机', value: 1, }, { label: '气象站', value:30, }],
|
||||
deviceSel: [{ label: '控制器', value: 10, },
|
||||
{ label: '施肥机', value: 1, },
|
||||
{ label: '气象站', value:30, },
|
||||
{ label: '智能灌溉控制器', value:20, }],
|
||||
}
|
||||
},
|
||||
mounted() { this.dataInit() },
|
||||
|
@ -179,6 +182,8 @@ export default {
|
|||
return 1
|
||||
} else if(e == '气象站'){
|
||||
return 30
|
||||
} else if(e == '智能灌溉控制器'){
|
||||
return 20
|
||||
}
|
||||
},
|
||||
handleCommand1(e) {
|
||||
|
|
|
@ -225,7 +225,10 @@ export default {
|
|||
typeSelList: [{ label: '管理员', value: 1, }, { label: '用户', value: 2, }],
|
||||
|
||||
deviceType:'',
|
||||
deviceSel: [{ label: '控制器', value: 10, }, { label: '施肥机', value: 1, }, { label: '气象站', value:30, }],
|
||||
deviceSel: [{ label: '控制器', value: 10, },
|
||||
{ label: '施肥机', value: 1, },
|
||||
{ label: '气象站', value:30, },
|
||||
{ label: '智能灌溉控制器', value:20, }],
|
||||
}
|
||||
},
|
||||
mounted() { this.dataInit() },
|
||||
|
@ -293,6 +296,8 @@ export default {
|
|||
return '施肥机'
|
||||
} else if (e == '30') {
|
||||
return '气象站'
|
||||
} else if (e == '20') {
|
||||
return '智能灌溉控制器'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
|
@ -384,6 +389,8 @@ export default {
|
|||
return 1
|
||||
} else if(e == '气象站'){
|
||||
return 30
|
||||
}else if(e == '智能灌溉控制器'){
|
||||
return 20
|
||||
}
|
||||
},
|
||||
handleCommand1(e) {
|
||||
|
|
|
@ -99,7 +99,7 @@ export default {
|
|||
this.tableData = res.data.data.equipments
|
||||
this.typeSelList=[]
|
||||
res.data.data.devices.forEach((el,index)=>{
|
||||
if(el.deviceName==10){
|
||||
if(el.deviceName!=30){
|
||||
this.typeSelList.push(el)
|
||||
}
|
||||
})
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="清水与肥料的比例">
|
||||
<el-table-column label="清水与肥料的倍数">
|
||||
<template slot-scope="scope">
|
||||
<div class="input-main-80">
|
||||
<input @blur="blurChange(store.formulaNum[indexs - 1] + 5 + scope.$index, $event)"
|
||||
|
@ -222,6 +222,7 @@ export default {
|
|||
dataSel: '',
|
||||
store: this.$store.state,
|
||||
loading:null,
|
||||
numlist:[],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -309,14 +310,17 @@ export default {
|
|||
}, 100);
|
||||
},
|
||||
getSeldata3(num) {
|
||||
var number = this.padString(num.toString(2), 9)
|
||||
var number = this.padString(num.toString(2), 16)
|
||||
this.numlist = number.split('')
|
||||
this.numlist.forEach((el, index) => {
|
||||
if (Number(el)) {
|
||||
this.tableData[this.tableData.length - 1 - index].open = true
|
||||
if(index<this.tableData.length){
|
||||
if (Number(this.numlist[this.numlist.length - 1 - index])) {
|
||||
this.tableData[index].open = true
|
||||
} else {
|
||||
this.tableData[this.tableData.length - 1 - index].open = false
|
||||
this.tableData[index].open = false
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
padString(str, length) {
|
||||
|
|
|
@ -0,0 +1,393 @@
|
|||
<template>
|
||||
<div class="intrinsicParameter">
|
||||
<div class="table-title">
|
||||
<img src="../../assets/img/intrinsicParameter.png" alt="">设备固有参数
|
||||
</div>
|
||||
<div class="flex-view border-none shrink-none padding-none">
|
||||
|
||||
<div class="input-main-80">
|
||||
<span>土壤传感器安装数量:</span>
|
||||
<input @blur="blurChange(10031, $event)" v-model="inputData[10031]" @input="change(10031, $event)"
|
||||
type="text" placeholder="0">
|
||||
</div>
|
||||
|
||||
<div class="input-main-80">
|
||||
<span>出水流量脉冲(P/L):</span>
|
||||
<input @blur="blurChange(10030, $event)" v-model="inputData[10030]" @input="change(10030, $event)"
|
||||
type="text" placeholder="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none shrink-none padding-none" v-for="item,index in 40" :key="index">
|
||||
<div class=" input-main-80">
|
||||
<span>{{index+1}}#灌溉组土壤温度传感器选择</span>
|
||||
<input @blur="blurChange(10080+index, $event)" v-model="inputData[10080+index]" @input="change(10080+index, $event)"
|
||||
type="text" placeholder="0">
|
||||
<span>#土壤温度</span>
|
||||
<!-- <el-dropdown @command="handleCommand($event,10080+index)">
|
||||
<div class="el-dropdown-link">
|
||||
<input v-model="inputDataNew[10080+index]" type="text" class="input-input" placeholder="无">
|
||||
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
|
||||
</div>
|
||||
<el-dropdown-menu class="input-menu-180" slot="dropdown">
|
||||
<el-dropdown-item v-for="item, index in typeList1" :key="index" :command="item.value">{{
|
||||
item.label }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown> -->
|
||||
</div>
|
||||
<div class=" input-main-80">
|
||||
<span>{{index+1}}#灌溉组土壤湿度传感器选择</span>
|
||||
<input @blur="blurChange(10040+index, $event)" v-model="inputData[10040+index]" @input="change(10040+index, $event)"
|
||||
type="text" placeholder="0">
|
||||
<span>#土壤湿度</span>
|
||||
<!-- <el-dropdown @command="handleCommand($event,10040+index)">
|
||||
<div class="el-dropdown-link">
|
||||
<input v-model="inputDataNew[10040+index]" type="text" class="input-input" placeholder="无">
|
||||
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
|
||||
</div>
|
||||
<el-dropdown-menu class="input-menu-180" slot="dropdown">
|
||||
<el-dropdown-item v-for="item, index in typeList2" :key="index" :command="item.value">{{
|
||||
item.label }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<el-dialog title="请输入密码" class="vrcode-model confirm-psw" top="30vh" :close-on-click-modal="false" :append-to-body="true" :visible.sync="warnModel"
|
||||
width="700px">
|
||||
<div class="vrcode-model-title vrcode-model-title-282">请输入密码</div>
|
||||
<div class="warning-model" style="padding: 0 30px;">
|
||||
<div class="flex-view border-none">
|
||||
<div class="input-main">
|
||||
<div>密码:</div>
|
||||
<input type="text" v-model="modelPassword">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="modelClose">取 消</el-button>
|
||||
<el-button type="success" @click="modelConfirm">确 认</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
warnModel: true,
|
||||
modelPassword:'',
|
||||
sensorType: '',
|
||||
typeList1: [
|
||||
// { label: '平均1#土壤湿度', value: 0 },
|
||||
{ label: '1#土壤温度', value: 1 },
|
||||
{ label: '2#土壤温度', value: 2 },
|
||||
{ label: '3#土壤温度', value: 3 },
|
||||
{ label: '4#土壤温度', value: 4 },
|
||||
{ label: '5#土壤温度', value: 5 },
|
||||
{ label: '6#土壤温度', value: 6 },
|
||||
{ label: '7#土壤温度', value: 7 },
|
||||
{ label: '8#土壤温度', value: 8 },
|
||||
{ label: '9#土壤温度', value: 9 },
|
||||
{ label: '10#土壤温度', value: 10 },
|
||||
{ label: '11#土壤温度', value: 11 },
|
||||
{ label: '12#土壤温度', value: 12 },
|
||||
{ label: '13#土壤温度', value: 13 },
|
||||
{ label: '14#土壤温度', value: 14 },],
|
||||
list1:40,
|
||||
typeList2: [
|
||||
// { label: '平均1#土壤湿度', value: 0 },
|
||||
{ label: '1#土壤湿度', value: 1 },
|
||||
{ label: '2#土壤湿度', value: 2 },
|
||||
{ label: '3#土壤湿度', value: 3 },
|
||||
{ label: '4#土壤湿度', value: 4 },
|
||||
{ label: '5#土壤湿度', value: 5 },
|
||||
{ label: '6#土壤湿度', value: 6 },
|
||||
{ label: '7#土壤湿度', value: 7 },
|
||||
{ label: '8#土壤湿度', value: 8 },
|
||||
{ label: '9#土壤湿度', value: 9 },
|
||||
{ label: '10#土壤湿度', value: 10 },
|
||||
{ label: '11#土壤湿度', value: 11 },
|
||||
{ label: '12#土壤湿度', value: 12 },
|
||||
{ label: '13#土壤湿度', value: 13 },
|
||||
{ label: '14#土壤湿度', value: 14 },],
|
||||
list2:40,
|
||||
typeList3: [
|
||||
{ label: '加热模式', value: 1 },
|
||||
{ label: '制冷模式', value: 2 },],
|
||||
inputData:[],
|
||||
inputDataNew:[],
|
||||
loading:null,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
'$store.state.equipmentIndex'(newVal, oldVal) {
|
||||
this.dataInit();
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.dataInit()
|
||||
//input获取焦点后全选
|
||||
let inputList = document.querySelectorAll('input');
|
||||
for (let index = 0; index < inputList.length; index++) {
|
||||
inputList[index].onfocus = this.selectValue;//input放入焦点,全选文本
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
modelClose(){
|
||||
this.$router.go(-1); // 返回前一页
|
||||
},
|
||||
modelConfirm(){
|
||||
if(this.modelPassword=='230509'){
|
||||
this.warnModel=false
|
||||
}else{
|
||||
this.$message('密码错误');
|
||||
}
|
||||
},
|
||||
//失去焦点 计算公式 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 (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// 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)
|
||||
},
|
||||
// 计算展示值 计算公式 x/10
|
||||
countData10(data) {
|
||||
if (data) {
|
||||
return data / 10
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
getData1(data) {
|
||||
var name=''
|
||||
this.typeList1.forEach((el, index) => {
|
||||
if (el.value == data) {
|
||||
name=el.label
|
||||
}
|
||||
})
|
||||
return name
|
||||
},
|
||||
getData2(data) {
|
||||
var name=''
|
||||
this.typeList2.forEach((el, index) => {
|
||||
if (el.value == data) {
|
||||
name=el.label
|
||||
}
|
||||
})
|
||||
return name
|
||||
},
|
||||
getData3(data) {
|
||||
var name=''
|
||||
this.typeList3.forEach((el, index) => {
|
||||
if (el.value == data) {
|
||||
name=el.label
|
||||
}
|
||||
})
|
||||
return name
|
||||
},
|
||||
dataInit() {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
};
|
||||
this.api.readFi_intrinsicparameterfi(data).then(res => {
|
||||
this.loading.close()
|
||||
if (res.data.code == 200) {
|
||||
this.inputData =JSON.parse(JSON.stringify(res.data.data));
|
||||
this.inputDataNew=JSON.parse(JSON.stringify(res.data.data))
|
||||
|
||||
// for (let i = 0; i < 40; i++) {
|
||||
// this.inputDataNew[10080+i]=this.getData1(this.inputData[10080+i])
|
||||
// this.inputDataNew[10040+i]=this.getData2(this.inputData[10040+i])
|
||||
|
||||
|
||||
// }
|
||||
// this.list1.forEach((el,index)=>{
|
||||
// this.inputDataNew[el]=this.getData1(this.inputData[el])
|
||||
// })
|
||||
// this.list2.forEach((el,index)=>{
|
||||
// this.inputDataNew[el]=this.getData2(this.inputData[el])
|
||||
// })
|
||||
// this.inputDataNew[20726]=this.getData3(this.inputData[20726])
|
||||
console.log(this.inputData, this.inputDataNew);
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
//二进制转换后的补全
|
||||
padString(str, length) {
|
||||
return str.padStart(length, '0');
|
||||
},
|
||||
//反转数组 不影响原数组
|
||||
myReverse(arr) {
|
||||
return [...arr].reverse()
|
||||
},
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
var store = this.$store.state
|
||||
store.nowInput = e.target.value
|
||||
e.currentTarget.select();
|
||||
},
|
||||
//失去焦点
|
||||
blurChange(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
},
|
||||
//修改数据的函数
|
||||
changeBtn(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
};
|
||||
this.delayTimerBtn(0, data);
|
||||
},
|
||||
//切换btn的限制 写入停止后j*100毫秒调取函数
|
||||
delayTimerBtn(i, data) {
|
||||
const that = this;
|
||||
//整体接口
|
||||
let j = this.$store.state.lateSendBtn;
|
||||
//避免开启多个计时器
|
||||
this.timer && clearInterval(this.timer);
|
||||
|
||||
this.timer = setInterval(() => {
|
||||
++i;
|
||||
if (i == j) {
|
||||
that.changeData(data);
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
}, 100);
|
||||
},
|
||||
//类型选择
|
||||
handleCommand(command,code) {
|
||||
this.typeList1.forEach((el, index) => {
|
||||
if (el.value == command) {
|
||||
this.inputDataNew[code] = el.label
|
||||
}
|
||||
})
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: command,
|
||||
},
|
||||
};
|
||||
this.changeBtn(code, dataNum);
|
||||
},
|
||||
|
||||
//类型选择
|
||||
handleCommand1(command,code) {
|
||||
this.typeList3.forEach((el, index) => {
|
||||
if (el.value == command) {
|
||||
this.inputDataNew[code] = el.label
|
||||
}
|
||||
})
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: command,
|
||||
},
|
||||
};
|
||||
this.changeBtn(code, dataNum);
|
||||
},
|
||||
|
||||
//类型选择
|
||||
handleCommand2(command,code) {
|
||||
this.typeList2.forEach((el, index) => {
|
||||
if (el.value == command) {
|
||||
this.inputDataNew[code] = el.label
|
||||
}
|
||||
})
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: command,
|
||||
},
|
||||
};
|
||||
this.changeBtn(code, dataNum);
|
||||
},
|
||||
change(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
};
|
||||
this.delayTimer(0, data);
|
||||
},
|
||||
//限制 写入停止后j*100毫秒调取函数
|
||||
delayTimer(i, data) {
|
||||
// const that = this;
|
||||
// //整体接口
|
||||
// let j = this.$store.state.lateSend;
|
||||
// //避免开启多个计时器
|
||||
// this.timer && clearInterval(this.timer);
|
||||
|
||||
// this.timer = setInterval(() => {
|
||||
// ++i;
|
||||
// if (i == j) {
|
||||
// that.changeData(data);
|
||||
// clearInterval(this.timer);
|
||||
// }
|
||||
// }, 100);
|
||||
},
|
||||
changeData(data) {
|
||||
var store = this.$store.state
|
||||
this.api.postwriteFi_write(data).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
this.$message({
|
||||
message: res.data.msg,
|
||||
type: "success",
|
||||
});
|
||||
store.nowInput = ''
|
||||
// this.dataInit();
|
||||
} else {
|
||||
this.inputData[data.regAddress] = store.nowInput
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
this.timer = null
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss"></style>
|
||||
|
|
@ -0,0 +1,993 @@
|
|||
<template>
|
||||
<div class="irrigateSet">
|
||||
<div class="table-title">
|
||||
<img src="../../assets/image/irrigateSet.png" alt="" />
|
||||
{{ pageName }}
|
||||
<!-- <div class="tips"></div> -->
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="input-btn">
|
||||
<span>控制模式选择</span>
|
||||
<div class="btn" @click="change00(3)"
|
||||
:class="inputData['1' + (10 + (indexs - 1)) + '00'] == 3 ? 'blue' : 'green'">
|
||||
<img src="../../assets/image/irrigateSet1.png" alt="" />停止
|
||||
</div>
|
||||
<div class="btn" @click="change00(2)"
|
||||
:class="inputData['1' + (10 + (indexs - 1)) + '00'] == 2 ? 'blue' : 'green'">
|
||||
<img src="../../assets/image/irrigateSet3.png" alt="" />手动启动
|
||||
</div>
|
||||
<div class="btn" @click="change00(1)"
|
||||
:class="inputData['1' + (10 + (indexs - 1)) + '00'] == 1 ? 'blue' : 'green'">
|
||||
<img src="../../assets/image/irrigateSet2.png" alt="" />自动
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>手动启动时间</span>
|
||||
<input @blur="blurChange10('1' + (10 + (indexs - 1)) + '01', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '01']"
|
||||
@input="changeData10('1' + (10 + (indexs - 1)) + '01', $event)" type="text" value="60" placeholder="60" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="input-main-80">
|
||||
<span>自动运行起始日期</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '02', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '02']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '02', $event)" type="number" placeholder="0" />
|
||||
<span>年</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '03', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '03']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '03', $event)" type="number" placeholder="0" />
|
||||
<span>月</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '04', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '04']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '04', $event)" type="number" placeholder="0" />
|
||||
<span>日</span>
|
||||
</div>
|
||||
<div class="input-main-80">
|
||||
<span>间隔灌溉天数</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '05', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '05']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '05', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="flex-view">
|
||||
<div class="input-main-80">
|
||||
<span>灌溉</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '51', $event)" v-model="inputData['1' + (10 + (indexs - 1)) + '51']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '51', $event)" type="number" placeholder="0" />
|
||||
<span>次清水,间隔灌溉</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '52', $event)" v-model="inputData['1' + (10 + (indexs - 1)) + '52']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '52', $event)" type="number" placeholder="0" />
|
||||
<span>次施肥。</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="input-main-80">
|
||||
<span>施肥时采用</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '58', $event)" v-model="inputData['1' + (10 + (indexs - 1)) + '58']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '58', $event)" type="number" placeholder="0" />
|
||||
<span>号配方。</span>
|
||||
<span>达到中液位混合</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '66', $event)" v-model="inputData['1' + (10 + (indexs - 1)) + '66']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '66', $event)" type="number" placeholder="0" />
|
||||
<span>(秒)电磁阀开始输出</span>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="flex-view">
|
||||
<div class="input-main-80">
|
||||
<span>电磁阀控制通道</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '52', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '52']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '52', $event)" type="text" placeholder="0" />
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '53', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '53']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '53', $event)" type="text" placeholder="0" />
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '54', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '54']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '54', $event)" type="text" placeholder="0" />
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '55', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '55']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '55', $event)" type="text" placeholder="0" />
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '56', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '56']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '56', $event)" type="text" placeholder="0" />
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '57', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '57']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '57', $event)" type="text" placeholder="0" />
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '58', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '58']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '58', $event)" type="text" placeholder="0" />
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '59', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '59']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '59', $event)" type="text" placeholder="0" />
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '60', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '60']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '60', $event)" type="text" placeholder="0" />
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '61', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '61']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '61', $event)" type="text" placeholder="0" />
|
||||
|
||||
</div>
|
||||
<!-- <div class="btn green">
|
||||
<img src="../../assets/image/rotate.png" alt="" />轮模式启用
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
|
||||
<!-- <div @click="(open1 = !open1), change59()" class="open-btn" :class="open1 ? 'active' : ''">
|
||||
<img v-if="!open1" src="../../assets/image/irrigateSet-icon1.png" alt="" />
|
||||
<img v-else src="../../assets/image/irrigateSet-icon1-act.png" alt="" />
|
||||
灌溉清水时不启动施肥机
|
||||
</div>
|
||||
<div @click="(open2 = !open2), change59()" class="open-btn" :class="open2 ? 'active' : ''">
|
||||
<img v-if="!open2" src="../../assets/image/irrigateSet-icon2.png" alt="" />
|
||||
<img v-else src="../../assets/image/irrigateSet-icon2-act.png" alt="" />
|
||||
灌溉结束时,清空混液罐
|
||||
</div> -->
|
||||
<div @click="change59()" class="open-btn" :class="inputData['1' + (10 + (indexs - 1)) + '62'] ? 'active' : ''">
|
||||
<img v-if="inputData['1' + (10 + (indexs - 1)) + '62'] == 0" src="../../assets/image/irrigateSet-icon2.png"
|
||||
alt="" />
|
||||
<img v-else src="../../assets/image/irrigateSet-icon2-act.png" alt="" />
|
||||
轮灌模式
|
||||
</div>
|
||||
<!-- <div @click="(open4 = !open4), change59()" class="open-btn" :class="open4 ? 'active' : ''">
|
||||
<img v-if="!open4" src="../../assets/image/irrigateSet-icon0.png" alt="" />
|
||||
<img v-else src="../../assets/image/irrigateSet-icon0-act.png" alt="" />
|
||||
灌溉清水时不启动进水泵
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="input-view">
|
||||
<div class="input-sel">
|
||||
<span>施肥机自动运行模式选择</span>
|
||||
<el-dropdown trigger="click" @command="handleCommand">
|
||||
<div class="el-dropdown-link">
|
||||
<input type="text" value="选择设定弹窗" v-model="data53" class="input-input" placeholder="无" />
|
||||
<div class="arrow">
|
||||
<img src="../../assets/image/arrow.png" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="1">预定时间点启动</el-dropdown-item>
|
||||
<el-dropdown-item command="2">预定时间段启动</el-dropdown-item>
|
||||
<el-dropdown-item command="3">依据土壤传感器</el-dropdown-item>
|
||||
<el-dropdown-item command="4">依据光照传感器</el-dropdown-item>
|
||||
<el-dropdown-item command="5">依据外控信号</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog :modal-append-to-body="false" :show-close="false" :close-on-click-modal="true" :visible.sync="model1"
|
||||
width="440px" :before-close="handleClose1">
|
||||
<div class="page-title title-302">{{ indexs }}#灌溉组控制参数配置</div>
|
||||
<div class="model1-top">
|
||||
<div class="btn blue">
|
||||
<img src="../../assets/image/play.png" alt="" />时间点启动
|
||||
</div>
|
||||
<div class="input-main-80">
|
||||
<span>每次灌溉时长</span>
|
||||
<input @blur="blurChange10('1' + (10 + (indexs - 1)) + '06', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '06']"
|
||||
@input="changeData10('1' + (10 + (indexs - 1)) + '06', $event)" type="number" placeholder="0" />
|
||||
<span>分</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="model1-bottom">
|
||||
<div class="title">启动时间点</div>
|
||||
<div class="model1-content">
|
||||
<div>
|
||||
<div class="number">1</div>
|
||||
<div class="input-main-80">
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '07', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '07']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '07', $event)" type="number" placeholder="0" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '08', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '08']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '08', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="number">2</div>
|
||||
<div class="input-main-80">
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '09', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '09']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '09', $event)" type="number" placeholder="0" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '10', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '10']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '10', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="number">3</div>
|
||||
<div class="input-main-80">
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '11', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '11']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '11', $event)" type="number" placeholder="0" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '12', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '12']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '12', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="number">4</div>
|
||||
<div class="input-main-80">
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '13', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '13']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '13', $event)" type="number" placeholder="0" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '14', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '14']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '14', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="number">5</div>
|
||||
<div class="input-main-80">
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '15', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '15']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '15', $event)" type="number" placeholder="0" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '16', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '16']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '16', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="model-return">
|
||||
<div @click="model1 = false" class="btn green">
|
||||
<img src="../../assets/image/return.png" alt="" />返回
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :modal-append-to-body="false" :show-close="false" :close-on-click-modal="true" :visible.sync="model2"
|
||||
width="760px" :before-close="handleClose2">
|
||||
<div class="page-title title-302">{{ indexs }}#灌溉组控制参数配置</div>
|
||||
<div class="model1-top model2-top">
|
||||
<div class="btn blue">
|
||||
<img src="../../assets/image/play.png" alt="" />间隔启动
|
||||
</div>
|
||||
<div class="input-main-80">
|
||||
<span>每次灌溉时长</span>
|
||||
<input @blur="blurChange10('1' + (10 + (indexs - 1)) + '17', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '17']"
|
||||
@input="changeData10('1' + (10 + (indexs - 1)) + '17', $event)" type="number" placeholder="0" />
|
||||
<span>分</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="model1-bottom">
|
||||
<div class="title">启动时间点</div>
|
||||
<div class="model1-content">
|
||||
<div>
|
||||
<div class="number">1</div>
|
||||
<div class="input-main-80">
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '19', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '19']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '19', $event)" type="number" placeholder="0" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '20', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '20']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '20', $event)" type="number" placeholder="0" />
|
||||
<span>-</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '21', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '21']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '21', $event)" type="number" placeholder="0" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '22', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '22']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '22', $event)" type="number" placeholder="0" />
|
||||
<span style="font-size: 16px">时间段里启动次数</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '18', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '18']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '18', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="number">2</div>
|
||||
<div class="input-main-80">
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '24', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '24']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '24', $event)" type="number" placeholder="0" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '25', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '25']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '25', $event)" type="number" placeholder="0" />
|
||||
<span>-</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '26', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '26']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '26', $event)" type="number" placeholder="0" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '27', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '27']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '27', $event)" type="number" placeholder="0" />
|
||||
<span style="font-size: 16px">时间段里启动次数</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '23', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '23']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '23', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="number">3</div>
|
||||
<div class="input-main-80">
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '29', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '29']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '29', $event)" type="number" placeholder="0" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '30', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '30']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '30', $event)" type="number" placeholder="0" />
|
||||
<span>-</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '31', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '31']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '31', $event)" type="number" placeholder="0" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '32', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '32']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '32', $event)" type="number" placeholder="0" />
|
||||
<span style="font-size: 16px">时间段里启动次数</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '28', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '28']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '28', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="model-return">
|
||||
<div @click="model2 = false" class="btn green">
|
||||
<img src="../../assets/image/return.png" alt="" />返回
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :modal-append-to-body="false" :show-close="false" :close-on-click-modal="true" :visible.sync="model3"
|
||||
width="760px" :before-close="handleClose3">
|
||||
<div class="page-title title-302">{{ indexs }}#灌溉组控制参数配置</div>
|
||||
<div class="model1-top model3-top">
|
||||
<div class="btn blue">
|
||||
<img src="../../assets/image/model3-icon.png" alt="" />光积累启动
|
||||
</div>
|
||||
<div class="input-main-80">
|
||||
<span>有效检测时间段</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '45', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '45']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '45', $event)" type="number" placeholder="0" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '46', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '46']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '46', $event)" type="number" placeholder="0" />
|
||||
<span>-</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '47', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '47']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '47', $event)" type="number" placeholder="0" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '48', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '48']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '48', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="model1-bottom model3-bottom">
|
||||
<div class="model1-content model3-content">
|
||||
<div class="input-main-80">
|
||||
<span class="text">启动时灌湛时长</span>
|
||||
<input @blur="blurChange10('1' + (10 + (indexs - 1)) + '40', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '40']"
|
||||
@input="changeData10('1' + (10 + (indexs - 1)) + '40', $event)" type="number" placeholder="0" />
|
||||
<span class="text">分</span>
|
||||
</div>
|
||||
<div class="input-main-80">
|
||||
<span class="text">光积累启动值</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '41', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '41']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '41', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
<div class="input-main-80">
|
||||
<span class="text">最小光照值</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '42', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '42']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '42', $event)" type="number" placeholder="0" />
|
||||
<span class="text">Klux</span>
|
||||
</div>
|
||||
<div class="input-main-80">
|
||||
<span class="text" style="padding-left: 20px">最短灌溉间隔</span>
|
||||
<input @blur="blurChange10('1' + (10 + (indexs - 1)) + '43', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '43']"
|
||||
@input="changeData10('1' + (10 + (indexs - 1)) + '43', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
<div class="input-main-80">
|
||||
<span class="text">最长灌溉间隔</span>
|
||||
<input @blur="blurChange10('1' + (10 + (indexs - 1)) + '44', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '44']"
|
||||
@input="changeData10('1' + (10 + (indexs - 1)) + '44', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="model-return">
|
||||
<div @click="model3 = false" class="btn green">
|
||||
<img src="../../assets/image/return.png" alt="" />返回
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :modal-append-to-body="false" :show-close="false" :close-on-click-modal="true" :visible.sync="model5"
|
||||
width="760px" :before-close="handleClose5">
|
||||
<div class="page-title title-302">{{ indexs }}#灌溉组控制参数配置</div>
|
||||
<div class="model1-top model3-top">
|
||||
<div class="btn blue">
|
||||
<img src="../../assets/image/model3-icon.png" alt="" />土壤传感器
|
||||
</div>
|
||||
<div class="input-main-80">
|
||||
<span>有效检测时间段</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '33', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '33']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '33', $event)" type="number" placeholder="0" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '34', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '34']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '34', $event)" type="number" placeholder="0" />
|
||||
<span>-</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '35', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '35']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '35', $event)" type="number" placeholder="0" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '36', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '36']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '36', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="model1-bottom model3-bottom">
|
||||
<div class="model1-content model3-content">
|
||||
<div class="input-main-80">
|
||||
<span class="text">最低土壤湿度</span>
|
||||
<input @blur="blurChange10('1' + (10 + (indexs - 1)) + '37', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '37']"
|
||||
@input="changeData10('1' + (10 + (indexs - 1)) + '37', $event)" type="number" placeholder="0" />
|
||||
<span class="text">%</span>
|
||||
</div>
|
||||
<div class="input-main-80">
|
||||
<span class="text">最高土壤湿度</span>
|
||||
<input @blur="blurChange10('1' + (10 + (indexs - 1)) + '38', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '38']"
|
||||
@input="changeData10('1' + (10 + (indexs - 1)) + '38', $event)" type="number" placeholder="0" />
|
||||
<span class="text">%</span>
|
||||
</div>
|
||||
<div class="input-main-80">
|
||||
<span class="text">灌溉时长上限</span>
|
||||
<input @blur="blurChange10('1' + (10 + (indexs - 1)) + '39', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '39']"
|
||||
@input="changeData10('1' + (10 + (indexs - 1)) + '39', $event)" type="number" placeholder="0" />
|
||||
<span class="text">分</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="model-return">
|
||||
<div @click="model5 = false" class="btn green">
|
||||
<img src="../../assets/image/return.png" alt="" />返回
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog :modal-append-to-body="false" :show-close="false" :close-on-click-modal="true" :visible.sync="model4"
|
||||
width="700px" :before-close="handleClose4">
|
||||
<div class="page-title title-302">{{ indexs }}#灌溉组控制参数配置</div>
|
||||
<div style="display: flex;align-items: center;">
|
||||
<div class="btn blue">
|
||||
<img src="../../assets/image/model4-icon.png" alt="" />外控模式
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-main-80">
|
||||
<span>有效时间:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '67', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '67']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '67', $event)" type="number" placeholder="0" min="0"
|
||||
max="23" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '68', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '68']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '68', $event)" type="number" placeholder="0" min="0"
|
||||
max="59" />
|
||||
<span>--</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '69', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '69']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '69', $event)" type="number" placeholder="0" min="0"
|
||||
max="23" />
|
||||
<span>:</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '70', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '70']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '70', $event)" type="number" placeholder="0" min="0"
|
||||
max="59" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="model1-top model4-top">
|
||||
<div class="model-left">
|
||||
<div class="btn btn-w80" @click="blurChange('1' + (10 + (indexs - 1)) + '71', { target: { value: 1 } }), model4Sel = 1"
|
||||
:class="model4Sel == 1 ? 'blue' : 'off'">
|
||||
{{ model4Sel == 1 ? '有效' : '无效' }}
|
||||
</div>
|
||||
<span>外部数字量控制方式:</span>
|
||||
</div>
|
||||
|
||||
<div class="model-right">
|
||||
<div>
|
||||
<div class="number">1</div>
|
||||
<div class="input-main-80">
|
||||
<span>外部输入通道</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '49', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '49']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '49', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="number">2</div>
|
||||
<div class="input-main-80">
|
||||
<span>外部输入通道</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '50', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '50']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '50', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="model1-top model4-top">
|
||||
<div class="model-left">
|
||||
<div class="btn btn-w80 "
|
||||
@click="blurChange('1' + (10 + (indexs - 1)) + '71', { target: { value: 2 } }), model4Sel = 2"
|
||||
:class="model4Sel == 2 ? 'blue' : 'off'">
|
||||
{{ model4Sel == 2 ? '有效' : '无效' }}
|
||||
</div>
|
||||
<span>液位传感器控制方式:</span>
|
||||
</div>
|
||||
|
||||
<div class="model-right">
|
||||
<div>
|
||||
<div class="input-main-80">
|
||||
<span>液位信号通道</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '68', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '68']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '68', $event)" type="number" placeholder="0" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-main-80">
|
||||
<span>启动低液位值</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '69', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '69']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '69', $event)" type="number" placeholder="0" />
|
||||
<span>cm</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-main-80">
|
||||
<span>停止高液位值</span>
|
||||
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '70', $event)"
|
||||
v-model="inputData['1' + (10 + (indexs - 1)) + '70']"
|
||||
@input="change('1' + (10 + (indexs - 1)) + '70', $event)" type="number" placeholder="0" />
|
||||
<span>cm</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="model-return">
|
||||
<div @click="model4 = false" class="btn green">
|
||||
<img src="../../assets/image/return.png" alt="" />返回
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
topActive: 1,
|
||||
open1: false,
|
||||
open2: false,
|
||||
open3: false,
|
||||
open4: false,
|
||||
model1: false,
|
||||
model2: false,
|
||||
model3: false,
|
||||
model4: false,
|
||||
model4Sel: 0,
|
||||
model5: false,
|
||||
timer: null,
|
||||
indexs: 2,
|
||||
data53: "",
|
||||
inputData: {},
|
||||
loading: null,
|
||||
pageName:'',
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.equipmentIndex': function (newValue, oldValue) {
|
||||
const that = this;
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
setTimeout(() => {
|
||||
that.dataInit();
|
||||
}, 0);
|
||||
},
|
||||
$route(newVal, oldVal) {
|
||||
const that = this;
|
||||
this.indexs = this.$route.query.id ? this.$route.query.id : 1;
|
||||
this.pageName=this.$route.query.name?this.$route.query.name:(this.indexs+'#智能灌溉组')
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
setTimeout(() => {
|
||||
that.dataInit();
|
||||
}, 0);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
const that = this;
|
||||
this.indexs = this.$route.query.id ? this.$route.query.id : 1;
|
||||
console.log(this.$route);
|
||||
|
||||
this.pageName=this.$route.query.name?this.$route.query.name:(this.indexs+'#智能灌溉组')
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
setTimeout(() => {
|
||||
that.dataInit();
|
||||
}, 0);
|
||||
//input获取焦点后全选
|
||||
let inputList = document.querySelectorAll('input');
|
||||
for (let index = 0; index < inputList.length; index++) {
|
||||
inputList[index].onfocus = this.selectValue;//input放入焦点,全选文本
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
countData10(data) {
|
||||
if (data) {
|
||||
return data / 10
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
changeData10(code, el) {
|
||||
var data = el.target.value * 10
|
||||
var sendData = {
|
||||
target: {
|
||||
value: data
|
||||
}
|
||||
}
|
||||
this.change(code, sendData)
|
||||
},
|
||||
handleCommand(command) {
|
||||
if (command == "1") {
|
||||
this.model1 = true;
|
||||
} else if (command == "2") {
|
||||
this.model2 = true;
|
||||
} else if (command == "3") {
|
||||
this.model5 = true;
|
||||
} else if (command == "4") {
|
||||
this.model3 = true;
|
||||
} else if (command == "5") {
|
||||
this.model4 = true;
|
||||
}
|
||||
this.inputData['1' + (10 + (this.indexs - 1)) + "51"] = command;
|
||||
this.get53data(command)
|
||||
var data53 = {
|
||||
target: {
|
||||
value: this.inputData['1' + (10 + (this.indexs - 1)) + "51"],
|
||||
},
|
||||
}
|
||||
this.changeBtn('1' + (10 + (this.indexs - 1)) + "51", data53);
|
||||
|
||||
},
|
||||
get53data(index) {
|
||||
var data = index;
|
||||
var text53 = "";
|
||||
if (data == "1") {
|
||||
text53 = "预定时间点启动";
|
||||
} else if (data == "2") {
|
||||
text53 = "预定时间段启动";
|
||||
} else if (data == "3") {
|
||||
text53 = "依据土壤传感器";
|
||||
} else if (data == "4") {
|
||||
text53 = "依据光照传感器";
|
||||
} else if (data == "5") {
|
||||
text53 = "依据外控信号";
|
||||
}
|
||||
this.data53 = text53;
|
||||
},
|
||||
change00(index) {
|
||||
this.topActive = index
|
||||
// var list = ["0", "0", "0"];
|
||||
// if (index == 1) {
|
||||
// list[0] = "1";
|
||||
// } else {
|
||||
// list[0] = "0";
|
||||
// }
|
||||
// if (index == 2) {
|
||||
// list[1] = "1";
|
||||
// } else {
|
||||
// list[1] = "0";
|
||||
// }
|
||||
// if (index == 3) {
|
||||
// list[2] = "1";
|
||||
// } else {
|
||||
// list[2] = "0";
|
||||
// }
|
||||
this.inputData['1' + (10 + (this.indexs - 1)) + '00'] = index
|
||||
// var num = list.join("");
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: index,
|
||||
},
|
||||
};
|
||||
this.changeBtn('1' + (10 + (this.indexs - 1)) + "00", dataNum);
|
||||
},
|
||||
padString(str, length) {
|
||||
return str.padStart(length, '0');
|
||||
},
|
||||
getType00() {
|
||||
var number = this.padString(this.inputData['1' + (10 + (this.indexs - 1)) + "00"].toString(2), 3)
|
||||
|
||||
if (Number(number[0])) {
|
||||
this.topActive = 1
|
||||
} else if (Number(number[1])) {
|
||||
this.topActive = 2
|
||||
} else if (Number(number[2])) {
|
||||
this.topActive = 3
|
||||
} else {
|
||||
this.topActive = 0
|
||||
}
|
||||
console.log(this.topActive, 11);
|
||||
},
|
||||
change59() {
|
||||
// var list = ["0", "0", "0", "0"];
|
||||
// if (this.open1) {
|
||||
// list[3] = "1";
|
||||
// } else {
|
||||
// list[3] = "0";
|
||||
// }
|
||||
// if (this.open2) {
|
||||
// list[2] = "1";
|
||||
// } else {
|
||||
// list[2] = "0";
|
||||
// }
|
||||
// if (this.open3) {
|
||||
// list[1] = "1";
|
||||
// } else {
|
||||
// list[1] = "0";
|
||||
// }
|
||||
// if (this.open4) {
|
||||
// list[0] = "1";
|
||||
// } else {
|
||||
// list[0] = "0";
|
||||
// }
|
||||
var num = 0
|
||||
if (this.inputData['1' + (10 + (this.indexs - 1)) + '62'] == 1) {
|
||||
this.inputData['1' + (10 + (this.indexs - 1)) + '62'] = 0
|
||||
num = 0
|
||||
} else {
|
||||
this.inputData['1' + (10 + (this.indexs - 1)) + '62'] = 1
|
||||
num = 1
|
||||
}
|
||||
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: num,
|
||||
},
|
||||
};
|
||||
this.changeBtn('1' + (10 + (this.indexs - 1)) + "62", dataNum);
|
||||
},
|
||||
getType() {
|
||||
var number = this.padString(this.inputData['1' + (10 + (this.indexs - 1)) + "59"].toString(2), 4)
|
||||
console.log(number);
|
||||
if (Number(number[3])) {
|
||||
this.open1 = true;
|
||||
} else {
|
||||
this.open1 = false;
|
||||
}
|
||||
if (Number(number[2])) {
|
||||
this.open2 = true;
|
||||
} else {
|
||||
this.open2 = false;
|
||||
}
|
||||
|
||||
if (Number(number[1])) {
|
||||
this.open3 = true;
|
||||
} else {
|
||||
this.open3 = false;
|
||||
}
|
||||
|
||||
if (Number(number[0])) {
|
||||
this.open4 = true;
|
||||
} else {
|
||||
this.open4 = false;
|
||||
}
|
||||
},
|
||||
dataInit() {
|
||||
var indexs = this.indexs
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
};
|
||||
// this.api.readFi_irrigate()
|
||||
this.api.readFi_irrigate(`/readFi/irrigate${indexs}`, data).then((res) => {
|
||||
this.loading.close()
|
||||
if (res.data.code == 200) {
|
||||
this.inputData = res.data.data;
|
||||
// this.getType();
|
||||
// this.getType00();
|
||||
this.get53data(this.inputData['1' + (10 + (this.indexs - 1)) + "51"]);
|
||||
this.inputData['1' + (10 + (indexs - 1)) + '01'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '01'])
|
||||
this.inputData['1' + (10 + (indexs - 1)) + '06'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '06'])
|
||||
this.inputData['1' + (10 + (indexs - 1)) + '17'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '17'])
|
||||
this.inputData['1' + (10 + (indexs - 1)) + '39'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '39'])
|
||||
this.inputData['1' + (10 + (indexs - 1)) + '40'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '40'])
|
||||
this.inputData['1' + (10 + (indexs - 1)) + '43'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '43'])
|
||||
this.inputData['1' + (10 + (indexs - 1)) + '44'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '44'])
|
||||
this.inputData['1' + (10 + (indexs - 1)) + '37'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '37'])
|
||||
this.inputData['1' + (10 + (indexs - 1)) + '38'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '38'])
|
||||
|
||||
this.model4Sel = this.inputData['1' + (10 + (indexs - 1)) + '71']
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
var store = this.$store.state
|
||||
store.nowInput = e.target.value
|
||||
e.currentTarget.select();
|
||||
},
|
||||
//失去焦点
|
||||
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 (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//失去焦点
|
||||
blurChange(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
changeBtn(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
};
|
||||
this.delayTimerBtn(0, data);
|
||||
},
|
||||
//切换btn的限制 写入停止后j*100毫秒调取函数
|
||||
delayTimerBtn(i, data) {
|
||||
const that = this;
|
||||
//整体接口
|
||||
let j = this.$store.state.lateSendBtn;
|
||||
//避免开启多个计时器
|
||||
this.timer && clearInterval(this.timer);
|
||||
|
||||
this.timer = setInterval(() => {
|
||||
++i;
|
||||
if (i == j) {
|
||||
that.changeData(data);
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
}, 100);
|
||||
},
|
||||
changeModel4() {
|
||||
|
||||
},
|
||||
//间隔灌溉天数
|
||||
change(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
};
|
||||
this.delayTimer(0, data);
|
||||
},
|
||||
//限制 写入停止后j*100毫秒调取函数
|
||||
delayTimer(i, data) {
|
||||
// const that = this;
|
||||
// //整体接口
|
||||
// let j = this.$store.state.lateSend;
|
||||
// //避免开启多个计时器
|
||||
// this.timer && clearInterval(this.timer);
|
||||
|
||||
// this.timer = setInterval(() => {
|
||||
// ++i;
|
||||
// if (i == j) {
|
||||
// that.changeData(data);
|
||||
// clearInterval(this.timer);
|
||||
// }
|
||||
// }, 100);
|
||||
},
|
||||
changeData(data) {
|
||||
var store = this.$store.state
|
||||
this.api.postwriteFi_write(data).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
this.$message({
|
||||
message: res.data.msg,
|
||||
type: "success",
|
||||
});
|
||||
store.nowInput = ''
|
||||
// this.dataInit();
|
||||
} else {
|
||||
this.inputData[data.regAddress] = store.nowInput
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
this.timer = null
|
||||
});
|
||||
},
|
||||
handleClose1(done) {
|
||||
// this.$confirm('确认关闭?')
|
||||
// .then(_ => {
|
||||
// done();
|
||||
// })
|
||||
// .catch(_ => {});
|
||||
},
|
||||
handleClose2(done) {
|
||||
// this.$confirm('确认关闭?')
|
||||
// .then(_ => {
|
||||
// done();
|
||||
// })
|
||||
// .catch(_ => {});
|
||||
},
|
||||
handleClose3(done) {
|
||||
// this.$confirm('确认关闭?')
|
||||
// .then(_ => {
|
||||
// done();
|
||||
// })
|
||||
// .catch(_ => {});
|
||||
},
|
||||
handleClose4(done) {
|
||||
// this.$confirm('确认关闭?')
|
||||
// .then(_ => {
|
||||
// done();
|
||||
// })
|
||||
// .catch(_ => {});
|
||||
},
|
||||
handleClose5(done) { },
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss"></style>
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="home">
|
||||
<div class="park" @click="handlerOther">{{other_show ? '后退':'园区简介'}}</div>
|
||||
<div class="park" v-if="limitUserId == 2" @click="handlerOther">{{other_show ? '后退':'园区简介'}}</div>
|
||||
<div class="other" v-show="other_show"></div>
|
||||
<div class="kuang">
|
||||
<div class="title">温室智慧云数据统计</div>
|
||||
|
@ -241,6 +241,46 @@
|
|||
@click="handlerAxis_5"
|
||||
/>
|
||||
</div>
|
||||
<!-- 大冶鑫 -->
|
||||
<div class="drag_box7" ref="drag_box7" v-show="limitUserId == 7">
|
||||
<img class="drag_img" src="../../assets/img/map3.jpg" alt="" />
|
||||
<img
|
||||
class="axis_shimen"
|
||||
src="../../assets/img/axis1.png"
|
||||
alt=""
|
||||
@click="handlerAxis_5"
|
||||
/>
|
||||
<img
|
||||
class="axis_shimen1"
|
||||
src="../../assets/img/axis1.png"
|
||||
alt=""
|
||||
@click="handlerAxis_5"
|
||||
/>
|
||||
<img
|
||||
class="axis_shimen2"
|
||||
src="../../assets/img/axis1.png"
|
||||
alt=""
|
||||
@click="handlerAxis_5"
|
||||
/>
|
||||
<img
|
||||
class="axis_shimen3"
|
||||
src="../../assets/img/axis1.png"
|
||||
alt=""
|
||||
@click="handlerAxis_5"
|
||||
/>
|
||||
<img
|
||||
class="axis_shimen4"
|
||||
src="../../assets/img/axis1.png"
|
||||
alt=""
|
||||
@click="handlerAxis_5"
|
||||
/>
|
||||
<img
|
||||
class="axis_shimen5"
|
||||
src="../../assets/img/axis1.png"
|
||||
alt=""
|
||||
@click="handlerAxis_5"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -448,6 +488,32 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 大冶鑫 -->
|
||||
<div class="content_item" v-if="limitUserId == 7">
|
||||
<div v-for="(item, index) in fiveControlList" :key="index" style="margin-bottom: 0.15rem">
|
||||
<div class="i_title" v-if="item.controlState != 0">
|
||||
<img src="../../assets/img/i_title_img.png" alt="" />
|
||||
<span>{{ item.title }}</span>
|
||||
<span class="line"></span>
|
||||
<span>{{
|
||||
item.controlState == 1 ? "自动控制" : "手机控制"
|
||||
}}</span>
|
||||
<span class="line"></span>
|
||||
<i class="progress" v-if="Number(item.progress) == ''"
|
||||
>进度{{ item.progress }}%</i
|
||||
>
|
||||
<span>菜单</span>
|
||||
</div>
|
||||
<div class="i_title" v-else>
|
||||
<img src="../../assets/img/i_title_img.png" alt="" />
|
||||
<span>{{ item.title }}</span>
|
||||
<span class="line"></span>
|
||||
<span>无效</span>
|
||||
<span class="line"></span>
|
||||
<span>菜单</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1017,6 +1083,13 @@ export default {
|
|||
this.get_environmentData(2023042214250070);
|
||||
this.get_readControl_getState(2023042214250070);
|
||||
// this.getWeatherData(2023042214250070);
|
||||
}else if (limitUserId == 7) {
|
||||
// 大冶鑫
|
||||
this.get_weather_echart_data(2023120613270120);
|
||||
this.get_thisWeekTemperature_echart_data(2023120613270120);
|
||||
this.get_environmentData(2023120613270120);
|
||||
this.get_readControl_getState(2023120613270120);
|
||||
this.getWeatherData(2023120613270120);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1123,7 +1196,8 @@ export default {
|
|||
res.data.data.forEach((item, index) => {
|
||||
if (
|
||||
item.cameraSerialNumber != null &&
|
||||
item.deviceId == 2023042214250027
|
||||
(item.deviceId == 2023042214250027||
|
||||
item.deviceId == 2023120613270115)
|
||||
) {
|
||||
this.get_sel_eqbyid_list.push({ ...item, number: index });
|
||||
|
||||
|
@ -1272,7 +1346,8 @@ export default {
|
|||
// id == 2 东北;
|
||||
// id == 1 丽水;
|
||||
// id == 5 石门;
|
||||
this.limitUserId = (res.data.data.filter(el=>el.id == 2 || el.id == 1 || el.id == 5))[0].id;
|
||||
// id == 5 大冶鑫;
|
||||
this.limitUserId = (res.data.data.filter(el=>el.id == 2 || el.id == 1 || el.id == 5 ||el.id == 7))[0].id;
|
||||
if (this.limitUserId == 1) {
|
||||
this.drag_boxHandler();
|
||||
this.dataInit(userId, this.limitUserId);
|
||||
|
@ -1282,6 +1357,9 @@ export default {
|
|||
}else if (this.limitUserId == 5) {
|
||||
this.drag_boxHandler5();
|
||||
this.dataInit(userId, this.limitUserId);
|
||||
} else if (this.limitUserId == 7) {
|
||||
this.drag_boxHandler7();
|
||||
this.dataInit(userId, this.limitUserId);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1352,7 +1430,6 @@ export default {
|
|||
handlerAxis_5() {
|
||||
this.$router.push({ path: "/largeScreen1" });
|
||||
},
|
||||
|
||||
toBackPage() {
|
||||
this.$router.push({ path: "/realTime" });
|
||||
},
|
||||
|
@ -1368,6 +1445,8 @@ export default {
|
|||
this.get_readControl_getState(2023112911050004);
|
||||
}else if(this.limitUserId == 5){
|
||||
this.get_readControl_getState(2023042214250070);
|
||||
}else if(this.limitUserId == 7){
|
||||
this.get_readControl_getState(2023120613270120);
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -1507,7 +1586,63 @@ export default {
|
|||
}
|
||||
};
|
||||
},
|
||||
drag_boxHandler7() {
|
||||
let demo = this.$refs.drag_box7;
|
||||
demo = document.querySelector(".drag_box7"); //待拖拽元素
|
||||
let canMove = false; //拖拽状态
|
||||
let x = 0,
|
||||
y = 0; //鼠标位置
|
||||
//监听按下鼠标事件
|
||||
demo.onmousedown = function (e) {
|
||||
x = e.pageX - demo.offsetLeft;
|
||||
y = e.pageY - demo.offsetTop;
|
||||
canMove = true; //激活拖拽状态
|
||||
};
|
||||
//监听右击鼠标事件
|
||||
demo.oncontextmenu = function (e) {
|
||||
e.preventDefault(); //阻止默认行为
|
||||
};
|
||||
//监听鼠标抬起事件
|
||||
window.onmouseup = function () {
|
||||
canMove = false; //关闭拖拽状态
|
||||
};
|
||||
|
||||
window.onblur = function () {
|
||||
//窗口失去焦点事件
|
||||
canMove = false; //关闭拖拽状态
|
||||
};
|
||||
|
||||
//监听鼠标移动事件
|
||||
window.onmousemove = function (e) {
|
||||
e.preventDefault(); //阻止默认行为(字不能拖走)
|
||||
if (canMove) {
|
||||
//对范围判断
|
||||
let left = e.pageX - x;
|
||||
let top = e.pageY - y;
|
||||
|
||||
demo.style.left = left + "px";
|
||||
demo.style.top = top + "px";
|
||||
}
|
||||
};
|
||||
let scale = 1;
|
||||
demo.onwheel = function (e) {
|
||||
if (e.wheelDelta > 0) {
|
||||
scale += 0.05;
|
||||
if (scale > 4) {
|
||||
scale = 4;
|
||||
}
|
||||
demo.style.transform = `scale(${scale})`;
|
||||
// console.log(scale);
|
||||
} else {
|
||||
scale -= 0.05;
|
||||
if (scale < 1) {
|
||||
scale = 1;
|
||||
}
|
||||
demo.style.transform = `scale(${scale})`;
|
||||
// console.log(scale);
|
||||
}
|
||||
};
|
||||
},
|
||||
drag_boxHandler5() {
|
||||
let demo = this.$refs.drag_box5;
|
||||
demo = document.querySelector(".drag_box5"); //待拖拽元素
|
||||
|
@ -2145,7 +2280,90 @@ export default {
|
|||
z-index: 99;
|
||||
}
|
||||
}
|
||||
.drag_box7{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
position: absolute;
|
||||
// top: 0.3rem;
|
||||
// left: 0.5rem;
|
||||
z-index: 10;
|
||||
top:-64px;
|
||||
-webkit-mask-image: linear-gradient(
|
||||
90deg,
|
||||
transparent 0%,
|
||||
blue 5%,
|
||||
blue 93%,
|
||||
transparent 99%
|
||||
);
|
||||
|
||||
.drag_img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
-webkit-mask-image: linear-gradient(
|
||||
transparent 0%,
|
||||
blue 13%,
|
||||
blue 73%,
|
||||
transparent 97%
|
||||
);
|
||||
}
|
||||
|
||||
.axis_shimen{
|
||||
width: 0.4rem;
|
||||
height: auto;
|
||||
position: absolute;
|
||||
top: 38%;
|
||||
left: 28%;
|
||||
z-index: 99;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.axis_shimen1{
|
||||
width: 0.4rem;
|
||||
height: auto;
|
||||
position: absolute;
|
||||
top: 56%;
|
||||
left: 26%;
|
||||
z-index: 99;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.axis_shimen2{
|
||||
width: 0.4rem;
|
||||
height: auto;
|
||||
position: absolute;
|
||||
top: 38%;
|
||||
left: 66%;
|
||||
cursor: pointer;
|
||||
z-index: 99;
|
||||
}
|
||||
.axis_shimen3{
|
||||
width: 0.4rem;
|
||||
height: auto;
|
||||
position: absolute;
|
||||
top: 56%;
|
||||
left: 67%;
|
||||
z-index: 99;
|
||||
cursor: pointer;
|
||||
}
|
||||
.axis_shimen4{
|
||||
width: 0.4rem;
|
||||
height: auto;
|
||||
position: absolute;
|
||||
top: 22%;
|
||||
left: 53%;
|
||||
z-index: 99;
|
||||
cursor: pointer;
|
||||
}
|
||||
.axis_shimen5{
|
||||
width: 0.4rem;
|
||||
height: auto;
|
||||
position: absolute;
|
||||
top: 22%;
|
||||
left: 67%;
|
||||
z-index: 99;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.drag_box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
@ -2358,7 +2576,7 @@ export default {
|
|||
}
|
||||
|
||||
::v-deep .swiper-slide {
|
||||
width: 0.74rem !important;
|
||||
width: 0.84rem !important;
|
||||
}
|
||||
|
||||
.swiper-slide1 {
|
||||
|
|
|
@ -387,6 +387,90 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 大冶鑫 -->
|
||||
<div class="content" v-show="limitUserId == 7">
|
||||
<div class="map">
|
||||
<div class="map1">
|
||||
<div class="drag_box7" ref="drag_box7">
|
||||
<img class="drag_img" src="../../assets/img/map3.jpg" alt="" />
|
||||
<div class="popBox" v-for="(item, index) in popContentList" :key="index">
|
||||
<template>
|
||||
<div class="pole_item" :style="getTopOrLeft7(item.id)" @click="handlerPop(item.id)">
|
||||
<div class="p_title">
|
||||
<img src="../../assets/img/wenshi.png" alt="" />
|
||||
<span>{{ item.greenhouseName }}#温室</span>
|
||||
</div>
|
||||
<img
|
||||
class="pole1"
|
||||
src="../../assets/img/pole1.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 弹框 -->
|
||||
<template>
|
||||
<div
|
||||
class="pop_content1"
|
||||
v-show="popContentCurrent == item.id ? true : false"
|
||||
:style="getTopOrLeft77(item.id)"
|
||||
>
|
||||
<img
|
||||
class="close_img"
|
||||
src="../../assets/img/close.png"
|
||||
alt=""
|
||||
@click="cancelHandler"
|
||||
/>
|
||||
<div class="p_video">
|
||||
<img :src="item.greenhouseImage" alt="" />
|
||||
</div>
|
||||
<div class="text">{{ item.greenhouseName }}</div>
|
||||
<div class="line"></div>
|
||||
<div class="detail">
|
||||
<div class="d_item">
|
||||
<img src="../../assets/img/detail_img.png" alt="" />
|
||||
<span>品种:{{ item.greenhouseVariety }}</span>
|
||||
</div>
|
||||
<div class="d_item">
|
||||
<img src="../../assets/img/detail_img.png" alt="" />
|
||||
<span>数量:{{ item.greenhouseNums }}株</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grow">
|
||||
<img src="../../assets/img/grow_img.png" alt="" />
|
||||
<span>生长阶段:</span>
|
||||
<span>{{ item.growthStageName }}</span>
|
||||
</div>
|
||||
<div class="line" style="margin-top: 0.06rem"></div>
|
||||
<div class="icon_item scroll">
|
||||
<div
|
||||
class="icon_item_child"
|
||||
v-for="(item1, index1) in item.childList"
|
||||
:key="index1"
|
||||
>
|
||||
<img
|
||||
:src="
|
||||
require('../../assets/image/real-time-' +
|
||||
item1.formula +
|
||||
'.png')
|
||||
"
|
||||
alt=""
|
||||
/>
|
||||
<div>
|
||||
<span>{{ item1.environmentDataId }}</span>
|
||||
<span>{{
|
||||
item1.environmentData + getTypeList(item1.formula)
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -916,7 +1000,37 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
getTopOrLeft7(id){
|
||||
if(id == 1){
|
||||
return 'top:34%;left:62%'
|
||||
}else if(id == 2){
|
||||
return 'top:19%;left:64%'
|
||||
}else if(id == 3){
|
||||
return 'top:19%;left:50%'
|
||||
}else if(id == 4){
|
||||
return 'top:52%;left:22%'
|
||||
}else if(id == 5){
|
||||
return 'top:34%;left:25%'
|
||||
}else if(id == 6){
|
||||
return 'top:52%;left:64%'
|
||||
}
|
||||
},
|
||||
getTopOrLeft77(id){
|
||||
|
||||
if(id == 1){
|
||||
return 'top:34%;left:62%;transform: translate(54%,-50%);'
|
||||
}else if(id == 2){
|
||||
return 'top:19%;left:64%;transform: translate(54%,0%);'
|
||||
}else if(id == 3){
|
||||
return 'top:19%;left:50%;transform: translate(54%,0%);'
|
||||
}else if(id == 4){
|
||||
return 'top:52%;left:22%;transform: translate(54%,-50%);'
|
||||
}else if(id == 5){
|
||||
return 'top:34%;left:25%;transform: translate(54%,-50%);'
|
||||
}else if(id == 6){
|
||||
return 'top:52%;left:64%;transform: translate(54%,-50%);'
|
||||
}
|
||||
},
|
||||
getNamePosition(id) {
|
||||
if (id == 1) {
|
||||
return "position: absolute;top: 41%;left: 13%;";
|
||||
|
@ -959,6 +1073,11 @@ export default {
|
|||
if(that.popContentCurrent > 4){
|
||||
that.popContentCurrent = 1;
|
||||
}
|
||||
} else if(that.limitUserId == 7){
|
||||
that.popContentCurrent++;
|
||||
if(that.popContentCurrent > 6){
|
||||
that.popContentCurrent = 1;
|
||||
}
|
||||
}
|
||||
}, 3000);
|
||||
},
|
||||
|
@ -1017,6 +1136,11 @@ export default {
|
|||
if(that.popContentCurrent > 4){
|
||||
that.popContentCurrent = 1;
|
||||
}
|
||||
}else if(that.limitUserId == 7){
|
||||
that.popContentCurrent++;
|
||||
if(that.popContentCurrent > 6){
|
||||
that.popContentCurrent = 1;
|
||||
}
|
||||
}
|
||||
}, 3000);
|
||||
}
|
||||
|
@ -1026,13 +1150,15 @@ export default {
|
|||
get_user_getjurisdiction(userId) {
|
||||
this.api.user_getjurisdiction(userId).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
this.limitUserId = (res.data.data.filter(el=>el.id == 1 || el.id == 2 || el.id == 5))[0].id;
|
||||
this.limitUserId = (res.data.data.filter(el=>el.id == 1 || el.id == 2 || el.id == 5|| el.id == 7))[0].id;
|
||||
if (this.limitUserId == 1) {
|
||||
this.drag_boxHandler();
|
||||
} else if (this.limitUserId == 2) {
|
||||
this.drag_boxHandler1();
|
||||
} else if (this.limitUserId == 5) {
|
||||
this.drag_boxHandler5();
|
||||
} else if (this.limitUserId == 7) {
|
||||
this.drag_boxHandler7();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1065,7 +1191,7 @@ export default {
|
|||
cancelHandler1() {
|
||||
this.popContentCurrent1 = -1;
|
||||
},
|
||||
|
||||
|
||||
handlerPop(id) {
|
||||
// console.log(id);
|
||||
this.popContentCurrent = id;
|
||||
|
@ -1074,7 +1200,7 @@ export default {
|
|||
handlerPop1(id) {
|
||||
this.popContentCurrent1 = id;
|
||||
},
|
||||
|
||||
|
||||
toBack() {
|
||||
this.$router.push({ path: "/largeScreen" });
|
||||
},
|
||||
|
@ -1214,7 +1340,73 @@ export default {
|
|||
}
|
||||
};
|
||||
},
|
||||
drag_boxHandler7() {
|
||||
let demo = this.$refs.drag_box7;
|
||||
demo = document.querySelector(".drag_box7"); //待拖拽元素
|
||||
let canMove = false; //拖拽状态
|
||||
let x = 0,
|
||||
y = 0; //鼠标位置
|
||||
//监听按下鼠标事件
|
||||
demo.onmousedown = function (e) {
|
||||
x = e.pageX - demo.offsetLeft;
|
||||
y = e.pageY - demo.offsetTop;
|
||||
canMove = true; //激活拖拽状态
|
||||
};
|
||||
//监听右击鼠标事件
|
||||
demo.oncontextmenu = function (e) {
|
||||
e.preventDefault(); //阻止默认行为
|
||||
};
|
||||
//监听鼠标抬起事件
|
||||
window.onmouseup = function () {
|
||||
canMove = false; //关闭拖拽状态
|
||||
};
|
||||
|
||||
window.onblur = function () {
|
||||
//窗口失去焦点事件
|
||||
canMove = false; //关闭拖拽状态
|
||||
};
|
||||
|
||||
//监听鼠标移动事件
|
||||
window.onmousemove = function (e) {
|
||||
e.preventDefault(); //阻止默认行为(字不能拖走)
|
||||
if (canMove) {
|
||||
//对范围判断
|
||||
let left = e.pageX - x;
|
||||
let top = e.pageY - y;
|
||||
|
||||
//if (left > 0) left = 0 //当距离左边小于0时 让它为0
|
||||
//if (top > 0) top = 0 //当距离上边小于0时 让它为0
|
||||
// //右边距离为 标签距离左边最大距离(页面宽度减去div宽度得到)
|
||||
// let maxLeft = window.innerWidth - demo.offsetWidth
|
||||
// //下边距离为 标签距离上边最大距离(页面高度减去div高度度得到)
|
||||
// let maxTop = window.innerHeight - demo.offsetHeight
|
||||
|
||||
// if (left > maxLeft) left = maxLeft
|
||||
// if (top > maxTop) top = maxTop
|
||||
|
||||
demo.style.left = left + "px";
|
||||
demo.style.top = top + "px";
|
||||
}
|
||||
};
|
||||
let scale = 1;
|
||||
demo.onwheel = function (e) {
|
||||
if (e.wheelDelta > 0) {
|
||||
scale += 0.05;
|
||||
if (scale > 4) {
|
||||
scale = 4;
|
||||
}
|
||||
demo.style.transform = `scale(${scale})`;
|
||||
// console.log(scale);
|
||||
} else {
|
||||
scale -= 0.05;
|
||||
if (scale < 1) {
|
||||
scale = 1;
|
||||
}
|
||||
demo.style.transform = `scale(${scale})`;
|
||||
// console.log(scale);
|
||||
}
|
||||
};
|
||||
},
|
||||
drag_boxHandler5() {
|
||||
let demo = this.$refs.drag_box5;
|
||||
demo = document.querySelector(".drag_box5"); //待拖拽元素
|
||||
|
@ -1950,7 +2142,234 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
.drag_box7{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
position: absolute;
|
||||
top:-95px;
|
||||
-webkit-mask-image: linear-gradient(
|
||||
90deg,
|
||||
transparent 0%,
|
||||
blue 5%,
|
||||
blue 93%,
|
||||
transparent 99%
|
||||
);
|
||||
|
||||
.drag_img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
-webkit-mask-image: linear-gradient(
|
||||
transparent 0%,
|
||||
blue 13%,
|
||||
blue 73%,
|
||||
transparent 97%
|
||||
);
|
||||
}
|
||||
|
||||
.pole_item{
|
||||
// width: 0.5rem;
|
||||
height: 0.34rem;
|
||||
position: absolute;
|
||||
top: 21%;
|
||||
left: 5%;
|
||||
cursor: pointer;
|
||||
.p_title {
|
||||
// width: 0.5rem;
|
||||
// height: 0.22rem;
|
||||
background: rgba(1, 12, 28, 0.7);
|
||||
border-radius:40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 0.04rem;
|
||||
// position: absolute;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
|
||||
> img {
|
||||
width: 0.2rem;
|
||||
height: 0.2rem;
|
||||
margin-right: 0.05rem;
|
||||
}
|
||||
|
||||
> span {
|
||||
font-size: 0.2rem;
|
||||
font-family: MicrosoftYaHei;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.pole1 {
|
||||
width: 0.5rem;
|
||||
height:auto;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: .2rem;
|
||||
transform: translateX(-50%)
|
||||
}
|
||||
}
|
||||
|
||||
.pop_content1 {
|
||||
width: 3.5rem;
|
||||
height: 4.55rem;
|
||||
background: url("../../assets/img/pop_bg.png") center no-repeat;
|
||||
background-size: 100% 100%;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
// top: 17%;
|
||||
// left: 23%;
|
||||
z-index: 999999;
|
||||
|
||||
.close_img {
|
||||
width: 0.2rem;
|
||||
height: 0.2rem;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.p_video {
|
||||
width: 90%;
|
||||
height: 1.82rem;
|
||||
margin: 0.1rem auto 0;
|
||||
|
||||
> img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
width: 100%;
|
||||
height: 0.4rem;
|
||||
font-size: 0.2rem;
|
||||
font-family: AlimamaShuHeiTi-Bold;
|
||||
font-weight: bold;
|
||||
color: #f3fdff;
|
||||
line-height: 0.4rem;
|
||||
box-sizing: border-box;
|
||||
padding-left: 0.2rem;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 90%;
|
||||
height: 0.01rem;
|
||||
background: #51d4fa;
|
||||
opacity: 0.5;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.detail {
|
||||
width: 100%;
|
||||
height: 0.45rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
padding: 0 0.15rem;
|
||||
|
||||
.d_item {
|
||||
height: 0.3rem;
|
||||
background: rgba(81, 212, 250, 0.15);
|
||||
border: 0.01rem solid rgba(106, 222, 255, 0.4);
|
||||
border-radius: 0.02rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
// align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 0.05rem 0.05rem;
|
||||
|
||||
> img {
|
||||
width: 0.2rem;
|
||||
height: 0.2rem;
|
||||
margin-right: 0.05rem;
|
||||
}
|
||||
|
||||
> span {
|
||||
font-size: 0.13rem;
|
||||
font-family: MicrosoftYaHei;
|
||||
font-weight: 400;
|
||||
color: #d9effd;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.grow {
|
||||
width: 2.5rem;
|
||||
height: 0.3rem;
|
||||
background: url("../../assets/img/grow_bg.png") center no-repeat;
|
||||
background-size: 100% 100%;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
> img {
|
||||
width: 0.18rem;
|
||||
height: 0.18rem;
|
||||
margin-right: 0.05rem;
|
||||
}
|
||||
|
||||
> span:nth-child(2) {
|
||||
font-size: 0.13rem;
|
||||
font-family: MicrosoftYaHei;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
> span:nth-child(3) {
|
||||
font-size: 0.13rem;
|
||||
font-family: MicrosoftYaHei;
|
||||
font-weight: 400;
|
||||
color: #36ffd2;
|
||||
}
|
||||
}
|
||||
|
||||
.icon_item {
|
||||
width: 100%;
|
||||
height: calc(100% - 3.22rem);
|
||||
box-sizing: border-box;
|
||||
padding: 0.1rem 0.15rem;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
overflow: auto;
|
||||
|
||||
.icon_item_child {
|
||||
width: 33.33%;
|
||||
height: 33.33%;
|
||||
display: flex;
|
||||
margin-bottom: 0.05rem;
|
||||
|
||||
> img {
|
||||
width: 0.4rem;
|
||||
height: 0.4rem;
|
||||
margin-right: 0.05rem;
|
||||
}
|
||||
|
||||
> div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
> span:nth-child(1) {
|
||||
font-size: 0.12rem;
|
||||
font-family: MicrosoftYaHei;
|
||||
font-weight: bold;
|
||||
color: #86d9ff;
|
||||
}
|
||||
|
||||
> span:nth-child(2) {
|
||||
font-size: 0.15rem;
|
||||
font-family: AlibabaPuHuiTiB;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.drag_box5{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<!-- 控制器/施肥机 -->
|
||||
<div class="page-content new-data" v-else :class="deviceName == 10 || deviceName == 30 ? 'control-page' : ''">
|
||||
<div class="page-content new-data" v-else :class="deviceName !=1 ? 'control-page' : ''">
|
||||
|
||||
<div class="control-view" v-if="deviceName == 10 || deviceName == 30">
|
||||
<div class="control-view" v-if="deviceName !=1">
|
||||
<div class="title" @click='weatherModel = true'>气象站:</div>
|
||||
<vue-seamless class="control-list" :data="controlList" :class-option="defaultOption1">
|
||||
<div class="list-view" v-for="item, index in controlList " :key="index">
|
||||
|
@ -1170,7 +1170,7 @@ export default {
|
|||
} else if (this.deviceName == 30) {
|
||||
this.api.getControlRtDatastation(formData).then(res => {
|
||||
this.controlList = []
|
||||
this.list = []
|
||||
this.list = []
|
||||
this.updateTime=res.data.data[0].updateTime
|
||||
if (res.data.code == 200) {
|
||||
res.data.data.forEach((el, index) => {
|
||||
|
@ -1211,6 +1211,96 @@ export default {
|
|||
}
|
||||
})
|
||||
|
||||
}else if(this.deviceName==20){
|
||||
this.api.getFi_rtdata(formData).then(res=>{
|
||||
if (res.data.code == 200) {
|
||||
this.inputData = res.data.data;
|
||||
this.list = []
|
||||
|
||||
this.updateTime=res.data.data[0].updateTime
|
||||
|
||||
this.inputData.forEach((el, index) => {
|
||||
list.forEach((el1, index1) => {
|
||||
if (el.formula == el1.value) {
|
||||
var num = 0
|
||||
var name = ''
|
||||
if (el.equipmentStart == 0) {
|
||||
num = '故障'
|
||||
} else {
|
||||
num = el.environmentData + el1.unit
|
||||
}
|
||||
|
||||
if (el.targetValue == 1) {
|
||||
if (el.equipmentNumber == 0) {
|
||||
name = '目标' + el.environmentDataId
|
||||
} else {
|
||||
name = '目标' + el.equipmentNumber + '#' + el.environmentDataId
|
||||
}
|
||||
} else {
|
||||
if (el.equipmentNumber == 0) {
|
||||
name = '1#平均' + el.environmentDataId
|
||||
} else if (el.equipmentNumber == 15) {
|
||||
name = '2#平均' + el.environmentDataId
|
||||
} else {
|
||||
name = el.equipmentNumber + '#' + el.environmentDataId
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.list.push({
|
||||
...el,
|
||||
name: name,
|
||||
num: num,
|
||||
img: require(`../../assets/image/real-time-${el.formula}.png`)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
// this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
this.api.getControlRtDatastation(formData).then(res => {
|
||||
this.controlList = []
|
||||
if (res.data.code == 200) {
|
||||
res.data.data.forEach((el, index) => {
|
||||
list.forEach((el1, index1) => {
|
||||
if (el.formula == el1.value) {
|
||||
// console.log(el1);
|
||||
var num = 0
|
||||
if (el.equipmentStart == 0) {
|
||||
num = '故障'
|
||||
} else {
|
||||
num = el.environmentData + el1.unit
|
||||
}
|
||||
this.controlList.push({
|
||||
...el,
|
||||
num: num,
|
||||
img: require(`../../assets/image/real-time-${el.formula}.png`)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
// console.log(this.controlList);
|
||||
})
|
||||
var nowDevice = store.equipmentList[this.indexs - 1]
|
||||
// var data2 = {
|
||||
// cameraid: nowDevice.cameraSerialNumber,
|
||||
// channelid: nowDevice.cameraChannelNumber
|
||||
// }
|
||||
this.imgUrl = nowDevice.hls
|
||||
|
||||
this.api.chart_fidata(equipmentId).then(res=>{
|
||||
if (res.data.code == 200) {
|
||||
var chartsData = res.data.data
|
||||
realTimeLine('realTime-line', chartsData, data1)
|
||||
} else {
|
||||
// this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
<div class="irrigateSet sensorSet sensorSet-con">
|
||||
<div class="table-title">
|
||||
<img src="../../assets/image/sensor.png" alt=""> 传感器配置界面
|
||||
|
||||
<div class="tips" @click="model = true">传感器说明</div>
|
||||
</div>
|
||||
<div class="sensor-view">
|
||||
<div class="left scroll">
|
||||
|
@ -116,6 +118,119 @@
|
|||
</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">0</div>
|
||||
<div class="tips-model-text">1000</div>
|
||||
<div class="tips-model-text">100</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
|
||||
</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="">
|
||||
|
||||
</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>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -135,6 +250,8 @@ export default {
|
|||
openTypeList: [],//八个通道输入信号的类型
|
||||
typeList: this.$store.state.typeList,
|
||||
loading:null,
|
||||
|
||||
model: false,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
|
@ -0,0 +1,573 @@
|
|||
<template>
|
||||
<div class="irrigateSet sensorSet">
|
||||
<div class="table-title">
|
||||
<img src="../../assets/image/sensor.png" alt=""> 传感器配置界面
|
||||
<div class="tips" @click="model = true">传感器说明</div>
|
||||
</div>
|
||||
<div class="sensor-view">
|
||||
<div class="left scroll">
|
||||
<div @click="toIndex(index)" :class="active == index ? 'active' : ''" v-for="item, index in 96"
|
||||
:key="index">
|
||||
<div>
|
||||
{{ index + 1 }}#传感器通道
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="right-top">
|
||||
<div class="right-sel">
|
||||
<div @click="changeOpen()">
|
||||
<div v-if="openList.indexOf(active) == -1" class="no-sel"></div>
|
||||
<div v-else class="sel"></div>
|
||||
有效性
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-sel">
|
||||
<div class="title">传感器类型</div>
|
||||
<el-dropdown @command="handleCommand">
|
||||
<div class="el-dropdown-link">
|
||||
<input v-model="sensorType" type="text" class="input-input" placeholder="选择传感器类型">
|
||||
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="item, index in typeList" :key="index" :command="item.value">{{
|
||||
item.label }}</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<!-- <div class="right-sel">
|
||||
<div @click="sel2 = !sel2">
|
||||
<div v-if="!sel2" class="no-sel"></div>
|
||||
<div v-else class="sel"></div>
|
||||
通讯类传感器
|
||||
</div>
|
||||
<div @click="sel3 = !sel3">
|
||||
<div v-if="!sel3" class="no-sel"></div>
|
||||
<div v-else class="sel"></div>
|
||||
模拟量传感器
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="right-bottom">
|
||||
<div>
|
||||
<div class="input-main">
|
||||
<div>标定低点AD值</div>
|
||||
<input @blur="blurChange(numberList[active] + 1, $event)"
|
||||
v-model="inputDataNew[numberList[active] + 1]"
|
||||
@input="change(numberList[active] + 1, $event)" type="number" placeholder="0.0">
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<div>标定低点数据</div>
|
||||
<input @blur="blurChange1(numberList[active] + 2, $event)"
|
||||
v-model="inputDataNew[numberList[active] + 2]"
|
||||
@input="change1(numberList[active] + 2, $event)" type="number" placeholder="0.0">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-main">
|
||||
<div>标定高点AD值</div>
|
||||
<input @blur="blurChange(numberList[active] + 3, $event)"
|
||||
v-model="inputDataNew[numberList[active] + 3]"
|
||||
@input="change(numberList[active] + 3, $event)" type="number" placeholder="0.0">
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<div>标定高点数据</div>
|
||||
<input @blur="blurChange1(numberList[active] + 4, $event)"
|
||||
v-model="inputDataNew[numberList[active] + 4]"
|
||||
@input="change1(numberList[active] + 4, $event)" type="number" placeholder="0.0">
|
||||
</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="">
|
||||
|
||||
</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>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
sel1: true,
|
||||
sel2: false,
|
||||
sel3: false,
|
||||
numberList: [],
|
||||
inputData: [],
|
||||
inputDataNew: [],
|
||||
sensorType: '',//当前传感器类型
|
||||
openList: [],//当前有效的传感器
|
||||
typeList: this.$store.state.typeList,
|
||||
loading: null,
|
||||
list1: '',
|
||||
list2: '',
|
||||
list3: '',
|
||||
list4: '',
|
||||
list5: '',
|
||||
list6: '',
|
||||
model: false,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'active'(newVal, oldVal) {
|
||||
console.log(newVal,'active');
|
||||
|
||||
this.getSensorType()
|
||||
// this.getCountData()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
for (let i = 0; i < 96; i++) {
|
||||
this.numberList.push(10206 + (i * 5))
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.dataInit()
|
||||
//input获取焦点后全选
|
||||
let inputList = document.querySelectorAll('input');
|
||||
for (let index = 0; index < inputList.length; index++) {
|
||||
inputList[index].onfocus = this.selectValue;//input放入焦点,全选文本
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//countType计算类型
|
||||
//0是原数据
|
||||
//1是原数据-400
|
||||
//2是原数据/10
|
||||
//3是(原数据-400) / 10
|
||||
countType1(data) {
|
||||
var num = data - 400
|
||||
return num
|
||||
},
|
||||
countType2(data) {
|
||||
var num = data / 10
|
||||
return num
|
||||
},
|
||||
countType3(data) {
|
||||
|
||||
var num = (data - 400) / 10
|
||||
return num
|
||||
},
|
||||
countType4(data) {
|
||||
|
||||
var num = (data - 1000) / 10
|
||||
return num
|
||||
},
|
||||
//反向计算提交
|
||||
sendCountType1(data) {
|
||||
var num = data + 400
|
||||
return num
|
||||
},
|
||||
sendCountType2(data) {
|
||||
var num = data * 10
|
||||
return num
|
||||
},
|
||||
sendCountType3(data) {
|
||||
|
||||
var num = (data * 10) + 400
|
||||
return num
|
||||
},
|
||||
sendCountType4(data) {
|
||||
|
||||
var num = (data * 10) + 1000
|
||||
return num
|
||||
},
|
||||
//类型选择
|
||||
handleCommand(command) {
|
||||
this.typeList.forEach((el, index) => {
|
||||
if (el.value == command) {
|
||||
this.sensorType = el.label
|
||||
}
|
||||
})
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: command,
|
||||
},
|
||||
};
|
||||
this.changeBtn(this.numberList[this.active], dataNum);
|
||||
},
|
||||
//根据类型反向计算赋值给inputData
|
||||
getSaveCountData() {
|
||||
for (var i = 0; i < 96; i++) {
|
||||
this.typeList.forEach((el, index) => {
|
||||
if (el.value == this.inputData[this.numberList[i]]) {
|
||||
if (el.countType == 0) {
|
||||
this.inputData[this.numberList[i] + 2] = this.inputDataNew[this.numberList[i] + 2]
|
||||
this.inputData[this.numberList[i] + 4] = this.inputDataNew[this.numberList[i] + 4]
|
||||
} else if (el.countType == 1) {
|
||||
this.inputData[this.numberList[i] + 2] = this.sendCountType1(this.inputDataNew[this.numberList[i] + 2])
|
||||
this.inputData[this.numberList[i] + 4] = this.sendCountType1(this.inputDataNew[this.numberList[i] + 4])
|
||||
} else if (el.countType == 2) {
|
||||
this.inputData[this.numberList[i] + 2] = this.sendCountType2(this.inputDataNew[this.numberList[i] + 2])
|
||||
this.inputData[this.numberList[i] + 4] = this.sendCountType2(this.inputDataNew[this.numberList[i] + 4])
|
||||
} else if (el.countType == 3) {
|
||||
this.inputData[this.numberList[i] + 2] = this.sendCountType3(this.inputDataNew[this.numberList[i] + 2])
|
||||
this.inputData[this.numberList[i] + 4] = this.sendCountType3(this.inputDataNew[this.numberList[i] + 4])
|
||||
} else if (el.countType == 4) {
|
||||
this.inputData[this.numberList[i] + 2] = this.sendCountType4(this.inputDataNew[this.numberList[i] + 2])
|
||||
this.inputData[this.numberList[i] + 4] = this.sendCountType4(this.inputDataNew[this.numberList[i] + 4])
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
//根据类型修改数据
|
||||
getCountData() {
|
||||
for (var i = 0; i < 96; i++) {
|
||||
this.typeList.forEach((el, index) => {
|
||||
if (el.value == this.inputData[this.numberList[i]]) {
|
||||
if (el.countType == 0) {
|
||||
this.inputDataNew[this.numberList[i] + 2] = this.inputData[this.numberList[i] + 2]
|
||||
this.inputDataNew[this.numberList[i] + 4] = this.inputData[this.numberList[i] + 4]
|
||||
} else if (el.countType == 1) {
|
||||
this.inputDataNew[this.numberList[i] + 2] = this.countType1(this.inputData[this.numberList[i] + 2])
|
||||
this.inputDataNew[this.numberList[i] + 4] = this.countType1(this.inputData[this.numberList[i] + 4])
|
||||
} else if (el.countType == 2) {
|
||||
this.inputDataNew[this.numberList[i] + 2] = this.countType2(this.inputData[this.numberList[i] + 2])
|
||||
this.inputDataNew[this.numberList[i] + 4] = this.countType2(this.inputData[this.numberList[i] + 4])
|
||||
} else if (el.countType == 3) {
|
||||
this.inputDataNew[this.numberList[i] + 2] = this.countType3(this.inputData[this.numberList[i] + 2])
|
||||
this.inputDataNew[this.numberList[i] + 4] = this.countType3(this.inputData[this.numberList[i] + 4])
|
||||
} else if (el.countType == 4) {
|
||||
this.inputDataNew[this.numberList[i] + 2] = this.countType4(this.inputData[this.numberList[i] + 2])
|
||||
this.inputDataNew[this.numberList[i] + 4] = this.countType4(this.inputData[this.numberList[i] + 4])
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
getSensorType() {
|
||||
|
||||
var text='无意义的传感器'
|
||||
this.typeList.forEach((el, index) => {
|
||||
if (el.value == this.inputData[this.numberList[this.active]]) {
|
||||
console.log(el.label,this.numberList[this.active],this.inputData[this.numberList[this.active]],111);
|
||||
text = el.label
|
||||
}
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.sensorType = text
|
||||
}, 10);
|
||||
},
|
||||
toIndex(index) {
|
||||
this.active = index
|
||||
},
|
||||
padString(str, length) {
|
||||
return str.padStart(length, '0');
|
||||
},
|
||||
changeOpen() {
|
||||
var inputData = this.inputData
|
||||
var num = 10200
|
||||
var listIndex = 16
|
||||
var listnum = Math.floor(this.active / listIndex) + 1
|
||||
|
||||
console.log(this['list' + listnum], 123, 'list' + listnum);
|
||||
|
||||
var listData = this['list' + listnum].split('')
|
||||
|
||||
if (Number(listData[listIndex - 1 - (this.active % listIndex)])) {
|
||||
listData[listData.length - 1 - (this.active % listIndex)] = '0'
|
||||
this['list' + listnum] = listData.join('')
|
||||
this.openList.splice(this.openList.indexOf(this.active), 1)
|
||||
} else {
|
||||
listData[listData.length - 1 - (this.active % listIndex)] = '1'
|
||||
this['list' + listnum] = listData.join('')
|
||||
this.openList.push(this.active)
|
||||
}
|
||||
|
||||
this.$forceUpdate()
|
||||
var listNew = listData.join("");
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: parseInt(listNew, 2),
|
||||
},
|
||||
};
|
||||
// console.log(num + listnum, dataNum);
|
||||
|
||||
this.changeBtn(10200 + listnum - 1, dataNum);
|
||||
},
|
||||
getData272() {
|
||||
var inputData = this.inputData
|
||||
// 96个传感器
|
||||
this.openList = []
|
||||
this.list1 = this.padString(inputData['10200'].toString(2), 16)
|
||||
this.list2 = this.padString(inputData['10201'].toString(2), 16)
|
||||
this.list3 = this.padString(inputData['10202'].toString(2), 16)
|
||||
this.list4 = this.padString(inputData['10203'].toString(2), 16)
|
||||
this.list5 = this.padString(inputData['10204'].toString(2), 16)
|
||||
this.list6 = this.padString(inputData['10205'].toString(2), 16)
|
||||
var number = 16
|
||||
for (var i = 0; i < number; i++) {
|
||||
if (Number(this.list1[this.list1.length - 1 - i])) {
|
||||
this.openList.push(i)
|
||||
}
|
||||
}
|
||||
for (var j = 0; j < number; j++) {
|
||||
if (Number(this.list2[this.list2.length - 1 - j])) {
|
||||
this.openList.push(j + 16)
|
||||
}
|
||||
}
|
||||
for (var k = 0; k < number; k++) {
|
||||
if (Number(this.list3[this.list3.length - 1 - k])) {
|
||||
this.openList.push(k + 32)
|
||||
}
|
||||
}
|
||||
for (var l = 0; l < number; l++) {
|
||||
if (Number(this.list4[this.list4.length - 1 - l])) {
|
||||
this.openList.push(l + 48)
|
||||
}
|
||||
}
|
||||
for (var m = 0; m < number; m++) {
|
||||
if (Number(this.list5[this.list5.length - 1 - m])) {
|
||||
this.openList.push(m + 64)
|
||||
}
|
||||
}
|
||||
for (var n = 0; n < number; n++) {
|
||||
if (Number(this.list6[this.list6.length - 1 - n])) {
|
||||
this.openList.push(n + 80)
|
||||
}
|
||||
}
|
||||
},
|
||||
dataInit() {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
};
|
||||
this.api.readFi_sensorchannelfi(data).then((res) => {
|
||||
this.loading.close()
|
||||
if (res.data.code == 200) {
|
||||
this.inputData = JSON.parse(JSON.stringify(res.data.data));
|
||||
this.inputDataNew = res.data.data;
|
||||
this.getData272()
|
||||
this.getSensorType()
|
||||
this.getCountData()
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
var store = this.$store.state
|
||||
store.nowInput = e.target.value
|
||||
e.currentTarget.select();
|
||||
},
|
||||
getSendData(number) {
|
||||
var number1 = number
|
||||
this.typeList.some((el, index) => {
|
||||
if (el.value == this.inputData[this.numberList[this.active]]) {
|
||||
if (el.countType == 0) {
|
||||
number1 = number
|
||||
} else if (el.countType == 1) {
|
||||
number1 = this.sendCountType1(number)
|
||||
} else if (el.countType == 2) {
|
||||
number1 = this.sendCountType2(number)
|
||||
} else if (el.countType == 3) {
|
||||
number1 = this.sendCountType3(number)
|
||||
} else if (el.countType == 4) {
|
||||
number1 = this.sendCountType4(number)
|
||||
}
|
||||
}
|
||||
})
|
||||
return number1
|
||||
},
|
||||
//需要反向计算提交
|
||||
change1(code, el) {
|
||||
// var store = this.$store.state
|
||||
// var data = {
|
||||
// equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
// regAddress: code,
|
||||
// num: this.getSendData(el.target.value),
|
||||
// };
|
||||
// this.delayTimer(0, data);
|
||||
},
|
||||
//需要反向计算提交
|
||||
blurChange1(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: this.getSendData(el.target.value),
|
||||
}; //避免开启多个计时器
|
||||
if (data.num != this.inputData[code]) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
//失去焦点
|
||||
blurChange(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (data.num != this.inputData[code]) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
this.changeData(data);
|
||||
}
|
||||
// if(this.timer){
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
changeBtn(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
};
|
||||
this.delayTimerBtn(0, data);
|
||||
},
|
||||
//切换btn的限制 写入停止后j*100毫秒调取函数
|
||||
delayTimerBtn(i, data) {
|
||||
const that = this;
|
||||
//整体接口
|
||||
let j = this.$store.state.lateSendBtn;
|
||||
//避免开启多个计时器
|
||||
this.timer && clearInterval(this.timer);
|
||||
|
||||
this.timer = setInterval(() => {
|
||||
++i;
|
||||
if (i == j) {
|
||||
that.changeData(data);
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
}, 100);
|
||||
},
|
||||
change(code, el) {
|
||||
// var store = this.$store.state
|
||||
// var data = {
|
||||
// equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
// regAddress: code,
|
||||
// num: el.target.value,
|
||||
// };
|
||||
// this.delayTimer(0, data);
|
||||
},
|
||||
//限制 写入停止后j*100毫秒调取函数
|
||||
delayTimer(i, data) {
|
||||
const that = this;
|
||||
//整体接口
|
||||
let j = this.$store.state.lateSend;
|
||||
//避免开启多个计时器
|
||||
this.timer && clearInterval(this.timer);
|
||||
|
||||
this.timer = setInterval(() => {
|
||||
++i;
|
||||
if (i == j) {
|
||||
that.changeData(data);
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
}, 100);
|
||||
},
|
||||
changeData(data) {
|
||||
var store = this.$store.state
|
||||
this.api.postwriteFi_write(data).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
this.$message({
|
||||
message: res.data.msg,
|
||||
type: "success",
|
||||
});
|
||||
store.nowInput = ''
|
||||
this.getSaveCountData()
|
||||
// this.dataInit();
|
||||
for (var i = 0; i < 96; i++) {
|
||||
if (this.numberList[i] == data.regAddress) {
|
||||
this.inputData[this.numberList[i]] = data.num
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.getCountData()
|
||||
} else {
|
||||
this.inputData[data.regAddress] = store.nowInput
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
this.timer = null
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss"></style>
|
|
@ -252,20 +252,22 @@ return num
|
|||
var inputData = this.inputData
|
||||
var list1 = this.padString(inputData['272'].toString(2), 6)
|
||||
var listData = list1.split('')
|
||||
|
||||
if (Number(listData[listData.length - 1 - this.active])) {
|
||||
|
||||
if (Number(listData[listData.length - 1 - this.active])==1) {
|
||||
listData[listData.length - 1 - this.active] = '0'
|
||||
this.openList.splice(this.openList.indexOf(this.active), 1)
|
||||
} else {
|
||||
listData[listData.length - 1 - this.active] = '1'
|
||||
this.openList.push(this.active)
|
||||
}
|
||||
|
||||
var listNew = listData.join("");
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: parseInt(listNew, 2),
|
||||
},
|
||||
};
|
||||
this.inputData['272']=parseInt(listNew, 2)
|
||||
this.changeBtn('272', dataNum);
|
||||
},
|
||||
getData272() {
|
||||
|
@ -275,7 +277,6 @@ return num
|
|||
this.openList = []
|
||||
|
||||
for (var i = 0; i < number; i++) {
|
||||
console.log(Number(list1[list1.length - 1 - i]));
|
||||
if (Number(list1[list1.length - 1 - i])) {
|
||||
this.openList.push(i)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,259 @@
|
|||
<template>
|
||||
<div class="irrigateSet sensorSet">
|
||||
<div class="table-title">
|
||||
<img src="../../assets/img/intrinsicParameter.png" alt=""> {{
|
||||
$store.state.equipmentList[$store.state.equipmentIndex - 1].deviceTypeName }}状态显示
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="input-main-80">
|
||||
<template v-for="item, index in dataInfo2_list">
|
||||
<span>{{ item.title }}</span>
|
||||
<input v-model="item.timer" type="text" value="60" disabled placeholder="60" />
|
||||
<span>{{ item.unit }}</span>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="open-btn" :class="inputData['3012'] ? 'active' : ''">
|
||||
<img v-if="inputData['3012']" src="../../assets/image/irrigateSet-icon2-act.png" alt="" />
|
||||
<img v-else src="../../assets/image/irrigateSet-icon2.png" alt="" />
|
||||
进水泵
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="open-btn w-250" :class="right2Index.indexOf(index) != -1 ? 'active' : ''"
|
||||
v-for="(item, index) in rightList2" >{{ item }}
|
||||
</div>
|
||||
<!-- <div class="open-btn w-250" :class="right2Index.indexOf(index) != -1 ? 'active' : ''"
|
||||
v-for="(item, index) in rightList2.slice(4, 8)">{{ item }}
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="input-main-80">
|
||||
<span>电磁阀控制通道</span>
|
||||
<template v-for="(item, index) in 16 * 6">
|
||||
<input v-if="centerBottom.indexOf(index) != -1" disabled :value="`${index + 1}#`"
|
||||
type="text" placeholder="0" />
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 10px 10px 0;">
|
||||
土壤温湿度传感器数据
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div>
|
||||
<template v-for="item,index in 40">
|
||||
<div class="input-main-80" v-if="index<(inputData[3102]?inputData[3102]:0)" :key="index">
|
||||
<span>{{ index + 1 }}#土壤温度传感器</span>
|
||||
<input disabled :value="inputData[3103+index]?(inputData[3103+index]-400)/10:0"
|
||||
type="text" placeholder="0" />
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div>
|
||||
<template v-for="item,index in 40">
|
||||
<div class="input-main-80" v-if="index<(inputData[3102]?inputData[3102]:0)" :key="index">
|
||||
<span>{{ index + 1 }}#土壤湿度传感器</span>
|
||||
<input disabled :value="inputData[3062+index]?inputData[3062+index]/10:0"
|
||||
type="text" placeholder="0" />
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
inputData: [],
|
||||
loading: null,
|
||||
dataInfo2_list: [{
|
||||
title: '灌溉剩余时长',
|
||||
timer: '0',
|
||||
unit: 'min'
|
||||
},
|
||||
{
|
||||
title: '本次灌溉量',
|
||||
timer: '0',
|
||||
unit: 'L'
|
||||
},
|
||||
{
|
||||
title: '启动方式',
|
||||
timer: '无',
|
||||
unit: ''
|
||||
},
|
||||
{
|
||||
title: '执行灌溉组号',
|
||||
timer: '0',
|
||||
unit: ''
|
||||
},
|
||||
{
|
||||
title: '瞬时流量',
|
||||
timer: '0',
|
||||
unit: 'L/h'
|
||||
},
|
||||
],
|
||||
openType: '',
|
||||
right2Index: [],
|
||||
centerBottom: [],
|
||||
rightList2: ['外控信号1#',
|
||||
'外控信号2#',
|
||||
'外控信号3#',
|
||||
'外控信号4#',
|
||||
// '高液位信号',
|
||||
// '中液位信号',
|
||||
// '低液位信号',
|
||||
// '电机信号',
|
||||
],
|
||||
timer_:null,
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
clearInterval(this.timer_)&&this.timer_
|
||||
},
|
||||
mounted() {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.dataInit()
|
||||
let that = this
|
||||
this.timer_ = setInterval(function() {
|
||||
that.dataInit();
|
||||
}, 5000);
|
||||
},
|
||||
methods: {
|
||||
dataInit() {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
|
||||
};
|
||||
this.api.getFI_getState(data).then((res) => {
|
||||
this.loading.close()
|
||||
if (res.data.code == 200) {
|
||||
this.inputData = res.data.data;
|
||||
this.getDataInfo2()
|
||||
this.getcenterBottom() //获取电磁阀
|
||||
this.getData29() //数据29 启动方式/信号
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
getDataInfo2() {
|
||||
var inputData = this.inputData
|
||||
this.dataInfo2_list[0].timer = this.countData(inputData['3013'])
|
||||
this.dataInfo2_list[1].timer = this.countData(inputData['3014'])
|
||||
this.dataInfo2_list[2].timer = this.countData(inputData['3011'])
|
||||
this.dataInfo2_list[3].timer = this.countData(inputData['3015'])
|
||||
this.dataInfo2_list[4].timer = this.countData(inputData['3010'])
|
||||
},
|
||||
getType29(index) {
|
||||
if (index == 0) {
|
||||
return '手动开启动'
|
||||
} else if (index == 1) {
|
||||
return '外控模式启动'
|
||||
} else if (index == 2) {
|
||||
return '光照积累启动'
|
||||
} else if (index == 3) {
|
||||
return '土壤湿度控制'
|
||||
} else if (index == 4) {
|
||||
return '间隔启动'
|
||||
} else if (index == 5) {
|
||||
return '定时启动'
|
||||
} else {
|
||||
return '无'
|
||||
}
|
||||
},
|
||||
//什么方式启动的灌溉
|
||||
getData29() {
|
||||
var number = this.padString(this.inputData['3011'].toString(2), 14)
|
||||
var index = 6
|
||||
var typeNumber = -1
|
||||
for (var i = 0; i < index; i++) {
|
||||
if (Number(number[i])) {
|
||||
typeNumber = i
|
||||
}
|
||||
}
|
||||
|
||||
this.openType = this.getType29(typeNumber)
|
||||
this.dataInfo2_list[2].timer = this.getType29(typeNumber)
|
||||
var statusIndex = 8
|
||||
let list = []
|
||||
for (var j = 0; j < statusIndex; j++) {
|
||||
if (Number(number[number.length - 1 - j])) {
|
||||
if (j == 0) {
|
||||
list.push(1)
|
||||
} else if (j == 1) {
|
||||
list.push(0)
|
||||
} else {
|
||||
list.push(j)
|
||||
}
|
||||
}
|
||||
}
|
||||
this.right2Index = list
|
||||
console.log(this.right2Index);
|
||||
|
||||
},
|
||||
padString(str, length) {
|
||||
return str.padStart(length, '0');
|
||||
},
|
||||
countData(data) {
|
||||
if (data) {
|
||||
return data
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
getcenterBottom() {
|
||||
// 96个电磁阀
|
||||
this.centerBottom = []
|
||||
var inputData = this.inputData
|
||||
var list1 = this.padString(inputData['3016'].toString(2), 16)
|
||||
var list2 = this.padString(inputData['3017'].toString(2), 16)
|
||||
var list3 = this.padString(inputData['3018'].toString(2), 16)
|
||||
var list4 = this.padString(inputData['3019'].toString(2), 16)
|
||||
var list5 = this.padString(inputData['3020'].toString(2), 16)
|
||||
var list6 = this.padString(inputData['3021'].toString(2), 16)
|
||||
var number = 16
|
||||
for (var i = 0; i < number; i++) {
|
||||
if (Number(list1[list1.length - 1 - i])) {
|
||||
this.centerBottom.push(i)
|
||||
}
|
||||
}
|
||||
for (var j = 0; j < number; j++) {
|
||||
if (Number(list2[list2.length - 1 - j])) {
|
||||
this.centerBottom.push(j + 16)
|
||||
}
|
||||
}
|
||||
for (var k = 0; k < number; k++) {
|
||||
if (Number(list3[list3.length - 1 - k])) {
|
||||
this.centerBottom.push(k + 32)
|
||||
}
|
||||
}
|
||||
for (var l = 0; l < number; l++) {
|
||||
if (Number(list4[list4.length - 1 - l])) {
|
||||
this.centerBottom.push(l + 48)
|
||||
}
|
||||
}
|
||||
for (var m = 0; m < number; m++) {
|
||||
if (Number(list5[list5.length - 1 - m])) {
|
||||
this.centerBottom.push(m + 64)
|
||||
}
|
||||
}
|
||||
for (var n = 0; n < number; n++) {
|
||||
if (Number(list6[list6.length - 1 - n])) {
|
||||
this.centerBottom.push(n + 80)
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss"></style>
|
|
@ -94,6 +94,12 @@
|
|||
SIM:=0,SIM卡正常;=1,无SIM卡;=2,SIM卡异常(网络注册失败)<br>
|
||||
信号质量:CSQ<11 信号很差;11<CSQ<18,信号不稳定;CSQ>18,信号稳定,最大是31.
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>备忘录</span>
|
||||
</div>
|
||||
<textarea v-model="memoDetail.memo" @blur="blurMemo()" placeholder="备忘录"
|
||||
class="system-tips system-textarea" maxlength="1200">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -108,6 +114,9 @@ export default {
|
|||
inputData: [],
|
||||
loading:null,
|
||||
ICCID:'',
|
||||
memoDetail: {
|
||||
memo: ''
|
||||
},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -249,7 +258,30 @@ this.dataInit();
|
|||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
this.getMemo()
|
||||
|
||||
},
|
||||
getMemo() {
|
||||
var store = this.$store.state
|
||||
var data1 = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
};
|
||||
this.api.readControl_getMemo(data1).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
if (res.data.data) {
|
||||
this.memoDetail = res.data.data
|
||||
} else {
|
||||
this.memoDetail = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
id: "",
|
||||
memo: "",
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
getType(index) {
|
||||
if (index == 0) {
|
||||
return '控制器正常'
|
||||
|
@ -260,6 +292,23 @@ this.dataInit();
|
|||
} else {
|
||||
return ' '
|
||||
}
|
||||
},
|
||||
//备忘录失去焦点
|
||||
blurMemo() {
|
||||
var data = this.memoDetail
|
||||
this.api.readControl_setMemo(data).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.$message({
|
||||
message: res.data.msg,
|
||||
type: "success",
|
||||
});
|
||||
if(!data.id){
|
||||
this.getMemo()
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
|
|
|
@ -0,0 +1,358 @@
|
|||
<template>
|
||||
<div class="irrigateSet systemSet">
|
||||
<div class="export">
|
||||
<label for="upInput">
|
||||
<div class="export-btn">导入设定值</div>
|
||||
</label>
|
||||
<div class="export-btn" @click="downLoadData">导出设定值</div>
|
||||
<input ref="fileInput" style="display: none" multiple id="upInput" type="file" accept=".txt" @change="changeTxt" />
|
||||
</div>
|
||||
<div class="table-title">
|
||||
<img src="../../assets/image/system.png" alt=""> 系统参数设置
|
||||
</div>
|
||||
<div class="flex-view border-none padding-none">
|
||||
<div class="input-main-80" style="width: auto;">
|
||||
<span>软件版本号</span>
|
||||
<input disabled v-model="inputData['3039']" type="text" placeholder="0">
|
||||
|
||||
<span></span>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>智能灌溉控制器</span>
|
||||
<input disabled v-model="inputData['3040']" type="text" placeholder="0">
|
||||
<span></span>
|
||||
|
||||
</div>
|
||||
<div class="input-main-80" style="width: auto;">
|
||||
<span>智能灌溉控制器</span>
|
||||
<input disabled v-model="inputData['3041']" type="text" placeholder="0">
|
||||
<span>天</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="input-main">
|
||||
<span>信号质量</span>
|
||||
<input disabled @blur="blurChange('3032', $event)" v-model="inputData['3032']" @input="change('3032', $event)" type="number" placeholder="0">
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>SIM</span>
|
||||
<input disabled @blur="blurChange('3033', $event)" v-model="inputData['3033']" @input="change('3033', $event)" type="number" placeholder="0">
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>4G</span>
|
||||
<input disabled @blur="blurChange('3034', $event)" v-model="inputData['3034']" @input="change('3034', $event)" type="number" placeholder="0">
|
||||
</div>
|
||||
<br>
|
||||
<div class="input-main-80" style="width: 100%;">
|
||||
<span>IP</span>
|
||||
<input disabled @blur="blurChange('3035', $event)" v-model="inputData['3035']" @input="change('3035', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('3036', $event)" v-model="inputData['3036']" @input="change('3036', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('3037', $event)" v-model="inputData['3037']" @input="change('3037', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('3038', $event)" v-model="inputData['3038']" @input="change('3038', $event)" type="number" placeholder="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view" style="border: none;">
|
||||
|
||||
<div class="input-main-80">
|
||||
<span>ICCID</span>
|
||||
<input disabled @blur="blurChange('3022', $event)" v-model="inputData['3022']" @input="change16to10('3022', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('3023', $event)" v-model="inputData['3023']" @input="change16to10('3023', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('3024', $event)" v-model="inputData['3024']" @input="change16to10('3024', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('3025', $event)" v-model="inputData['3025']" @input="change16to10('3025', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('3026', $event)" v-model="inputData['3026']" @input="change16to10('3026', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('3027', $event)" v-model="inputData['3027']" @input="change16to10('3027', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('3028', $event)" v-model="inputData['3028']" @input="change16to10('3028', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('3029', $event)" v-model="inputData['3029']" @input="change16to10('3029', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('3030', $event)" v-model="inputData['3030']" @input="change16to10('3030', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('3031', $event)" v-model="inputData['3031']" @input="change16to10('3031', $event)" type="text" placeholder="0">
|
||||
</div>
|
||||
<div class="input-main-one">
|
||||
<span>ICCID</span>
|
||||
<input disabled v-model="ICCID" type="text" placeholder="0">
|
||||
</div>
|
||||
<div class="system-tips">
|
||||
说明:4G:=0,无网络;=2,2G网络;=4,4G网络 <br>
|
||||
SIM:=0,SIM卡正常;=1,无SIM卡;=2,SIM卡异常(网络注册失败)<br>
|
||||
信号质量:CSQ<11 信号很差;11<CSQ<18,信号不稳定;CSQ>18,信号稳定,最大是31.
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>备忘录</span>
|
||||
</div>
|
||||
<textarea v-model="memoDetail.memo" @blur="blurMemo()" placeholder="备忘录"
|
||||
class="system-tips system-textarea" maxlength="1200">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
inputData: [],
|
||||
loading:null,
|
||||
ICCID:'',
|
||||
|
||||
memoDetail: {
|
||||
memo: ''
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.dataInit()
|
||||
//input获取焦点后全选
|
||||
let inputList = document.querySelectorAll('input');
|
||||
for (let index = 0; index < inputList.length; index++) {
|
||||
inputList[index].onfocus = this.selectValue;//input放入焦点,全选文本
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//文件下载导出
|
||||
downLoadData() {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
var store = this.$store.state
|
||||
var index = store.equipmentIndex;
|
||||
var devicecode=store.equipmentList[index - 1].deviceId
|
||||
this.api.FIreadvaluedownload(devicecode).then(res => {
|
||||
// 创建一个blob对象
|
||||
this.loading.close()
|
||||
const blob = new Blob([res.data], { type: 'text/txt' });
|
||||
// 创建一个a标签
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
|
||||
// 设置文件名
|
||||
link.setAttribute('download', `智能灌溉-${devicecode}.txt`);
|
||||
|
||||
// 模拟点击下载
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
|
||||
// 清理资源
|
||||
document.body.removeChild(link);
|
||||
window.URL.revokeObjectURL(url);
|
||||
})
|
||||
},
|
||||
// 文件上传
|
||||
changeTxt(e) {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
var store = this.$store.state
|
||||
var deviceId=store.equipmentList[store.equipmentIndex - 1].deviceId
|
||||
|
||||
const files = e.target.files
|
||||
|
||||
const that = this
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const formData = new FormData()
|
||||
console.log(files[i])
|
||||
formData.append('file', files[i])
|
||||
const fileContent = URL.createObjectURL(files[i])
|
||||
formData.append('devicecode', deviceId)
|
||||
this.api.upLoadFIwritevalue(formData).then((res) => {
|
||||
this.loading.close()
|
||||
if (res.data.code == 200) {
|
||||
this.$message.success(res.data.msg);
|
||||
}else{
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.$refs.fileInput.value = ''
|
||||
}, 100)
|
||||
},
|
||||
change16to10(code,el){
|
||||
var num=parseInt(el.target.value,16)
|
||||
var dataNum={
|
||||
target:{
|
||||
value:num
|
||||
}
|
||||
}
|
||||
this.change(code, dataNum)
|
||||
},
|
||||
fliter2(string){
|
||||
var data=''
|
||||
if(string.length<2){
|
||||
data='0'+string
|
||||
}else{
|
||||
data=string
|
||||
}
|
||||
return data
|
||||
},
|
||||
dataInit() {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
|
||||
};
|
||||
this.api.getFI_getState(data).then((res) => {
|
||||
this.loading.close()
|
||||
if (res.data.code == 200) {
|
||||
this.inputData = res.data.data;
|
||||
this.inputData['3022']= this.fliter2(this.inputData['3022'].toString(16))
|
||||
this.inputData['3023']= this.fliter2(this.inputData['3023'].toString(16))
|
||||
this.inputData['3024']= this.fliter2(this.inputData['3024'].toString(16))
|
||||
this.inputData['3025']= this.fliter2(this.inputData['3025'].toString(16))
|
||||
this.inputData['3026']= this.fliter2(this.inputData['3026'].toString(16))
|
||||
this.inputData['3027']= this.fliter2(this.inputData['3027'].toString(16))
|
||||
this.inputData['3028']= this.fliter2(this.inputData['3028'].toString(16))
|
||||
this.inputData['3029']= this.fliter2(this.inputData['3029'].toString(16))
|
||||
this.inputData['3030']= this.fliter2(this.inputData['3030'].toString(16))
|
||||
this.inputData['3031']= this.fliter2(this.inputData['3031'].toString(16))
|
||||
this.inputData['3039'] = 'REV:' + this.inputData['3039']
|
||||
this.inputData['3040'] = this.getType(this.inputData['3040'])
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.api.readControl_getFIIccid(data).then(res=>{
|
||||
if(res.data.code==200){
|
||||
this.ICCID=res.data.msg
|
||||
}else{
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
|
||||
this.getMemo()
|
||||
},
|
||||
getMemo() {
|
||||
var store = this.$store.state
|
||||
var data1 = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
};
|
||||
this.api.readControl_getMemo(data1).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
if (res.data.data) {
|
||||
this.memoDetail = res.data.data
|
||||
} else {
|
||||
this.memoDetail = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
id: "",
|
||||
memo: "",
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
getType(index) {
|
||||
if (index == 0) {
|
||||
return '智能灌溉控制器正常'
|
||||
} else if (index == 1) {
|
||||
return '智能灌溉控制器待锁机'
|
||||
} else if (index == 2) {
|
||||
return '智能灌溉控制器已锁机'
|
||||
} else {
|
||||
return ' '
|
||||
}
|
||||
},
|
||||
//备忘录失去焦点
|
||||
blurMemo() {
|
||||
var data = this.memoDetail
|
||||
this.api.readControl_setMemo(data).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.$message({
|
||||
message: res.data.msg,
|
||||
type: "success",
|
||||
});
|
||||
if(!data.id){
|
||||
this.getMemo()
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
var store = this.$store.state
|
||||
store.nowInput=e.target.value
|
||||
e.currentTarget.select();
|
||||
},
|
||||
//失去焦点
|
||||
blurChange(code, el) {
|
||||
var store=this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
change(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
};
|
||||
this.delayTimer(0, data);
|
||||
},
|
||||
//限制 写入停止后j*100毫秒调取函数
|
||||
delayTimer(i, data) {
|
||||
// const that = this;
|
||||
// //整体接口
|
||||
// let j = this.$store.state.lateSend;
|
||||
// //避免开启多个计时器
|
||||
// this.timer && clearInterval(this.timer);
|
||||
|
||||
// this.timer = setInterval(() => {
|
||||
// ++i;
|
||||
// if (i == j) {
|
||||
// that.changeData(data);
|
||||
// clearInterval(this.timer);
|
||||
// }
|
||||
// }, 100);
|
||||
},
|
||||
changeData(data) {
|
||||
// var store = this.$store.state
|
||||
// this.api.postWriteFs(data).then((res) => {
|
||||
// if (res.data.code == 200) {
|
||||
// this.$message({
|
||||
// message: res.data.msg,
|
||||
// type: "success",
|
||||
// });
|
||||
// store.nowInput=''
|
||||
// // this.dataInit();
|
||||
// } else {
|
||||
// this.inputData[data.regAddress]=store.nowInput
|
||||
// this.$message.error(res.data.msg);
|
||||
// }
|
||||
// this.timer = null
|
||||
// });
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
|
|
@ -7,76 +7,100 @@
|
|||
<div class="export-btn">导入设定值</div>
|
||||
</label>
|
||||
<div class="export-btn" @click="downLoadData">导出设定值</div>
|
||||
<input ref="fileInput" style="display: none" multiple id="upInput" type="file" accept=".txt" @change="changeTxt" />
|
||||
<input ref="fileInput" style="display: none" multiple id="upInput" type="file" accept=".txt"
|
||||
@change="changeTxt" />
|
||||
</div>
|
||||
<div class="table-title">
|
||||
<img src="../../assets/image/system.png" alt=""> 系统参数设置
|
||||
</div>
|
||||
<div class="flex-view border-none padding-none">
|
||||
<div class="input-main-80" style="width: auto;">
|
||||
<span>软件版本号</span>
|
||||
<input disabled v-model="inputData['76']" type="text" placeholder="0">
|
||||
<div class="input-main-80" style="width: auto;">
|
||||
<span>软件版本号</span>
|
||||
<input disabled v-model="inputData['76']" type="text" placeholder="0">
|
||||
|
||||
<span></span>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>施肥机状况</span>
|
||||
<input disabled v-model="inputData['77']" type="text" placeholder="0">
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>施肥机状况</span>
|
||||
<input disabled v-model="inputData['77']" type="text" placeholder="0">
|
||||
<span></span>
|
||||
|
||||
</div>
|
||||
<div class="input-main-80" style="width: auto;">
|
||||
<span>施肥机剩余使用时间</span>
|
||||
<input disabled v-model="inputData['78']" type="text" placeholder="0">
|
||||
<span>天</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-main-80" style="width: auto;">
|
||||
<span>施肥机剩余使用时间</span>
|
||||
<input disabled v-model="inputData['78']" type="text" placeholder="0">
|
||||
<span>天</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="input-main">
|
||||
<span>信号质量</span>
|
||||
<input disabled @blur="blurChange('65', $event)" v-model="inputData['65']" @input="change('65', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('65', $event)" v-model="inputData['65']"
|
||||
@input="change('65', $event)" type="number" placeholder="0">
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>SIM</span>
|
||||
<input disabled @blur="blurChange('66', $event)" v-model="inputData['66']" @input="change('66', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('66', $event)" v-model="inputData['66']"
|
||||
@input="change('66', $event)" type="number" placeholder="0">
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>4G</span>
|
||||
<input disabled @blur="blurChange('67', $event)" v-model="inputData['67']" @input="change('67', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('67', $event)" v-model="inputData['67']"
|
||||
@input="change('67', $event)" type="number" placeholder="0">
|
||||
</div>
|
||||
<br>
|
||||
<div class="input-main-80" style="width: 100%;">
|
||||
<span>IP</span>
|
||||
<input disabled @blur="blurChange('68', $event)" v-model="inputData['68']" @input="change('68', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('69', $event)" v-model="inputData['69']" @input="change('69', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('70', $event)" v-model="inputData['70']" @input="change('70', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('71', $event)" v-model="inputData['71']" @input="change('71', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('68', $event)" v-model="inputData['68']"
|
||||
@input="change('68', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('69', $event)" v-model="inputData['69']"
|
||||
@input="change('69', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('70', $event)" v-model="inputData['70']"
|
||||
@input="change('70', $event)" type="number" placeholder="0">
|
||||
<input disabled @blur="blurChange('71', $event)" v-model="inputData['71']"
|
||||
@input="change('71', $event)" type="number" placeholder="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view" style="border: none;">
|
||||
|
||||
<div class="input-main-80">
|
||||
<span>ICCID</span>
|
||||
<input disabled @blur="blurChange('55', $event)" v-model="inputData['55']" @input="change16to10('55', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('56', $event)" v-model="inputData['56']" @input="change16to10('56', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('57', $event)" v-model="inputData['57']" @input="change16to10('57', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('58', $event)" v-model="inputData['58']" @input="change16to10('58', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('59', $event)" v-model="inputData['59']" @input="change16to10('59', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('60', $event)" v-model="inputData['60']" @input="change16to10('60', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('61', $event)" v-model="inputData['61']" @input="change16to10('61', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('62', $event)" v-model="inputData['62']" @input="change16to10('62', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('63', $event)" v-model="inputData['63']" @input="change16to10('63', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('64', $event)" v-model="inputData['64']" @input="change16to10('64', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('55', $event)" v-model="inputData['55']"
|
||||
@input="change16to10('55', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('56', $event)" v-model="inputData['56']"
|
||||
@input="change16to10('56', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('57', $event)" v-model="inputData['57']"
|
||||
@input="change16to10('57', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('58', $event)" v-model="inputData['58']"
|
||||
@input="change16to10('58', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('59', $event)" v-model="inputData['59']"
|
||||
@input="change16to10('59', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('60', $event)" v-model="inputData['60']"
|
||||
@input="change16to10('60', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('61', $event)" v-model="inputData['61']"
|
||||
@input="change16to10('61', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('62', $event)" v-model="inputData['62']"
|
||||
@input="change16to10('62', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('63', $event)" v-model="inputData['63']"
|
||||
@input="change16to10('63', $event)" type="text" placeholder="0">
|
||||
<input disabled @blur="blurChange('64', $event)" v-model="inputData['64']"
|
||||
@input="change16to10('64', $event)" type="text" placeholder="0">
|
||||
</div>
|
||||
<div class="input-main-one">
|
||||
<div class="input-main-one">
|
||||
<span>ICCID</span>
|
||||
<input disabled v-model="ICCID" type="text" placeholder="0">
|
||||
<input disabled v-model="ICCID" type="text" placeholder="0">
|
||||
</div>
|
||||
<div class="system-tips">
|
||||
说明:4G:=0,无网络;=2,2G网络;=4,4G网络 <br>
|
||||
SIM:=0,SIM卡正常;=1,无SIM卡;=2,SIM卡异常(网络注册失败)<br>
|
||||
信号质量:CSQ<11 信号很差;11<CSQ<18,信号不稳定;CSQ>18,信号稳定,最大是31.
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>备忘录</span>
|
||||
</div>
|
||||
<textarea v-model="memoDetail.memo" @blur="blurMemo()" placeholder="备忘录"
|
||||
class="system-tips system-textarea" maxlength="1200">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -90,28 +114,32 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
inputData: [],
|
||||
loading:null,
|
||||
ICCID:''
|
||||
loading: null,
|
||||
ICCID: '',
|
||||
|
||||
memoDetail: {
|
||||
memo: ''
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
mounted() {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.dataInit()
|
||||
//input获取焦点后全选
|
||||
let inputList = document.querySelectorAll('input');
|
||||
for (let index = 0; index < inputList.length; index++) {
|
||||
inputList[index].onfocus = this.selectValue;//input放入焦点,全选文本
|
||||
}
|
||||
},
|
||||
//input获取焦点后全选
|
||||
let inputList = document.querySelectorAll('input');
|
||||
for (let index = 0; index < inputList.length; index++) {
|
||||
inputList[index].onfocus = this.selectValue;//input放入焦点,全选文本
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//文件下载导出
|
||||
downLoadData() {
|
||||
//文件下载导出
|
||||
downLoadData() {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
|
@ -120,13 +148,13 @@ export default {
|
|||
});
|
||||
var store = this.$store.state
|
||||
var index = store.equipmentIndex;
|
||||
var devicecode=store.equipmentList[index - 1].deviceId
|
||||
var devicecode = store.equipmentList[index - 1].deviceId
|
||||
this.api.FsdataReadValuedownload(devicecode).then(res => {
|
||||
// 创建一个blob对象
|
||||
this.loading.close()
|
||||
console.log(res,111);
|
||||
console.log(res, 111);
|
||||
const blob = new Blob([res.data], { type: 'text/txt' });
|
||||
console.log(blob,111);
|
||||
console.log(blob, 111);
|
||||
// 创建一个a标签
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const link = document.createElement('a');
|
||||
|
@ -153,45 +181,45 @@ export default {
|
|||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
var store = this.$store.state
|
||||
var deviceId=store.equipmentList[store.equipmentIndex - 1].deviceId
|
||||
|
||||
const files = e.target.files
|
||||
var deviceId = store.equipmentList[store.equipmentIndex - 1].deviceId
|
||||
|
||||
const that = this
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const formData = new FormData()
|
||||
console.log(files[i])
|
||||
formData.append('file', files[i])
|
||||
const fileContent = URL.createObjectURL(files[i])
|
||||
formData.append('devicecode', deviceId)
|
||||
this.api.upLoadFsdataWriteValue(formData).then((res) => {
|
||||
this.loading.close()
|
||||
if (res.data.code == 200) {
|
||||
this.$message.success(res.data.msg);
|
||||
}else{
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.$refs.fileInput.value = ''
|
||||
}, 100)
|
||||
},
|
||||
change16to10(code,el){
|
||||
var num=parseInt(el.target.value,16)
|
||||
var dataNum={
|
||||
target:{
|
||||
value:num
|
||||
const files = e.target.files
|
||||
|
||||
const that = this
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const formData = new FormData()
|
||||
console.log(files[i])
|
||||
formData.append('file', files[i])
|
||||
const fileContent = URL.createObjectURL(files[i])
|
||||
formData.append('devicecode', deviceId)
|
||||
this.api.upLoadFsdataWriteValue(formData).then((res) => {
|
||||
this.loading.close()
|
||||
if (res.data.code == 200) {
|
||||
this.$message.success(res.data.msg);
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.$refs.fileInput.value = ''
|
||||
}, 100)
|
||||
},
|
||||
change16to10(code, el) {
|
||||
var num = parseInt(el.target.value, 16)
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: num
|
||||
}
|
||||
}
|
||||
this.change(code, dataNum)
|
||||
},
|
||||
fliter2(string){
|
||||
var data=''
|
||||
if(string.length<2){
|
||||
data='0'+string
|
||||
}else{
|
||||
data=string
|
||||
fliter2(string) {
|
||||
var data = ''
|
||||
if (string.length < 2) {
|
||||
data = '0' + string
|
||||
} else {
|
||||
data = string
|
||||
}
|
||||
return data
|
||||
},
|
||||
|
@ -203,34 +231,57 @@ export default {
|
|||
regNum: 72,
|
||||
};
|
||||
this.api.postState(data).then((res) => {
|
||||
|
||||
this.loading.close()
|
||||
|
||||
this.loading.close()
|
||||
if (res.data.code == 200) {
|
||||
this.inputData = res.data.data;
|
||||
this.inputData['55']= this.fliter2(this.inputData['55'].toString(16))
|
||||
this.inputData['56']= this.fliter2(this.inputData['56'].toString(16))
|
||||
this.inputData['57']= this.fliter2(this.inputData['57'].toString(16))
|
||||
this.inputData['58']= this.fliter2(this.inputData['58'].toString(16))
|
||||
this.inputData['59']= this.fliter2(this.inputData['59'].toString(16))
|
||||
this.inputData['60']= this.fliter2(this.inputData['60'].toString(16))
|
||||
this.inputData['61']= this.fliter2(this.inputData['61'].toString(16))
|
||||
this.inputData['62']= this.fliter2(this.inputData['62'].toString(16))
|
||||
this.inputData['63']= this.fliter2(this.inputData['63'].toString(16))
|
||||
this.inputData['64']= this.fliter2(this.inputData['64'].toString(16))
|
||||
this.inputData['55'] = this.fliter2(this.inputData['55'].toString(16))
|
||||
this.inputData['56'] = this.fliter2(this.inputData['56'].toString(16))
|
||||
this.inputData['57'] = this.fliter2(this.inputData['57'].toString(16))
|
||||
this.inputData['58'] = this.fliter2(this.inputData['58'].toString(16))
|
||||
this.inputData['59'] = this.fliter2(this.inputData['59'].toString(16))
|
||||
this.inputData['60'] = this.fliter2(this.inputData['60'].toString(16))
|
||||
this.inputData['61'] = this.fliter2(this.inputData['61'].toString(16))
|
||||
this.inputData['62'] = this.fliter2(this.inputData['62'].toString(16))
|
||||
this.inputData['63'] = this.fliter2(this.inputData['63'].toString(16))
|
||||
this.inputData['64'] = this.fliter2(this.inputData['64'].toString(16))
|
||||
this.inputData['76'] = 'REV:' + this.inputData['76']
|
||||
this.inputData['77'] = this.getType(this.inputData['77'])
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
});
|
||||
var data1 = {
|
||||
var data1 = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
};
|
||||
this.api.getFsIccid(data1).then(res=>{
|
||||
if(res.data.code==200){
|
||||
this.ICCID=res.data.msg
|
||||
}else{
|
||||
this.$message.error(res.data.msg);
|
||||
this.api.getFsIccid(data1).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.ICCID = res.data.msg
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
this.getMemo()
|
||||
|
||||
},
|
||||
getMemo() {
|
||||
var store = this.$store.state
|
||||
var data1 = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
};
|
||||
this.api.readControl_getMemo(data1).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
if (res.data.data) {
|
||||
this.memoDetail = res.data.data
|
||||
} else {
|
||||
this.memoDetail = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
id: "",
|
||||
memo: "",
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -245,29 +296,46 @@ export default {
|
|||
return ' '
|
||||
}
|
||||
},
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
var store = this.$store.state
|
||||
store.nowInput=e.target.value
|
||||
//备忘录失去焦点
|
||||
blurMemo() {
|
||||
var data = this.memoDetail
|
||||
this.api.readControl_setMemo(data).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.$message({
|
||||
message: res.data.msg,
|
||||
type: "success",
|
||||
});
|
||||
if(!data.id){
|
||||
this.getMemo()
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
var store = this.$store.state
|
||||
store.nowInput = e.target.value
|
||||
e.currentTarget.select();
|
||||
},
|
||||
//失去焦点
|
||||
blurChange(code, el) {
|
||||
var store=this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
},
|
||||
//失去焦点
|
||||
blurChange(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
change(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
|
@ -294,27 +362,24 @@ export default {
|
|||
// }, 100);
|
||||
},
|
||||
changeData(data) {
|
||||
// var store = this.$store.state
|
||||
// this.api.postWriteFs(data).then((res) => {
|
||||
// if (res.data.code == 200) {
|
||||
// this.$message({
|
||||
// message: res.data.msg,
|
||||
// type: "success",
|
||||
// });
|
||||
// store.nowInput=''
|
||||
// // this.dataInit();
|
||||
// } else {
|
||||
// this.inputData[data.regAddress]=store.nowInput
|
||||
// this.$message.error(res.data.msg);
|
||||
// }
|
||||
// this.timer = null
|
||||
// });
|
||||
// var store = this.$store.state
|
||||
// this.api.postWriteFs(data).then((res) => {
|
||||
// if (res.data.code == 200) {
|
||||
// this.$message({
|
||||
// message: res.data.msg,
|
||||
// type: "success",
|
||||
// });
|
||||
// store.nowInput=''
|
||||
// // this.dataInit();
|
||||
// } else {
|
||||
// this.inputData[data.regAddress]=store.nowInput
|
||||
// this.$message.error(res.data.msg);
|
||||
// }
|
||||
// this.timer = null
|
||||
// });
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
|
||||
<style lang="scss"></style>
|
|
@ -0,0 +1,649 @@
|
|||
<template>
|
||||
<div class="irrigateSet upload">
|
||||
<div class="table-title">
|
||||
<img src="../../assets/image/upload.png" alt=""> 数据上传
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="input-main">
|
||||
<span>环境数据上传时间</span>
|
||||
<input @blur="blurChange('10000', $event)" v-model="inputData['10000']" @input="change('10000', $event)" type="number" placeholder="0">
|
||||
<span>秒</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="upload-view">
|
||||
<div class="page-title upload-title">
|
||||
气象站
|
||||
</div>
|
||||
<div class="upload-content">
|
||||
<div @click="selList1(index)" v-for="item, index in list1" :key="index">
|
||||
<div v-if="actList1.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">
|
||||
水肥参数
|
||||
</div>
|
||||
<div class="upload-content upload-content1">
|
||||
<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-else class="sel"></div>
|
||||
{{ item }}
|
||||
</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>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
actList1: [],
|
||||
actList1New: [],
|
||||
list1: ['室外平均温度传感器',
|
||||
'室外平均湿度传感器',
|
||||
'室外平均光照传感器',
|
||||
'室外平均风速传感器',
|
||||
'室外平均风向传感器',
|
||||
'室外平均雨雪传感器',
|
||||
'室外平均雨量传感器',
|
||||
'气象站电池电压(V)',
|
||||
'气象站信号强度(RSSI)',
|
||||
'气象站信噪比(SNR)',
|
||||
'室外平均露点温度',
|
||||
'室外平均C02传感器',
|
||||
'室外平均土温传感器',
|
||||
'室外平均土湿传感器',
|
||||
'室外平均大气压传感器',
|
||||
"室外平均太阳总辐射传感器",],
|
||||
|
||||
|
||||
actList2: [],
|
||||
actList2New: [],
|
||||
list2: ['1#水肥PH',
|
||||
'1#水肥EC',
|
||||
'1#水温传感器',
|
||||
],
|
||||
|
||||
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: [],
|
||||
loading:null,
|
||||
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.dataInit()
|
||||
//input获取焦点后全选
|
||||
let inputList = document.querySelectorAll('input');
|
||||
for (let index = 0; index < inputList.length; index++) {
|
||||
inputList[index].onfocus = this.selectValue;//input放入焦点,全选文本
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
padString(str, length) {
|
||||
return str.padStart(length, '0');
|
||||
},
|
||||
//由于bit0和页面内是相反的 所以要倒着来
|
||||
getAct1() {
|
||||
this.actList1=[]
|
||||
var num = this.inputData['10001']
|
||||
var num2 = this.padString(num.toString(2), 16)
|
||||
this.actList1New=num2.split("")
|
||||
this.actList1New.forEach((el,index)=>{
|
||||
if(el=='1'){
|
||||
this.actList1.push(this.actList1New.length-index-1)
|
||||
}
|
||||
})
|
||||
},
|
||||
getAct2() {
|
||||
this.actList2=[]
|
||||
var num = this.inputData['10002']
|
||||
var num2 = this.padString(num.toString(2), 3)
|
||||
this.actList2New=num2.split("")
|
||||
this.actList2New.forEach((el,index)=>{
|
||||
if(el=='1'){
|
||||
this.actList2.push(this.actList2New.length-index-1)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
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() {
|
||||
this.actList1New = []
|
||||
this.list1.forEach((el, index) => {
|
||||
this.actList1New.push('0')
|
||||
})
|
||||
this.actList1New = []
|
||||
this.list2.forEach((el, index) => {
|
||||
this.actList1New.push('0')
|
||||
})
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
|
||||
};
|
||||
this.api.readFi_datauploadfi(data).then((res) => {
|
||||
this.loading.close()
|
||||
if (res.data.code == 200) {
|
||||
this.inputData = res.data.data;
|
||||
|
||||
this.getAct1()
|
||||
this.getAct2()
|
||||
this.getActList1()
|
||||
this.getActList2()
|
||||
this.getActList3()
|
||||
this.getActList4()
|
||||
this.getActList5()
|
||||
this.getActList6()
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
var store = this.$store.state
|
||||
store.nowInput=e.target.value
|
||||
e.currentTarget.select();
|
||||
},
|
||||
//失去焦点
|
||||
blurChange(code, el) {
|
||||
var store=this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
}; //避免开启多个计时器
|
||||
if (store.nowInput != el.target.value) {
|
||||
this.changeData(data);
|
||||
}
|
||||
// if (this.timer) {
|
||||
// this.timer && clearInterval(this.timer);
|
||||
// this.changeData(data);
|
||||
// }
|
||||
|
||||
},
|
||||
changeBtn(code,el){
|
||||
var store=this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
};
|
||||
this.delayTimerBtn(0, data);
|
||||
},
|
||||
//切换btn的限制 写入停止后j*100毫秒调取函数
|
||||
delayTimerBtn(i, data) {
|
||||
const that = this;
|
||||
//整体接口
|
||||
let j = this.$store.state.lateSendBtn;
|
||||
//避免开启多个计时器
|
||||
this.timer && clearInterval(this.timer);
|
||||
|
||||
this.timer = setInterval(() => {
|
||||
++i;
|
||||
if (i == j) {
|
||||
that.changeData(data);
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
}, 100);
|
||||
},
|
||||
change(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
regAddress: code,
|
||||
num: el.target.value,
|
||||
};
|
||||
this.delayTimer(0, data);
|
||||
},
|
||||
//限制 写入停止后j*100毫秒调取函数
|
||||
delayTimer(i, data) {
|
||||
// const that = this;
|
||||
// //整体接口
|
||||
// let j = this.$store.state.lateSend;
|
||||
// //避免开启多个计时器
|
||||
// this.timer && clearInterval(this.timer);
|
||||
|
||||
// this.timer = setInterval(() => {
|
||||
// ++i;
|
||||
// if (i == j) {
|
||||
// that.changeData(data);
|
||||
// clearInterval(this.timer);
|
||||
// }
|
||||
// }, 100);
|
||||
},
|
||||
changeData(data) {
|
||||
var store = this.$store.state
|
||||
this.api.postwriteFi_write(data).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
this.$message({
|
||||
message: res.data.msg,
|
||||
type: "success",
|
||||
});
|
||||
store.nowInput=''
|
||||
// this.dataInit();
|
||||
} else {
|
||||
this.inputData[data.regAddress]=store.nowInput
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
this.timer = null
|
||||
});
|
||||
},
|
||||
selList1(index) {
|
||||
if (this.actList1.indexOf(index) == -1) {
|
||||
this.actList1.push(index)
|
||||
} else {
|
||||
this.actList1.splice(this.actList1.indexOf(index), 1)
|
||||
}
|
||||
this.actList1New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',]
|
||||
this.actList1.forEach((el, index) => {
|
||||
this.actList1New[this.actList1New.length-el-1] = '1'
|
||||
})
|
||||
|
||||
var num = this.actList1New.join("");
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: parseInt(num, 2),
|
||||
},
|
||||
};
|
||||
this.changeBtn('10001', dataNum);
|
||||
},
|
||||
selList2(index) {
|
||||
if (this.actList2.indexOf(index) == -1) {
|
||||
this.actList2.push(index)
|
||||
} else {
|
||||
this.actList2.splice(this.actList2.indexOf(index), 1)
|
||||
}
|
||||
this.actList2New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',]
|
||||
this.actList2.forEach((el, index) => {
|
||||
this.actList2New[this.actList2New.length-el-1] = '1'
|
||||
})
|
||||
var num = this.actList2New.join("");
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: parseInt(num, 2),
|
||||
},
|
||||
};
|
||||
this.changeBtn('10002', dataNum);
|
||||
},
|
||||
selList3(index) {
|
||||
if (this.actList3.indexOf(index) == -1) {
|
||||
this.actList3.push(index)
|
||||
} else {
|
||||
this.actList3.splice(this.actList3.indexOf(index), 1)
|
||||
}
|
||||
this.actList3New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',]
|
||||
|
||||
this.actList3.forEach((el, index) => {
|
||||
this.actList3New[this.actList3New.length-el-1] = '1'
|
||||
})
|
||||
|
||||
var num = this.actList3New.join("");
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: parseInt(num, 2),
|
||||
},
|
||||
};
|
||||
this.changeBtn('10003', dataNum);
|
||||
},
|
||||
selList4(index) {
|
||||
if (this.actList4.indexOf(index) == -1) {
|
||||
this.actList4.push(index)
|
||||
} else {
|
||||
this.actList4.splice(this.actList4.indexOf(index), 1)
|
||||
}
|
||||
this.actList4New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0']
|
||||
this.actList4.forEach((el, index) => {
|
||||
this.actList4New[this.actList4New.length-el-1] = '1'
|
||||
})
|
||||
var num = this.actList4New.join("");
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: parseInt(num, 2),
|
||||
},
|
||||
};
|
||||
this.changeBtn('10004', dataNum);
|
||||
},
|
||||
selList5(index) {
|
||||
if (this.actList5.indexOf(index) == -1) {
|
||||
this.actList5.push(index)
|
||||
} else {
|
||||
this.actList5.splice(this.actList5.indexOf(index), 1)
|
||||
}
|
||||
this.actList5New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0']
|
||||
this.actList5.forEach((el, index) => {
|
||||
this.actList5New[this.actList5New.length-el-1] = '1'
|
||||
})
|
||||
|
||||
var num = this.actList5New.join("");
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: parseInt(num, 2),
|
||||
},
|
||||
};
|
||||
this.changeBtn('10005', dataNum);
|
||||
},
|
||||
selList6(index) {
|
||||
if (this.actList6.indexOf(index) == -1) {
|
||||
this.actList6.push(index)
|
||||
} else {
|
||||
this.actList6.splice(this.actList6.indexOf(index), 1)
|
||||
}
|
||||
this.actList6New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0']
|
||||
this.actList6.forEach((el, index) => {
|
||||
this.actList6New[this.actList6New.length-el-1] = '1'
|
||||
})
|
||||
|
||||
var num = this.actList6New.join("");
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: parseInt(num, 2),
|
||||
},
|
||||
};
|
||||
this.changeBtn('10006', dataNum);
|
||||
},
|
||||
selList7(index) {
|
||||
if (this.actList7.indexOf(index) == -1) {
|
||||
this.actList7.push(index)
|
||||
} else {
|
||||
this.actList7.splice(this.actList7.indexOf(index), 1)
|
||||
}
|
||||
this.actList7New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0']
|
||||
this.actList7.forEach((el, index) => {
|
||||
this.actList7New[this.actList7New.length-el-1] = '1'
|
||||
})
|
||||
|
||||
var num = this.actList7New.join("");
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: parseInt(num, 2),
|
||||
},
|
||||
};
|
||||
this.changeBtn('10007', dataNum);
|
||||
},
|
||||
selList8(index) {
|
||||
if (this.actList8.indexOf(index) == -1) {
|
||||
this.actList8.push(index)
|
||||
} else {
|
||||
this.actList8.splice(this.actList8.indexOf(index), 1)
|
||||
}
|
||||
this.actList8New=['0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0']
|
||||
this.actList8.forEach((el, index) => {
|
||||
this.actList8New[this.actList8New.length-el-1] = '1'
|
||||
})
|
||||
|
||||
var num = this.actList8New.join("");
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: parseInt(num, 2),
|
||||
},
|
||||
};
|
||||
this.changeBtn('10008', dataNum);
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss"></style>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<template>
|
||||
<div class="formula control">
|
||||
<setParamsSoil></setParamsSoil>
|
||||
<div class="page-content">
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import setParamsSoil from "../components/setParamsSoil.vue";
|
||||
export default {
|
||||
components: {
|
||||
setParamsSoil,
|
||||
},
|
||||
// 当控制器整体页面关闭时 清楚控制器数据
|
||||
beforeDestroy() {
|
||||
var store = this.$store.state;
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
</style>
|