|
@@ -1,96 +1,97 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="auto-fertilization-container">
|
|
<view class="auto-fertilization-container">
|
|
|
- <!-- 顶部导航栏 -->
|
|
|
|
|
- <view class="nav-bar">
|
|
|
|
|
- <view class="nav-left">
|
|
|
|
|
- <text class="back-icon">←</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="nav-center">
|
|
|
|
|
- <text class="nav-title">自动施肥</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="nav-right">
|
|
|
|
|
- <text class="nav-icon">⋯</text>
|
|
|
|
|
- <text class="nav-icon">⚙️</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <custom-card>
|
|
|
|
|
+ <block slot="backText">自动施肥</block>
|
|
|
|
|
+ </custom-card>
|
|
|
<!-- 内容区域 -->
|
|
<!-- 内容区域 -->
|
|
|
<view class="content">
|
|
<view class="content">
|
|
|
<!-- 灌溉模式 -->
|
|
<!-- 灌溉模式 -->
|
|
|
- <view class="setting-item">
|
|
|
|
|
- <text class="setting-label">灌溉模式</text>
|
|
|
|
|
- <view class="radio-group">
|
|
|
|
|
- <label class="radio-item" :class="{ active: irrigationMode === '定时' }" @click="irrigationMode = '定时'">
|
|
|
|
|
- <radio value="定时" :checked="irrigationMode === '定时'" color="#14a478" />
|
|
|
|
|
- <text>定时</text>
|
|
|
|
|
- </label>
|
|
|
|
|
- <label class="radio-item" :class="{ active: irrigationMode === '定量' }" @click="irrigationMode = '定量'">
|
|
|
|
|
- <radio value="定量" :checked="irrigationMode === '定量'" color="#14a478" />
|
|
|
|
|
- <text>定量</text>
|
|
|
|
|
- </label>
|
|
|
|
|
- <label class="radio-item" :class="{ active: irrigationMode === '禁用' }" @click="irrigationMode = '禁用'">
|
|
|
|
|
- <radio value="禁用" :checked="irrigationMode === '禁用'" color="#14a478" />
|
|
|
|
|
- <text>禁用</text>
|
|
|
|
|
- </label>
|
|
|
|
|
|
|
+ <view class="setting-top-container">
|
|
|
|
|
+ <view class="setting-item">
|
|
|
|
|
+ <text class="setting-label">灌溉模式</text>
|
|
|
|
|
+ <view class="radio-group">
|
|
|
|
|
+ <view class="group-check-container" @click="selectFertType('1')">
|
|
|
|
|
+ <view class="group-check-radius" :class="{'active': FertType == '1'}">
|
|
|
|
|
+ <u-icon class="check-icon" name="checkmark" size="24rpx" v-if="FertType == '1'"/>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <text class="text" :class="FertType == '1'?'text-active':''">定时</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="group-check-container" @click="selectFertType('2')" :class="{'active': FertType == '2'}" style="width: 150rpx;">
|
|
|
|
|
+ <view class="group-check-radius" :class="{'active': FertType == '2'}">
|
|
|
|
|
+ <u-icon class="check-icon" name="checkmark" size="24rpx" v-if="FertType == '2'"/>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <text class="text" :class="FertType == '2'?'text-active':''">定量</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="group-check-container" @click="selectFertType('0')" :class="{'active': FertType == '0'}">
|
|
|
|
|
+ <view class="group-check-radius" :class="{'active': FertType == '0'}">
|
|
|
|
|
+ <u-icon class="check-icon" name="checkmark" size="24rpx" v-if="FertType == '0'"/>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <text class="text" :class="FertType == '0'?'text-active':''">禁用</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
|
|
|
- <!-- 配方方式 -->
|
|
|
|
|
- <view class="setting-item">
|
|
|
|
|
- <text class="setting-label">配方方式</text>
|
|
|
|
|
- <view class="radio-group">
|
|
|
|
|
- <label class="radio-item" :class="{ active: formulaMode === 'PID' }" @click="formulaMode = 'PID'">
|
|
|
|
|
- <radio value="PID" :checked="formulaMode === 'PID'" color="#14a478" />
|
|
|
|
|
- <text>PID</text>
|
|
|
|
|
- </label>
|
|
|
|
|
- <label class="radio-item" :class="{ active: formulaMode === '水肥比例' }" @click="formulaMode = '水肥比例'">
|
|
|
|
|
- <radio value="水肥比例" :checked="formulaMode === '水肥比例'" color="#14a478" />
|
|
|
|
|
- <text>水肥比例</text>
|
|
|
|
|
- </label>
|
|
|
|
|
- <label class="radio-item" :class="{ active: formulaMode === '禁用' }" @click="formulaMode = '禁用'">
|
|
|
|
|
- <radio value="禁用" :checked="formulaMode === '禁用'" color="#14a478" />
|
|
|
|
|
- <text>禁用</text>
|
|
|
|
|
- </label>
|
|
|
|
|
|
|
+ <!-- 配方方式 -->
|
|
|
|
|
+ <view class="setting-item">
|
|
|
|
|
+ <text class="setting-label">配方方式</text>
|
|
|
|
|
+ <view class="radio-group">
|
|
|
|
|
+ <view class="group-check-container" @click="selectFertPidType('1')" >
|
|
|
|
|
+ <view class="group-check-radius" :class="{'active': FertPidType == '1'}">
|
|
|
|
|
+ <u-icon class="check-icon" name="checkmark" size="24rpx" v-if="FertPidType == '1'"/>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <text class="text" :class="FertPidType == '1'?'text-active':''">PID</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="group-check-container" @click="selectFertPidType('2')" :class="{'active': FertPidType == '2'}" style="width: 150rpx;">
|
|
|
|
|
+ <view class="group-check-radius" :class="{'active': FertPidType == '2'}">
|
|
|
|
|
+ <u-icon class="check-icon" name="checkmark" size="24rpx" v-if="FertPidType == '2'"/>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <text class="text" :class="FertPidType == '2'?'text-active':''">水费比例</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="group-check-container" @click="selectFertPidType('0')" :class="{'active': FertPidType == '0'}">
|
|
|
|
|
+ <view class="group-check-radius" :class="{'active': FertPidType == '0'}">
|
|
|
|
|
+ <u-icon class="check-icon" name="checkmark" size="24rpx" v-if="FertPidType == '0'"/>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <text class="text" :class="FertPidType == '0'?'text-active':''">禁用</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
|
|
|
- <!-- 轮灌次数 -->
|
|
|
|
|
- <view class="setting-item">
|
|
|
|
|
- <text class="setting-label">轮灌次数</text>
|
|
|
|
|
- <view class="number-input">
|
|
|
|
|
- <text class="number-btn" @click="decreaseRoundCount">−</text>
|
|
|
|
|
- <text class="number-value">{{ roundCount }}</text>
|
|
|
|
|
- <text class="number-btn" @click="increaseRoundCount">+</text>
|
|
|
|
|
|
|
+ <!-- 轮灌次数 -->
|
|
|
|
|
+ <view class="setting-item">
|
|
|
|
|
+ <text class="setting-label">轮灌次数</text>
|
|
|
|
|
+ <view class="number-input">
|
|
|
|
|
+ <u-number-box v-model="IrrCnt" placeholder="请输入轮灌次数" min="1" max="9999999" @change="irrChange(IrrCnt)"></u-number-box>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
|
|
|
- <!-- 轮灌间隔 -->
|
|
|
|
|
- <view class="setting-item">
|
|
|
|
|
- <text class="setting-label">轮灌间隔</text>
|
|
|
|
|
- <view class="time-input">
|
|
|
|
|
- <input type="number" v-model="roundInterval" class="time-input-field" />
|
|
|
|
|
- <text class="time-unit">分钟</text>
|
|
|
|
|
|
|
+ <!-- 轮灌间隔 -->
|
|
|
|
|
+ <view class="setting-item">
|
|
|
|
|
+ <text class="setting-label">轮灌间隔</text>
|
|
|
|
|
+ <view class="time-input">
|
|
|
|
|
+ <input type="number" v-model="IdleTim" class="time-input-field" min="0" max="1440" placeholder="请输入轮灌间隔(分钟)" @change="idleChange(IdleTim)" />
|
|
|
|
|
+ <text class="time-unit">分钟</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
|
|
|
- <!-- 肥前水 -->
|
|
|
|
|
- <view class="setting-item">
|
|
|
|
|
- <text class="setting-label">肥前水</text>
|
|
|
|
|
- <view class="time-input">
|
|
|
|
|
- <input type="number" v-model="waterBefore" class="time-input-field" />
|
|
|
|
|
- <text class="time-unit">分钟</text>
|
|
|
|
|
|
|
+ <!-- 肥前水 -->
|
|
|
|
|
+ <view class="setting-item">
|
|
|
|
|
+ <text class="setting-label">肥前水</text>
|
|
|
|
|
+ <view class="time-input">
|
|
|
|
|
+ <input type="number" v-model="FrontClearWater" class="time-input-field" min="0" max="1440" placeholder="请输入肥前水(秒)" @change="frontChange(FrontClearWater)" />
|
|
|
|
|
+ <text class="time-unit">秒</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
|
|
|
- <!-- 肥后水 -->
|
|
|
|
|
- <view class="setting-item">
|
|
|
|
|
- <text class="setting-label">肥后水</text>
|
|
|
|
|
- <view class="time-input">
|
|
|
|
|
- <input type="number" v-model="waterAfter" class="time-input-field" />
|
|
|
|
|
- <text class="time-unit">分钟</text>
|
|
|
|
|
|
|
+ <!-- 肥后水 -->
|
|
|
|
|
+ <view class="setting-item">
|
|
|
|
|
+ <text class="setting-label">肥后水</text>
|
|
|
|
|
+ <view class="time-input">
|
|
|
|
|
+ <input type="number" v-model="UnderClearWater" class="time-input-field" min="0" max="1440" placeholder="请输入肥后水(秒)" @change="underChange(UnderClearWater)" />
|
|
|
|
|
+ <text class="time-unit">秒</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+ <u-picker :show="show" :columns="columns"></u-picker>
|
|
|
<!-- 定时轮灌组 -->
|
|
<!-- 定时轮灌组 -->
|
|
|
<view class="round-groups-section">
|
|
<view class="round-groups-section">
|
|
|
<text class="section-title">定时轮灌组</text>
|
|
<text class="section-title">定时轮灌组</text>
|
|
@@ -98,61 +99,53 @@
|
|
|
<!-- 左侧轮灌组列表 -->
|
|
<!-- 左侧轮灌组列表 -->
|
|
|
<view class="round-groups-list">
|
|
<view class="round-groups-list">
|
|
|
<view
|
|
<view
|
|
|
- v-for="i in 7"
|
|
|
|
|
- :key="i"
|
|
|
|
|
|
|
+ v-for="(item,index) in group_list" :key="item.group"
|
|
|
class="round-group-item"
|
|
class="round-group-item"
|
|
|
- :class="{ active: selectedGroup === i }"
|
|
|
|
|
- @click="selectedGroup = i"
|
|
|
|
|
|
|
+ @click="selectGroup(index)"
|
|
|
|
|
+ :class="{ active: selectedGroup === index }"
|
|
|
>
|
|
>
|
|
|
- <text>{{ i }}组</text>
|
|
|
|
|
|
|
+ <text :class="{ 'green-text': selectedGroup === index }">{{ index + 1 }}组</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 右侧轮灌组详情 -->
|
|
<!-- 右侧轮灌组详情 -->
|
|
|
<view class="round-group-detail">
|
|
<view class="round-group-detail">
|
|
|
- <!-- 1组 -->
|
|
|
|
|
- <view class="group-detail-item" :class="{ active: selectedGroup === 1 }">
|
|
|
|
|
|
|
+ <view class="group-detail-item" v-for="(item,index) in group_list" :key="item.group" :id="'group-'+index">
|
|
|
<view class="group-header">
|
|
<view class="group-header">
|
|
|
- <text class="group-title">1组</text>
|
|
|
|
|
- <text class="group-check" v-if="selectedGroup === 1">✓</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="group-settings">
|
|
|
|
|
- <view class="setting-row">
|
|
|
|
|
- <text class="setting-row-label">施肥配方</text>
|
|
|
|
|
- <input type="text" placeholder="请输入" class="setting-row-input" />
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="setting-row">
|
|
|
|
|
- <text class="setting-row-label">灌溉时长</text>
|
|
|
|
|
- <input type="number" v-model="irrigationTime1" class="setting-row-input" />
|
|
|
|
|
- <text class="setting-row-unit">分钟</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="setting-row">
|
|
|
|
|
- <text class="setting-row-label">施肥时长</text>
|
|
|
|
|
- <input type="number" v-model="fertilizationTime1" class="setting-row-input" />
|
|
|
|
|
- <text class="setting-row-unit">分钟</text>
|
|
|
|
|
|
|
+ <text class="group-title">{{index + 1}}组</text>
|
|
|
|
|
+ <view class="group-check" :class="{ active: item.selected }" @click="changeGroupStatus(item)">
|
|
|
|
|
+ <u-icon class="check-icon" name="checkmark" size="24rpx" />
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 2组 -->
|
|
|
|
|
- <view class="group-detail-item" :class="{ active: selectedGroup === 2 }">
|
|
|
|
|
- <view class="group-header">
|
|
|
|
|
- <text class="group-title">2组</text>
|
|
|
|
|
- <text class="group-check" v-if="selectedGroup === 2">✓</text>
|
|
|
|
|
- </view>
|
|
|
|
|
<view class="group-settings">
|
|
<view class="group-settings">
|
|
|
<view class="setting-row">
|
|
<view class="setting-row">
|
|
|
<text class="setting-row-label">施肥配方</text>
|
|
<text class="setting-row-label">施肥配方</text>
|
|
|
- <input type="text" placeholder="请输入" class="setting-row-input" />
|
|
|
|
|
|
|
+ <view @click="selectFormula(index)" class="select-group">选择配方</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="setting-row">
|
|
<view class="setting-row">
|
|
|
<text class="setting-row-label">灌溉时长</text>
|
|
<text class="setting-row-label">灌溉时长</text>
|
|
|
- <input type="number" v-model="irrigationTime2" class="setting-row-input" />
|
|
|
|
|
|
|
+ <input
|
|
|
|
|
+ type="number"
|
|
|
|
|
+ v-model="item.PartTim"
|
|
|
|
|
+ class="setting-row-input"
|
|
|
|
|
+ min="0"
|
|
|
|
|
+ max="1440"
|
|
|
|
|
+ placeholder="请输入灌溉时长(分钟)"
|
|
|
|
|
+ @change="(item) => PartTimChange(item)"
|
|
|
|
|
+ />
|
|
|
<text class="setting-row-unit">分钟</text>
|
|
<text class="setting-row-unit">分钟</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="setting-row">
|
|
<view class="setting-row">
|
|
|
<text class="setting-row-label">施肥时长</text>
|
|
<text class="setting-row-label">施肥时长</text>
|
|
|
- <input type="number" v-model="fertilizationTime2" class="setting-row-input" />
|
|
|
|
|
|
|
+ <input
|
|
|
|
|
+ type="number"
|
|
|
|
|
+ v-model="item.FertTim"
|
|
|
|
|
+ class="setting-row-input"
|
|
|
|
|
+ min="0"
|
|
|
|
|
+ max="1440"
|
|
|
|
|
+ placeholder="请输入施肥时长(分钟)"
|
|
|
|
|
+ @change="(item) => FertTimChange(item)"
|
|
|
|
|
+ />
|
|
|
<text class="setting-row-unit">分钟</text>
|
|
<text class="setting-row-unit">分钟</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -161,13 +154,6 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
- <!-- 底部确定按钮 -->
|
|
|
|
|
- <view class="confirm-btn-container">
|
|
|
|
|
- <view class="confirm-btn" @click="confirm">
|
|
|
|
|
- <text class="confirm-btn-text">确定</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -175,29 +161,149 @@
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- // 灌溉模式
|
|
|
|
|
- irrigationMode: '定时',
|
|
|
|
|
- // 配方方式
|
|
|
|
|
- formulaMode: 'PID',
|
|
|
|
|
- // 轮灌次数
|
|
|
|
|
- roundCount: 1,
|
|
|
|
|
- // 轮灌间隔(分钟)
|
|
|
|
|
- roundInterval: 0,
|
|
|
|
|
- // 肥前水(分钟)
|
|
|
|
|
- waterBefore: 0,
|
|
|
|
|
- // 肥后水(分钟)
|
|
|
|
|
- waterAfter: 0,
|
|
|
|
|
- // 选中的轮灌组
|
|
|
|
|
- selectedGroup: 1,
|
|
|
|
|
|
|
+ show: true,
|
|
|
|
|
+ devBid:'',
|
|
|
|
|
+ columns: [ ['中国', '美国', '日本']],
|
|
|
|
|
+ selectedGroup: 0,
|
|
|
// 1组设置
|
|
// 1组设置
|
|
|
irrigationTime1: 0,
|
|
irrigationTime1: 0,
|
|
|
fertilizationTime1: 0,
|
|
fertilizationTime1: 0,
|
|
|
// 2组设置
|
|
// 2组设置
|
|
|
irrigationTime2: 0,
|
|
irrigationTime2: 0,
|
|
|
- fertilizationTime2: 0
|
|
|
|
|
|
|
+ fertilizationTime2: 0,
|
|
|
|
|
+ FertType: -1,
|
|
|
|
|
+ FertPidType: -1,
|
|
|
|
|
+ IrrCnt: 0,
|
|
|
|
|
+ IdleTim: 0,
|
|
|
|
|
+ FrontClearWater: 0,
|
|
|
|
|
+ UnderClearWater: 0,
|
|
|
|
|
+ group_list:[]
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ onLoad(options) {
|
|
|
|
|
+ const { devBid } = options;
|
|
|
|
|
+ this.devBid = devBid;
|
|
|
|
|
+ this.getConfigInfo();
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ /*
|
|
|
|
|
+ FertType = '1' && editGroup({FertType: '1'})
|
|
|
|
|
+ */
|
|
|
|
|
+ selectFertType(type){
|
|
|
|
|
+ this.FertType = type;
|
|
|
|
|
+ this.editGroup({
|
|
|
|
|
+ FertType: type,
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ selectFertPidType(type){
|
|
|
|
|
+ this.FertPidType = type;
|
|
|
|
|
+ this.editGroup({
|
|
|
|
|
+ FertPidType: type,
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ underChange(val){
|
|
|
|
|
+ this.UnderClearWater = val;
|
|
|
|
|
+ this.editGroup({UnderClearWater: val});
|
|
|
|
|
+ },
|
|
|
|
|
+ PartTimChange(item){
|
|
|
|
|
+ console.log(item,'itemitmeimteimte')
|
|
|
|
|
+ if(item.selected){
|
|
|
|
|
+ this.editGroup({group_value: item.group_value, PartTim: item.PartTim});
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ FertTimChange(item){
|
|
|
|
|
+ if(item.selected){
|
|
|
|
|
+ this.editGroup({group_value: item.group_value, FertTim: item.FertTim});
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ frontChange(val){
|
|
|
|
|
+ this.FrontClearWater = val;
|
|
|
|
|
+ this.editGroup({FrontClearWater: val});
|
|
|
|
|
+ },
|
|
|
|
|
+ idleChange(val){
|
|
|
|
|
+ this.IdleTim = val;
|
|
|
|
|
+ this.editGroup({IdleTim: val});
|
|
|
|
|
+ },
|
|
|
|
|
+ irrChange(val){
|
|
|
|
|
+ this.IrrCnt = val;
|
|
|
|
|
+ this.editGroup({IrrCnt: val});
|
|
|
|
|
+ },
|
|
|
|
|
+ selectFormula(index){
|
|
|
|
|
+ this.show = true;
|
|
|
|
|
+ console.log(index,'indexnidex')
|
|
|
|
|
+ },
|
|
|
|
|
+ async editGroup(data){
|
|
|
|
|
+ console.log('editGroup data:', data);
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ devBid: parseInt(this.devBid),
|
|
|
|
|
+ data,
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log('editGroup params:', params);
|
|
|
|
|
+ const res = await this.$myRequest({
|
|
|
|
|
+ url:'/api/v2/iot/device/sf/yunshang/auto/config/edit/',
|
|
|
|
|
+ method:'POST',
|
|
|
|
|
+ data: params,
|
|
|
|
|
+ header: {
|
|
|
|
|
+ 'Content-Type': 'application/json',
|
|
|
|
|
+ 'accept': 'application/json, text/plain, */*'
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ if(res?.code === '000000'){
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '保存成功',
|
|
|
|
|
+ icon: 'success',
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ async getConfigInfo(){
|
|
|
|
|
+ const res = await this.$myRequest({
|
|
|
|
|
+ url:'/api/v2/iot/device/sf/yunshang/auto/config/info/',
|
|
|
|
|
+ method:'post',
|
|
|
|
|
+ data: {
|
|
|
|
|
+ devBid: String(this.devBid),
|
|
|
|
|
+ },
|
|
|
|
|
+ })
|
|
|
|
|
+ const resData = res || {};
|
|
|
|
|
+ this.FertPidType = resData?.FertPidType;
|
|
|
|
|
+ this.FertType = resData?.FertType;
|
|
|
|
|
+ this.IrrCnt = resData?.IrrCnt;
|
|
|
|
|
+ this.IdleTim = resData?.IdleTim;
|
|
|
|
|
+ this.FrontClearWater = resData?.FrontClearWater;
|
|
|
|
|
+ this.UnderClearWater = resData?.UnderClearWater;
|
|
|
|
|
+ const group_list = resData.group_list || [];
|
|
|
|
|
+ this.group_list = group_list.map((item, index) => {
|
|
|
|
|
+ const selected = item.group_value == 1 ? true : false;
|
|
|
|
|
+ for (let key in item) {
|
|
|
|
|
+ if (key.includes('PartTim')) {
|
|
|
|
|
+ item.PartTim = item[key];
|
|
|
|
|
+ } else if (key.includes('FertTim')) {
|
|
|
|
|
+ item.FertTim = item[key];
|
|
|
|
|
+ } else if (key.includes('Formula')) {
|
|
|
|
|
+ item.Formula = item[key];
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ selected
|
|
|
|
|
+ };
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ changeGroupStatus(item) {
|
|
|
|
|
+ item.selected = !item.selected;
|
|
|
|
|
+ this.editGroup({group_value: item.group_value});
|
|
|
|
|
+ },
|
|
|
|
|
+ selectGroup(index) {
|
|
|
|
|
+ this.selectedGroup = index;
|
|
|
|
|
+ uni.createSelectorQuery().select('#group-' + index).boundingClientRect((data) => {
|
|
|
|
|
+ if (data) {
|
|
|
|
|
+ uni.pageScrollTo({
|
|
|
|
|
+ scrollTop: data.top,
|
|
|
|
|
+ duration: 300
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }).exec();
|
|
|
|
|
+ },
|
|
|
// 减少轮灌次数
|
|
// 减少轮灌次数
|
|
|
decreaseRoundCount() {
|
|
decreaseRoundCount() {
|
|
|
if (this.roundCount > 1) {
|
|
if (this.roundCount > 1) {
|
|
@@ -221,47 +327,54 @@ export default {
|
|
|
.auto-fertilization-container {
|
|
.auto-fertilization-container {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
min-height: 100vh;
|
|
min-height: 100vh;
|
|
|
- background: linear-gradient(180deg, #e6f7f2 0%, #f5f5f5 100%);
|
|
|
|
|
|
|
+ background: linear-gradient(180deg, #f5f6fa00 0%, #F5F6FA 23.64%, #F5F6FA 100%), linear-gradient(102deg, #BFEADD 6.77%, #B8F1E7 40.15%, #B9EEF5 84.02%);
|
|
|
font-family: 'Source Han Sans CN';
|
|
font-family: 'Source Han Sans CN';
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-/* 顶部导航栏 */
|
|
|
|
|
-.nav-bar {
|
|
|
|
|
|
|
+.group-check-container{
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ width: 120rpx;
|
|
|
|
|
+}
|
|
|
|
|
+.select-group{
|
|
|
|
|
+ text-align:right;
|
|
|
|
|
+}
|
|
|
|
|
+.group-check-radius{
|
|
|
|
|
+ width: 30rpx;
|
|
|
|
|
+ height: 30rpx;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
|
|
- padding: 20rpx 32rpx;
|
|
|
|
|
- background: linear-gradient(180deg, #14a478 0%, #0f8a64 100%);
|
|
|
|
|
- color: #fff;
|
|
|
|
|
-
|
|
|
|
|
- .nav-left {
|
|
|
|
|
- .back-icon {
|
|
|
|
|
- font-size: 32rpx;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .nav-center {
|
|
|
|
|
- .nav-title {
|
|
|
|
|
- font-size: 32rpx;
|
|
|
|
|
- font-weight: 500;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .nav-right {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- gap: 24rpx;
|
|
|
|
|
-
|
|
|
|
|
- .nav-icon {
|
|
|
|
|
- font-size: 28rpx;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ border-radius: 50%;
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+ border: 2rpx solid #E4E7ED;
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+ color: #14a478;
|
|
|
|
|
+ margin-right: 10rpx;
|
|
|
|
|
+}
|
|
|
|
|
+.active{
|
|
|
|
|
+ border-color: #0BBC58;
|
|
|
|
|
+}
|
|
|
|
|
+.text{
|
|
|
|
|
+ color: #666666;
|
|
|
|
|
+ font-family: "Source Han Sans CN VF";
|
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
|
+}
|
|
|
|
|
+.text-active{
|
|
|
|
|
+ color: #0BBC58;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
/* 内容区域 */
|
|
/* 内容区域 */
|
|
|
.content {
|
|
.content {
|
|
|
|
|
+ overflow-y: auto;
|
|
|
|
|
+ width: calc(100% - 64rpx);
|
|
|
|
|
+ margin-left: 32rpx;
|
|
|
|
|
+ display:flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+}
|
|
|
|
|
+.setting-top-container{
|
|
|
|
|
+ border: 2px solid #FFF;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
padding: 32rpx;
|
|
padding: 32rpx;
|
|
|
|
|
+ background: #FFF;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
/* 设置项 */
|
|
/* 设置项 */
|
|
|
.setting-item {
|
|
.setting-item {
|
|
|
display: flex;
|
|
display: flex;
|
|
@@ -286,7 +399,7 @@ export default {
|
|
|
gap: 8rpx;
|
|
gap: 8rpx;
|
|
|
font-size: 26rpx;
|
|
font-size: 26rpx;
|
|
|
color: #666;
|
|
color: #666;
|
|
|
-
|
|
|
|
|
|
|
+ width: 120rpx;
|
|
|
&.active {
|
|
&.active {
|
|
|
color: #14a478;
|
|
color: #14a478;
|
|
|
}
|
|
}
|
|
@@ -330,13 +443,11 @@ export default {
|
|
|
gap: 8rpx;
|
|
gap: 8rpx;
|
|
|
|
|
|
|
|
.time-input-field {
|
|
.time-input-field {
|
|
|
- width: 100rpx;
|
|
|
|
|
|
|
+ flex:1;
|
|
|
height: 52rpx;
|
|
height: 52rpx;
|
|
|
padding: 0 16rpx;
|
|
padding: 0 16rpx;
|
|
|
font-size: 26rpx;
|
|
font-size: 26rpx;
|
|
|
- text-align: center;
|
|
|
|
|
- border: 1rpx solid #d9d9d9;
|
|
|
|
|
- border-radius: 8rpx;
|
|
|
|
|
|
|
+ text-align: right;
|
|
|
color: #042118;
|
|
color: #042118;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -350,24 +461,23 @@ export default {
|
|
|
/* 轮灌组区域 */
|
|
/* 轮灌组区域 */
|
|
|
.round-groups-section {
|
|
.round-groups-section {
|
|
|
margin-top: 40rpx;
|
|
margin-top: 40rpx;
|
|
|
-
|
|
|
|
|
|
|
+ flex:1;
|
|
|
.section-title {
|
|
.section-title {
|
|
|
font-size: 28rpx;
|
|
font-size: 28rpx;
|
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
|
color: #042118;
|
|
color: #042118;
|
|
|
- margin-bottom: 24rpx;
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.round-groups-container {
|
|
.round-groups-container {
|
|
|
|
|
+ margin-top: 24rpx;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- background: #fff;
|
|
|
|
|
border-radius: 12rpx;
|
|
border-radius: 12rpx;
|
|
|
- box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ flex:1;
|
|
|
/* 左侧轮灌组列表 */
|
|
/* 左侧轮灌组列表 */
|
|
|
.round-groups-list {
|
|
.round-groups-list {
|
|
|
width: 120rpx;
|
|
width: 120rpx;
|
|
|
- border-right: 1rpx solid #e8e8e8;
|
|
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+ border-radius: 8rpx;
|
|
|
|
|
|
|
|
.round-group-item {
|
|
.round-group-item {
|
|
|
height: 80rpx;
|
|
height: 80rpx;
|
|
@@ -376,30 +486,39 @@ export default {
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
font-size: 26rpx;
|
|
font-size: 26rpx;
|
|
|
color: #666;
|
|
color: #666;
|
|
|
- border-bottom: 1rpx solid #f0f0f0;
|
|
|
|
|
|
|
+ border-left-top-radius: 16rpx;
|
|
|
|
|
+ border-left-bottom-radius: 16rpx;
|
|
|
|
|
|
|
|
&.active {
|
|
&.active {
|
|
|
- background: #e6f7f2;
|
|
|
|
|
- color: #14a478;
|
|
|
|
|
- font-weight: 500;
|
|
|
|
|
|
|
+ background: #F5F6FA;
|
|
|
|
|
+ color:#0BBC58;
|
|
|
|
|
+ font-weight: 700;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&:last-child {
|
|
&:last-child {
|
|
|
border-bottom: none;
|
|
border-bottom: none;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .green-text {
|
|
|
|
|
+ color: #14a478;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 右侧轮灌组详情 */
|
|
/* 右侧轮灌组详情 */
|
|
|
.round-group-detail {
|
|
.round-group-detail {
|
|
|
- flex: 1;
|
|
|
|
|
- padding: 24rpx;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ margin-left: 24rpx;
|
|
|
|
|
+ border-radius: 16rpx;
|
|
|
|
|
+ height: 600rpx;
|
|
|
|
|
+ overflow-y: auto;
|
|
|
.group-detail-item {
|
|
.group-detail-item {
|
|
|
- display: none;
|
|
|
|
|
-
|
|
|
|
|
- &.active {
|
|
|
|
|
- display: block;
|
|
|
|
|
|
|
+ margin-bottom: 32rpx;
|
|
|
|
|
+ padding: 24rpx;
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+ border-radius: 8rpx;
|
|
|
|
|
+ &:last-child {
|
|
|
|
|
+ margin-bottom: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.group-header {
|
|
.group-header {
|
|
@@ -415,15 +534,22 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.group-check {
|
|
.group-check {
|
|
|
- width: 32rpx;
|
|
|
|
|
- height: 32rpx;
|
|
|
|
|
|
|
+ width: 38rpx;
|
|
|
|
|
+ height: 38rpx;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
- background: #14a478;
|
|
|
|
|
- color: #fff;
|
|
|
|
|
|
|
+ background: #C9CDD4;
|
|
|
|
|
+ color: #ffffff;
|
|
|
border-radius: 50%;
|
|
border-radius: 50%;
|
|
|
- font-size: 20rpx;
|
|
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+ .check-icon{
|
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+ &.active {
|
|
|
|
|
+ background: #0BBC58;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -431,6 +557,7 @@ export default {
|
|
|
.setting-row {
|
|
.setting-row {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
margin-bottom: 24rpx;
|
|
margin-bottom: 24rpx;
|
|
|
|
|
|
|
|
.setting-row-label {
|
|
.setting-row-label {
|
|
@@ -444,10 +571,9 @@ export default {
|
|
|
height: 56rpx;
|
|
height: 56rpx;
|
|
|
padding: 0 16rpx;
|
|
padding: 0 16rpx;
|
|
|
font-size: 26rpx;
|
|
font-size: 26rpx;
|
|
|
- border: 1rpx solid #d9d9d9;
|
|
|
|
|
- border-radius: 8rpx;
|
|
|
|
|
color: #042118;
|
|
color: #042118;
|
|
|
margin-right: 12rpx;
|
|
margin-right: 12rpx;
|
|
|
|
|
+ text-align: right;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.setting-row-unit {
|
|
.setting-row-unit {
|