管灌系统农户端微信小程序(嘉峪关应用)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<view class="irrigation-detail-container">
  <!-- 顶部信息区域 -->
  <view class="header-section">
    <view class="plan-info">
      <view class="plan-code">
        <text class="label">计划编号:</text>
        <text class="value">{{planCode}}</text>
      </view>
      <image class="status-icon" src="/images/progress.svg" mode="aspectFit"></image>
    </view>
    
    <!-- 灌溉时间信息 -->
    <view class="time-info">
      <text class="label">灌溉开始时间:</text>
      <text class="value">{{startTime}}</text>
    </view>
  </view>
 
  <!-- 项目和轮灌组列表 -->
  <scroll-view 
    scroll-y="true" 
    class="project-list" 
    refresher-enabled="{{true}}" 
    refresher-threshold="50" 
    refresher-triggered="{{isRefreshing}}" 
    bindrefresherrefresh="onPullDownRefresh">
    <view class="scroll-content">
      <block wx:for="{{projects}}" wx:key="id" wx:for-item="project" wx:for-index="projectIndex">
        <!-- 项目信息 -->
        <view class="project-item {{project.expanded ? 'expanded' : 'collapsed'}}">
          <view class="project-header" bindtap="toggleProject" data-index="{{projectIndex}}">
            <image class="toggle-icon {{project.expanded ? 'expanded' : ''}}" src="/images/arrow-down.svg" mode="aspectFit"></image>
            <view class="project-info">
              <view class="project-name">{{project.name}}</view>
              <view class="project-duration">总灌溉时长: {{project.totalDuration || 0}}分钟</view>
            </view>
          </view>
          
          <!-- 轮灌组列表 -->
          <view class="group-list {{project.expanded ? 'expanded' : 'collapsed'}}">
            <block wx:for="{{project.groups}}" wx:key="id" wx:for-item="group">
              <view class="group-item {{group.status}}" bindtap="navigateToGroupDetail" data-project-name="{{project.name}}" data-group-name="{{group.name}}" data-group-id="{{group.id}}" data-status="{{group.status}}">
                <!-- 轮灌组状态标识 -->
                <view class="group-status-indicator">
                  <view class="status-dot"></view>
                  <text class="status-text">{{group.statusText}}</text>
                </view>
                
                <!-- 轮灌组信息 -->
                <view class="group-info">
                  <view class="group-name">{{group.name}}</view>
                  <view class="group-time-info">
                    <view class="time-row">
                      <text class="time-label">开始时间:</text>
                      <text class="time-value">{{group.startTime}}</text>
                    </view>
                    <view class="time-row">
                      <text class="time-label">结束时间:</text>
                      <text class="time-value">{{group.endTime}}</text>
                    </view>
                    <view class="time-row">
                      <text class="time-label">灌溉时长:</text>
                      <text class="time-value">{{group.duration}}分钟</text>
                    </view>
                  </view>
                </view>
              </view>
            </block>
          </view>
        </view>
      </block>
    </view>
  </scroll-view>
</view>