| | |
| | | </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 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"> |
| | | <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"> |
| | | <view class="group-name">{{group.name}}</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' : ''}}" bindtap="navigateToGroupDetail" data-project-index="{{index}}" data-group-index="{{groupIndex}}"> |
| | | <view class="group-info" > |
| | | <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 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> |
| | |
| | | bindconfirm="onTimePickerConfirm" |
| | | bindcancel="onTimePickerCancel" |
| | | /> |
| | | |
| | | <!-- 项目选择器弹窗 --> |
| | | <t-picker |
| | | title="选择项目" |
| | | visible="{{projectPickerVisible}}" |
| | | value="{{projectPickerValue}}" |
| | | cancelBtn="取消" |
| | | confirmBtn="确认" |
| | | bindconfirm="onProjectPickerConfirm" |
| | | bindcancel="onProjectPickerCancel" |
| | | > |
| | | <t-picker-item options="{{projectOptions}}" /> |
| | | </t-picker> |
| | | </view> |