| | |
| | | </view> |
| | | |
| | | <!-- 灌溉开始时间 --> |
| | | <view class="form-item" bindtap="showTimePicker"> |
| | | <view class="form-label">灌溉开始时间</view> |
| | | <view class="form-input time-input"> |
| | | <view class="form-item"> |
| | | <view class="form-label"> |
| | | 灌溉开始时间(选填) |
| | | <image |
| | | class="info-icon" |
| | | src="/images/info.svg" |
| | | mode="aspectFit" |
| | | bindtap="showTimeInfo" |
| | | ></image> |
| | | </view> |
| | | <view class="form-input time-input" bindtap="showTimePicker"> |
| | | <view class="time-text {{startTime ? '' : 'placeholder'}}">{{startTime || '请选择灌溉开始时间'}}</view> |
| | | <image class="arrow-icon" src="/images/arrow-right.svg" mode="aspectFit"></image> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 项目和轮灌组嵌套列表 --> |
| | | <view class="list-container"> |
| | | <!-- 项目列表 --> |
| | | <scroll-view scroll-y="true" class="project-list"> |
| | | <block wx:for="{{projectList}}" wx:key="id"> |
| | | <view class="project-item"> |
| | | <!-- 项目名称 --> |
| | | <view class="project-header" bindtap="toggleProject" data-index="{{index}}"> |
| | | <view class="project-title"> |
| | | <image class="toggle-icon {{item.expanded ? 'expanded' : ''}}" src="/images/arrow-down.svg" mode="aspectFit"></image> |
| | | <view class="project-name">{{item.name}}</view> |
| | | </view> |
| | | <view class="project-duration">总时长: {{item.totalDuration || 0}}分钟</view> |
| | | </view> |
| | | |
| | | <!-- 轮灌组列表 --> |
| | | <view class="group-list {{item.expanded ? 'expanded' : ''}}"> |
| | | <block wx:for="{{item.groups}}" wx:for-item="group" wx:for-index="groupIndex" wx:key="id"> |
| | | <view class="group-item {{group.selected ? 'selected' : ''}}"> |
| | | <view class="group-info" bindtap="navigateToGroupDetail" data-project-index="{{index}}" data-group-index="{{groupIndex}}"> |
| | | <view class="group-name">{{group.name}}</view> |
| | | </view> |
| | | <view class="group-duration"> |
| | | <input |
| | | class="duration-input" |
| | | type="number" |
| | | value="{{group.duration}}" |
| | | bindinput="onDurationInput" |
| | | data-project-index="{{index}}" |
| | | data-group-index="{{groupIndex}}" |
| | | placeholder="0" |
| | | catchtap="stopPropagation" |
| | | /> |
| | | <text class="duration-unit">分钟</text> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | </view> |
| | | <!-- 时间提示弹窗 --> |
| | | <t-dialog |
| | | visible="{{timeInfoVisible}}" |
| | | title="时间设置说明" |
| | | content="• 设置两小时后的灌溉时间:\n在此处选择具体的开始时间\n\n• 设置两小时内的灌溉时间:\n创建完成后点击发布即可立即开始灌溉" |
| | | confirmBtn="我知道了" |
| | | bind:confirm="onTimeInfoConfirm" |
| | | bind:cancel="onTimeInfoConfirm" |
| | | /> |
| | | |
| | | <!-- 选择项目 --> |
| | | <view class="form-item" bindtap="showProjectPicker"> |
| | | <view class="form-label">选择项目</view> |
| | | <view class="form-input"> |
| | | <view class="picker-text {{selectedProject ? '' : 'placeholder'}}">{{selectedProject ? selectedProject.name : '请选择项目'}}</view> |
| | | <image class="arrow-icon" src="/images/arrow-right.svg" mode="aspectFit"></image> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 轮灌组列表 --> |
| | | <view class="list-container" wx:if="{{selectedProject}}"> |
| | | <view class="list-header"> |
| | | <view class="list-title-container"> |
| | | <view class="list-title">轮灌组列表</view> |
| | | <view class="total-duration"> |
| | | <text class="total-duration-label">总灌溉时间:</text> |
| | | <text class="total-duration-value">{{totalDuration}}分钟</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <scroll-view |
| | | scroll-y="true" |
| | | class="group-list" |
| | | refresher-enabled="{{true}}" |
| | | refresher-triggered="{{isRefreshing}}" |
| | | bindrefresherrefresh="onGroupListRefresh" |
| | | > |
| | | <block wx:if="{{selectedProject.groups && selectedProject.groups.length > 0}}"> |
| | | <block wx:for="{{selectedProject.groups}}" wx:key="id" wx:for-item="group" wx:for-index="groupIndex"> |
| | | <view class="group-item {{group.selected ? 'selected' : ''}}" bindtap="navigateToGroupDetail" data-group-index="{{groupIndex}}"> |
| | | <view class="group-info"> |
| | | <text class="group-index">{{groupIndex + 1}}.</text> |
| | | <view class="group-name"> |
| | | <text class="group-name-text">{{group.name || '未命名轮灌组'}}</text> |
| | | <text class="group-intake-count">(共{{group.intakeCount}}个取水口)</text> |
| | | </view> |
| | | </view> |
| | | <view class="group-duration"> |
| | | <input |
| | | class="duration-input" |
| | | type="number" |
| | | value="{{group.duration}}" |
| | | bindinput="onDurationInput" |
| | | data-group-index="{{groupIndex}}" |
| | | placeholder="0" |
| | | catchtap="stopPropagation" |
| | | /> |
| | | <text class="duration-unit">分钟</text> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | </block> |
| | | <view wx:else class="empty-container"> |
| | | <image class="empty-image" src="/images/empty.svg" mode="aspectFit"></image> |
| | | <view class="empty-text">暂无轮灌组数据</view> |
| | | <view class="empty-text">请刷新或稍后再试</view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | |
| | |
| | | visible="{{timePickerVisible}}" |
| | | mode="{{['date', 'minute']}}" |
| | | value="{{pickerValue}}" |
| | | start="{{pickerValue}}" |
| | | format="YYYY-MM-DD HH:mm" |
| | | bindconfirm="onTimePickerConfirm" |
| | | bindcancel="onTimePickerCancel" |
| | | catchtouchmove="stopPropagation" |
| | | z-index="{{1000}}" |
| | | /> |
| | | |
| | | <!-- 项目选择器弹窗 --> |
| | | <t-picker |
| | | visible="{{projectPickerVisible}}" |
| | | title="选择项目" |
| | | cancelBtn="取消" |
| | | confirmBtn="确认" |
| | | bind:confirm="onProjectPickerConfirm" |
| | | bind:cancel="onProjectPickerCancel" |
| | | bind:touchmove="stopPropagation" |
| | | bind:touchstart="stopPropagation" |
| | | bind:touchend="stopPropagation" |
| | | z-index="{{1000}}" |
| | | > |
| | | <t-picker-item options="{{projectOptions}}" value="{{projectPickerValue}}" /> |
| | | </t-picker> |
| | | |
| | | |
| | | </view> |