pc-master #163
@ -14,7 +14,7 @@ function sendGetRequest(url, data) {
 | 
			
		||||
      params: data
 | 
			
		||||
    })
 | 
			
		||||
      .then(function (res) { //请求成功,response接收返回参数
 | 
			
		||||
        if (res.data.code == 401) {
 | 
			
		||||
        if (res.data.code == 403) {
 | 
			
		||||
          localStorage.removeItem('token')
 | 
			
		||||
          router.push({
 | 
			
		||||
            name: 'login'
 | 
			
		||||
@ -41,7 +41,7 @@ function sendUploadRequest(url, data) {
 | 
			
		||||
      }
 | 
			
		||||
    }).then(
 | 
			
		||||
      (res) => {
 | 
			
		||||
        if (res.data.code == 401) {
 | 
			
		||||
        if (res.data.code == 403) {
 | 
			
		||||
          localStorage.removeItem('token')
 | 
			
		||||
          router.push({
 | 
			
		||||
            name: 'login'
 | 
			
		||||
@ -631,4 +631,45 @@ 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);
 | 
			
		||||
    },
 | 
			
		||||
    
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										222
									
								
								src/components/setParamsSoil.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										222
									
								
								src/components/setParamsSoil.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,222 @@
 | 
			
		||||
<template>
 | 
			
		||||
    <div class="set-params collapse scroll">
 | 
			
		||||
        <div class="set-top">
 | 
			
		||||
            <img src="../assets/image/set-icon.png" alt="">设定值参数
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="set-tips">
 | 
			
		||||
            <div @click="toHome($store.state.equipmentIndex)">
 | 
			
		||||
                {{ $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: '灌溉组配置', 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()
 | 
			
		||||
            // }
 | 
			
		||||
           
 | 
			
		||||
 | 
			
		||||
        },
 | 
			
		||||
        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?eqbyIndex=` + index })
 | 
			
		||||
        },
 | 
			
		||||
        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?id=${item.index}` })
 | 
			
		||||
                }
 | 
			
		||||
                //  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,33 @@ 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')
 | 
			
		||||
      },]
 | 
			
		||||
    },]
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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` })
 | 
			
		||||
                    }
 | 
			
		||||
@ -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('气象站无该页面');
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
@ -40,7 +40,7 @@
 | 
			
		||||
              </div>
 | 
			
		||||
            </template>
 | 
			
		||||
          </el-table-column>
 | 
			
		||||
          <el-table-column label="清水与肥料的比例">
 | 
			
		||||
          <el-table-column label="1000L水与肥料的倍数">
 | 
			
		||||
            <template slot-scope="scope">
 | 
			
		||||
              <div class="input-main-80">
 | 
			
		||||
                <input @blur="blurChange(store.formulaNum[indexs - 1] + 5 + scope.$index, $event)"
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										951
									
								
								src/views/page/intrinsicParameter-soil.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										951
									
								
								src/views/page/intrinsicParameter-soil.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,951 @@
 | 
			
		||||
<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-sel input-sel-w180">
 | 
			
		||||
                <span>1#电磁阀自控传感器选择</span>
 | 
			
		||||
                <el-dropdown @command="handleCommand($event,20650)">
 | 
			
		||||
                    <div class="el-dropdown-link">
 | 
			
		||||
                        <input v-model="inputDataNew[20650]" 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>输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20651, $event)" v-model="inputData[20651]" @input="change(20651, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="input-sel input-sel-w180">
 | 
			
		||||
                <span>2#电磁阀自控传感器选择</span>
 | 
			
		||||
                <el-dropdown @command="handleCommand($event,20652)">
 | 
			
		||||
                    <div class="el-dropdown-link">
 | 
			
		||||
                        <input v-model="inputDataNew[20652]" 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>输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20653, $event)" v-model="inputData[20653]" @input="change(20653, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-sel input-sel-w180">
 | 
			
		||||
                <span>3#电磁阀自控传感器选择</span>
 | 
			
		||||
                <el-dropdown @command="handleCommand($event,20654)">
 | 
			
		||||
                    <div class="el-dropdown-link">
 | 
			
		||||
                        <input v-model="inputDataNew[20654]" 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>输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20655, $event)" v-model="inputData[20655]" @input="change(20655, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="input-sel input-sel-w180">
 | 
			
		||||
                <span>4#电磁阀自控传感器选择</span>
 | 
			
		||||
                <el-dropdown @command="handleCommand($event,20656)">
 | 
			
		||||
                    <div class="el-dropdown-link">
 | 
			
		||||
                        <input v-model="inputDataNew[20656]" 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>输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20657, $event)" v-model="inputData[20657]" @input="change(20657, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-sel input-sel-w180">
 | 
			
		||||
                <span>5#电磁阀自控传感器选择</span>
 | 
			
		||||
                <el-dropdown @command="handleCommand($event,20658)">
 | 
			
		||||
                    <div class="el-dropdown-link">
 | 
			
		||||
                        <input v-model="inputDataNew[20658]" 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>输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20659, $event)" v-model="inputData[20659]" @input="change(20659, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="input-sel input-sel-w180">
 | 
			
		||||
                <span>6#电磁阀自控传感器选择</span>
 | 
			
		||||
                <el-dropdown @command="handleCommand($event,20660)">
 | 
			
		||||
                    <div class="el-dropdown-link">
 | 
			
		||||
                        <input v-model="inputDataNew[20660]" 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>输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20661, $event)" v-model="inputData[20661]" @input="change(20661, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view shrink-none padding-none">
 | 
			
		||||
            <div class="input-sel input-sel-w180">
 | 
			
		||||
                <span>7#电磁阀自控传感器选择</span>
 | 
			
		||||
                <el-dropdown @command="handleCommand($event,20662)">
 | 
			
		||||
                    <div class="el-dropdown-link">
 | 
			
		||||
                        <input v-model="inputDataNew[20662]" 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>输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20663, $event)" v-model="inputData[20663]" @input="change(20663, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="input-sel input-sel-w180">
 | 
			
		||||
                <span>8#电磁阀自控传感器选择</span>
 | 
			
		||||
                <el-dropdown @command="handleCommand($event,20664)">
 | 
			
		||||
                    <div class="el-dropdown-link">
 | 
			
		||||
                        <input v-model="inputDataNew[20664]" 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>输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20665, $event)" v-model="inputData[20665]" @input="change(20665, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>湿帘水泵1-2组输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20724, $event)" v-model="inputData[20724]" @input="change(20724, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20725, $event)" v-model="inputData[20725]" @input="change(20725, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>环流风扇1-2组输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20722, $event)" v-model="inputData[20722]" @input="change(20722, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20723, $event)" v-model="inputData[20723]" @input="change(20723, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>高压微雾1-2组输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20720, $event)" v-model="inputData[20720]" @input="change(20720, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20721, $event)" v-model="inputData[20721]" @input="change(20721, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>   CO2补气1-2输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20731, $event)" v-model="inputData[20731]" @input="change(20731, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20732, $event)" v-model="inputData[20732]" @input="change(20732, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>冷暖风机1-2组输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20727, $event)" v-model="inputData[20727]" @input="change(20727, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20728, $event)" v-model="inputData[20728]" @input="change(20728, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20729, $event)" v-model="inputData[20729]" @input="change(20729, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20730, $event)" v-model="inputData[20730]" @input="change(20730, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="input-sel input-sel-w180">
 | 
			
		||||
                <span>模式选择</span>
 | 
			
		||||
                <el-dropdown @command="handleCommand1($event,20726)">
 | 
			
		||||
                    <div class="el-dropdown-link">
 | 
			
		||||
                        <input v-model="inputDataNew[20726]" 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 typeList3" :key="index" :command="item.value">{{
 | 
			
		||||
                            item.label }}</el-dropdown-item>
 | 
			
		||||
                    </el-dropdown-menu>
 | 
			
		||||
                </el-dropdown>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <!-- <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>CO2补气1-2组输出通道:</span>
 | 
			
		||||
                <input type="text" placeholder="0">
 | 
			
		||||
                <input type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div> -->
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>轴流风机1-5组输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20707, $event)" v-model="inputData[20707]" @input="change(20707, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20708, $event)" v-model="inputData[20708]" @input="change(20708, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20709, $event)" v-model="inputData[20709]" @input="change(20709, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20710, $event)" v-model="inputData[20710]" @input="change(20710, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20711, $event)" v-model="inputData[20711]" @input="change(20711, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>   补光灯1-8组输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20712, $event)" v-model="inputData[20712]" @input="change(20712, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20713, $event)" v-model="inputData[20713]" @input="change(20713, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20714, $event)" v-model="inputData[20714]" @input="change(20714, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20715, $event)" v-model="inputData[20715]" @input="change(20715, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20716, $event)" v-model="inputData[20716]" @input="change(20716, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20717, $event)" v-model="inputData[20717]" @input="change(20717, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20718, $event)" v-model="inputData[20718]" @input="change(20718, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <input @blur="blurChange(20719, $event)" v-model="inputData[20719]" @input="change(20719, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>1#通风窗全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20667, $event)" v-model="inputData[20667]" @input="change(20667, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20669, $event)" v-model="inputData[20669]" @input="change(20669, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20670, $event)" v-model="inputData[20670]" @input="change(20670, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="input-sel input-sel-w140">
 | 
			
		||||
                <span>通风窗朝向</span>
 | 
			
		||||
                <el-dropdown @command="handleCommand2($event,20668)">
 | 
			
		||||
                    <div class="el-dropdown-link">
 | 
			
		||||
                        <input v-model="inputDataNew[20668]" 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 class="input-main-80">
 | 
			
		||||
                <span>开度基础值:</span>
 | 
			
		||||
                <input @blur="blurChange(20892, $event)" v-model="inputData[20892]" @input="change(20892, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                 <span>秒</span>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>2#通风窗全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20671, $event)" v-model="inputData[20671]" @input="change(20671, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20673, $event)" v-model="inputData[20673]" @input="change(20673, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20674, $event)" v-model="inputData[20674]" @input="change(20674, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="input-sel input-sel-w140">
 | 
			
		||||
                <span>通风窗朝向</span>
 | 
			
		||||
                <el-dropdown @command="handleCommand2($event,20672)">
 | 
			
		||||
                    <div class="el-dropdown-link">
 | 
			
		||||
                        <input v-model="inputDataNew[20672]" 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 class="input-main-80">
 | 
			
		||||
                <span>开度基础值:</span>
 | 
			
		||||
                <input @blur="blurChange(20893, $event)" v-model="inputData[20893]" @input="change(20893, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                 <span>秒</span>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>3#通风窗全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20675, $event)" v-model="inputData[20675]" @input="change(20675, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20677, $event)" v-model="inputData[20677]" @input="change(20677, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20678, $event)" v-model="inputData[20678]" @input="change(20678, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="input-sel input-sel-w140">
 | 
			
		||||
                <span>通风窗朝向</span>
 | 
			
		||||
                <el-dropdown @command="handleCommand2($event,20676)">
 | 
			
		||||
                    <div class="el-dropdown-link">
 | 
			
		||||
                        <input v-model="inputDataNew[20676]" 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 class="input-main-80">
 | 
			
		||||
                <span>开度基础值:</span>
 | 
			
		||||
                <input @blur="blurChange(20894, $event)" v-model="inputData[20894]" @input="change(20894, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                 <span>秒</span>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>4#通风窗全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20679, $event)" v-model="inputData[20679]" @input="change(20679, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20681, $event)" v-model="inputData[20681]" @input="change(20681, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20682, $event)" v-model="inputData[20682]" @input="change(20682, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="input-sel input-sel-w140">
 | 
			
		||||
                <span>通风窗朝向</span>
 | 
			
		||||
                <el-dropdown @command="handleCommand2($event,20680)">
 | 
			
		||||
                    <div class="el-dropdown-link">
 | 
			
		||||
                        <input v-model="inputDataNew[20680]" 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 class="input-main-80">
 | 
			
		||||
                <span>开度基础值:</span>
 | 
			
		||||
                <input @blur="blurChange(20895, $event)" v-model="inputData[20895]" @input="change(20895, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                 <span>秒</span>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>  
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>5#通风窗全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20733, $event)" v-model="inputData[20733]" @input="change(20733, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20735, $event)" v-model="inputData[20735]" @input="change(20735, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20736, $event)" v-model="inputData[20736]" @input="change(20736, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="input-sel input-sel-w140">
 | 
			
		||||
                <span>通风窗朝向</span>
 | 
			
		||||
                <el-dropdown @command="handleCommand2($event,20734)">
 | 
			
		||||
                    <div class="el-dropdown-link">
 | 
			
		||||
                        <input v-model="inputDataNew[20734]" 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 class="input-main-80">
 | 
			
		||||
                <span>开度基础值:</span>
 | 
			
		||||
                <input @blur="blurChange(20898, $event)" v-model="inputData[20898]" @input="change(20898, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                 <span>秒</span>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
          <div class="flex-view shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>6#通风窗全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20737, $event)" v-model="inputData[20737]" @input="change(20737, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20739, $event)" v-model="inputData[20739]" @input="change(20739, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20740, $event)" v-model="inputData[20740]" @input="change(20740, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="input-sel input-sel-w140">
 | 
			
		||||
                <span>通风窗朝向</span>
 | 
			
		||||
                <el-dropdown @command="handleCommand2($event,20738)">
 | 
			
		||||
                    <div class="el-dropdown-link">
 | 
			
		||||
                        <input v-model="inputDataNew[20738]" 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 class="input-main-80">
 | 
			
		||||
                <span>开度基础值:</span>
 | 
			
		||||
                <input @blur="blurChange(20899, $event)" v-model="inputData[20899]" @input="change(20899, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                 <span>秒</span>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>所有设备的行程保护时间</span>
 | 
			
		||||
                <input @blur="blurChange(20666, $event)" v-model="inputData[20666]" @input="change(20666, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="title-tips-bold">设备位置</div>
 | 
			
		||||
        <div class="flex-view shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>经度</span>
 | 
			
		||||
                <input @blur="blurChange10(20896, $event)" v-model="inputData[20896]" @input="changeCount10(20896, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>维度</span>
 | 
			
		||||
                <input @blur="blurChange10(20897, $event)" v-model="inputData[20897]" @input="changeCount10(20897, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>1#内遮阳全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20683, $event)" v-model="inputData[20683]" @input="change(20683, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20684, $event)" v-model="inputData[20684]" @input="change(20684, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20685, $event)" v-model="inputData[20685]" @input="change(20685, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>2#内遮阳全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20686, $event)" v-model="inputData[20686]" @input="change(20686, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20687, $event)" v-model="inputData[20687]" @input="change(20687, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20688, $event)" v-model="inputData[20688]" @input="change(20688, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>1#外遮阳全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20689, $event)" v-model="inputData[20689]" @input="change(20689, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20690, $event)" v-model="inputData[20690]" @input="change(20690, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20691, $event)" v-model="inputData[20691]" @input="change(20691, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>2#外遮阳全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20692, $event)" v-model="inputData[20692]" @input="change(20692, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20693, $event)" v-model="inputData[20693]" @input="change(20693, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20694, $event)" v-model="inputData[20694]" @input="change(20694, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>1#内保温全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20695, $event)" v-model="inputData[20695]" @input="change(20695, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20696, $event)" v-model="inputData[20696]" @input="change(20696, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20697, $event)" v-model="inputData[20697]" @input="change(20697, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>2#内保温全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20698, $event)" v-model="inputData[20698]" @input="change(20698, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20699, $event)" v-model="inputData[20699]" @input="change(20699, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20700, $event)" v-model="inputData[20700]" @input="change(20700, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>1#湿帘窗全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20701, $event)" v-model="inputData[20701]" @input="change(20701, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20702, $event)" v-model="inputData[20702]" @input="change(20702, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20703, $event)" v-model="inputData[20703]" @input="change(20703, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>2#湿帘窗全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20704, $event)" v-model="inputData[20704]" @input="change(20704, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20705, $event)" v-model="inputData[20705]" @input="change(20705, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20706, $event)" v-model="inputData[20706]" @input="change(20706, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>立面保温1全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20741, $event)" v-model="inputData[20741]" @input="change(20741, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20742, $event)" v-model="inputData[20742]" @input="change(20742, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20743, $event)" v-model="inputData[20743]" @input="change(20743, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>立面保温2全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20744, $event)" v-model="inputData[20744]" @input="change(20744, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20745, $event)" v-model="inputData[20745]" @input="change(20745, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20746, $event)" v-model="inputData[20746]" @input="change(20746, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>立面保温3全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20747, $event)" v-model="inputData[20747]" @input="change(20747, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20748, $event)" v-model="inputData[20748]" @input="change(20748, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20749, $event)" v-model="inputData[20749]" @input="change(20749, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flex-view border-none shrink-none padding-none">
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
                <span>立面保温4全程运行时间</span>
 | 
			
		||||
                <input @blur="blurChange(20750, $event)" v-model="inputData[20750]" @input="change(20750, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>打开输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20751, $event)" v-model="inputData[20751]" @input="change(20751, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
                <span>关闭输出通道:</span>
 | 
			
		||||
                <input @blur="blurChange(20752, $event)" v-model="inputData[20752]" @input="change(20752, $event)"
 | 
			
		||||
                 type="text" placeholder="0">
 | 
			
		||||
            </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 },],
 | 
			
		||||
            list1:[20650,20652,20654,20656,20658,20660,20662,20664],
 | 
			
		||||
            typeList2: [
 | 
			
		||||
            { label: '东', value: 1 },
 | 
			
		||||
            { label: '西', value: 2 },
 | 
			
		||||
            { label: '南', value: 3 },
 | 
			
		||||
            { label: '北', value: 4 },
 | 
			
		||||
            { label: '东南', value: 5 },
 | 
			
		||||
            { label: '东北', value: 6 },
 | 
			
		||||
            { label: '西南', value: 7 },
 | 
			
		||||
            { label: '西北', value: 8 },],
 | 
			
		||||
            list2:[20668,20672,20676,20680,20734,20738],
 | 
			
		||||
            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.intrinsicParameter(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))
 | 
			
		||||
                    this.inputData[20896] =this.countData10(this.inputData[20896]);
 | 
			
		||||
                    this.inputData[20897] =this.countData10(this.inputData[20897]);
 | 
			
		||||
                    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.postControlWrite(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>
 | 
			
		||||
  
 | 
			
		||||
							
								
								
									
										908
									
								
								src/views/page/irrigateSet-soil.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										908
									
								
								src/views/page/irrigateSet-soil.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,908 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="irrigateSet">
 | 
			
		||||
    <div class="table-title">
 | 
			
		||||
        <img src="../../assets/image/irrigateSet.png" alt="" />
 | 
			
		||||
      {{this.indexs}}#智能灌溉组
 | 
			
		||||
        <!-- <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="blurChange('1' + (10 + (indexs - 1)) + '37', $event)" v-model="inputData['1' + (10 + (indexs - 1)) + '37']"
 | 
			
		||||
              @input="change('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="blurChange('1' + (10 + (indexs - 1)) + '38', $event)" v-model="inputData['1' + (10 + (indexs - 1)) + '38']"
 | 
			
		||||
              @input="change('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)) + '72', $event)" v-model="inputData['1' + (10 + (indexs - 1)) + '72']"
 | 
			
		||||
                @input="change('1' + (10 + (indexs - 1)) + '72', $event)" type="number" placeholder="0" />
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div>
 | 
			
		||||
            <div class="input-main-80">
 | 
			
		||||
              <span>启动低液位值</span>
 | 
			
		||||
              <input @blur="blurChange('1' + (10 + (indexs - 1)) + '73', $event)" v-model="inputData['1' + (10 + (indexs - 1)) + '73']"
 | 
			
		||||
                @input="change('1' + (10 + (indexs - 1)) + '73', $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)) + '74', $event)" v-model="inputData['1' + (10 + (indexs - 1)) + '74']"
 | 
			
		||||
                @input="change('1' + (10 + (indexs - 1)) + '74', $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,
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  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.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;
 | 
			
		||||
    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)) + "53"]);
 | 
			
		||||
          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.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>
 | 
			
		||||
@ -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,72 @@ 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);
 | 
			
		||||
                    }
 | 
			
		||||
                })
 | 
			
		||||
                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);
 | 
			
		||||
                    }
 | 
			
		||||
                })
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										451
									
								
								src/views/page/sensorSet-soil.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										451
									
								
								src/views/page/sensorSet-soil.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,451 @@
 | 
			
		||||
<template>
 | 
			
		||||
    <div class="irrigateSet sensorSet">
 | 
			
		||||
        <div class="table-title">
 | 
			
		||||
                <img src="../../assets/image/sensor.png" alt=""> 传感器配置界面
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="sensor-view">
 | 
			
		||||
                <div class="left scroll">
 | 
			
		||||
                    <div @click="toIndex(index)" :class="active == index ? 'active' : ''" v-for="item, index in 6"
 | 
			
		||||
                        :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>
 | 
			
		||||
    </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
    data() {
 | 
			
		||||
        return {
 | 
			
		||||
            active: 0,
 | 
			
		||||
            sel1: true,
 | 
			
		||||
            sel2: false,
 | 
			
		||||
            sel3: false,
 | 
			
		||||
            numberList: [273, 278, 283, 288, 293, 298],
 | 
			
		||||
            inputData: [],
 | 
			
		||||
            inputDataNew:[],
 | 
			
		||||
            sensorType:'',//当前传感器类型
 | 
			
		||||
            openList: [],//当前有效的传感器
 | 
			
		||||
            typeList:this.$store.state.typeList,
 | 
			
		||||
      loading:null,
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    watch:{
 | 
			
		||||
        'active'(newVal,oldVal){
 | 
			
		||||
            this.getSensorType()
 | 
			
		||||
            // this.getCountData()
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
    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 < 48; 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 < 6; 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(){
 | 
			
		||||
            this.typeList.forEach((el,index)=>{
 | 
			
		||||
                if(el.value==this.inputData[this.numberList[this.active]]){
 | 
			
		||||
                    this.sensorType=el.label
 | 
			
		||||
                }
 | 
			
		||||
            })
 | 
			
		||||
        },
 | 
			
		||||
        toIndex(index) {
 | 
			
		||||
            this.active = index
 | 
			
		||||
        },
 | 
			
		||||
        padString(str, length) {
 | 
			
		||||
            return str.padStart(length, '0');
 | 
			
		||||
        },
 | 
			
		||||
        changeOpen() {
 | 
			
		||||
            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])) {
 | 
			
		||||
                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.changeBtn('272', dataNum);
 | 
			
		||||
        },
 | 
			
		||||
        getData272() {
 | 
			
		||||
            var inputData = this.inputData
 | 
			
		||||
            var list1 = this.padString(inputData['272'].toString(2), 6)
 | 
			
		||||
            var number = 6
 | 
			
		||||
            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)
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        },
 | 
			
		||||
        dataInit() {
 | 
			
		||||
            var store = this.$store.state
 | 
			
		||||
            var data = {
 | 
			
		||||
                equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
 | 
			
		||||
                pattern: 272, //需要根据文档填写 //6目标ph-数值
 | 
			
		||||
                regNum: 31,//从pattern取多少个数据
 | 
			
		||||
            };
 | 
			
		||||
            this.api.postReg(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.postWriteFs(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 < 48; 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>
 | 
			
		||||
    
 | 
			
		||||
							
								
								
									
										308
									
								
								src/views/page/systemSet-soil.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										308
									
								
								src/views/page/systemSet-soil.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,308 @@
 | 
			
		||||
<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>
 | 
			
		||||
    </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
    data() {
 | 
			
		||||
        return {
 | 
			
		||||
            inputData: [],
 | 
			
		||||
          loading:null,
 | 
			
		||||
          ICCID:''
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    
 | 
			
		||||
    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); 
 | 
			
		||||
                }
 | 
			
		||||
            })
 | 
			
		||||
        },
 | 
			
		||||
        getType(index) {
 | 
			
		||||
            if (index == 0) {
 | 
			
		||||
                return '智能灌溉控制器正常'
 | 
			
		||||
            } else if (index == 1) {
 | 
			
		||||
                return '智能灌溉控制器待锁机'
 | 
			
		||||
            } else if (index == 2) {
 | 
			
		||||
                return '智能灌溉控制器已锁机'
 | 
			
		||||
            } else {
 | 
			
		||||
                return ' '
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
    //全选文本
 | 
			
		||||
    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>
 | 
			
		||||
    
 | 
			
		||||
							
								
								
									
										288
									
								
								src/views/page/upload-soil.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										288
									
								
								src/views/page/upload-soil.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,288 @@
 | 
			
		||||
<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">
 | 
			
		||||
                        <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>
 | 
			
		||||
    </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
    data() {
 | 
			
		||||
        return {
 | 
			
		||||
            actList1: [],
 | 
			
		||||
            actList1New: [],
 | 
			
		||||
            list1: ['室外平均温度传感器',
 | 
			
		||||
                '室外平均湿度传感器',
 | 
			
		||||
                '室外平均光照传感器',
 | 
			
		||||
                '室外平均风速传感器',
 | 
			
		||||
                '室外平均风向传感器',
 | 
			
		||||
                '室外平均雨雪传感器',
 | 
			
		||||
                '室外平均雨量传感器',
 | 
			
		||||
                '气象站电池电压(V)',
 | 
			
		||||
                '气象站信号强度(RSSI)',
 | 
			
		||||
                '气象站信噪比(SNR)',
 | 
			
		||||
                '室外平均露点温度',
 | 
			
		||||
                '室外平均C02传感器',
 | 
			
		||||
                '室外平均土温传感器',
 | 
			
		||||
                '室外平均土湿传感器',
 | 
			
		||||
                '室外平均大气压传感器',
 | 
			
		||||
                "室外平均太阳总辐射传感器",],
 | 
			
		||||
            actList2: [],
 | 
			
		||||
            actList2New: [],
 | 
			
		||||
            list2: ['目标水肥PH数据',
 | 
			
		||||
                '目标水肥EC数据',
 | 
			
		||||
                '平均水肥PH数据',
 | 
			
		||||
                '平均水肥EC数据',
 | 
			
		||||
                '1#水肥PH数据',
 | 
			
		||||
                '1#水肥EC数据',
 | 
			
		||||
                '2#水肥PH数据',
 | 
			
		||||
                '2#水肥EC数据',
 | 
			
		||||
                '1#通道传感器数据',
 | 
			
		||||
                '2#通道传感器数据',
 | 
			
		||||
                '3#通道传感器数据',
 | 
			
		||||
                '4#通道传感器数据',
 | 
			
		||||
                '5#通道传感器数据',
 | 
			
		||||
                '6#通道传感器数据',
 | 
			
		||||
                "1#水温传感器数据",
 | 
			
		||||
                "2#水温传感器数据",
 | 
			
		||||
                ],
 | 
			
		||||
            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), 16)
 | 
			
		||||
            this.actList2New=num2.split("")
 | 
			
		||||
            this.actList2New.forEach((el,index)=>{
 | 
			
		||||
                if(el=='1'){
 | 
			
		||||
                    this.actList2.push(this.actList2New.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()
 | 
			
		||||
                } 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.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
 | 
			
		||||
          });
 | 
			
		||||
        },
 | 
			
		||||
        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('500', 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'
 | 
			
		||||
            })
 | 
			
		||||
            console.log(this.actList2,this.actList2New,this.actList2New.join(""));
 | 
			
		||||
            var num = this.actList2New.join("");
 | 
			
		||||
            var dataNum = {
 | 
			
		||||
                target: {
 | 
			
		||||
                    value: parseInt(num, 2),
 | 
			
		||||
                },
 | 
			
		||||
            };
 | 
			
		||||
            this.changeBtn('501', dataNum);
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss"></style>
 | 
			
		||||
    
 | 
			
		||||
							
								
								
									
										27
									
								
								src/views/soil.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								src/views/soil.vue
									
									
									
									
									
										Normal file
									
								
							@ -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>
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user