沙盘演示系统应用的微信小程序
zuoxiao
2024-08-28 eb3dbfdcb126beeb1d08f3306ac8f5bbc466e133
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!--pages/openCard/openCard.wxml 开卡时的虚拟卡-->
<view class="container">
 
  <scroll-view class="list-container" scroll-y="true" scroll-x="false">
    <block wx:if="{{allCardPoints.length > 0}}" wx:for="{{allCardPoints}}" wx:key="index">
      <view class="{{item.inUse===false?'item':'item-gray'}}">
        <view class="item-card">
          <text>卡编号:</text>
          <text>{{item.vcNum}}</text>
        </view>
        <view class="item-bottom">
          <image class="item-balance-img" src="/images/balance.svg" />
          <view class="item-balance">
            <text class="{{item.isAlarmValue===false?'item-balance-text':'item-balance-text-red'}}">{{item.money}}</text>
            <text class="{{item.isAlarmValue===false?'item-balance-text-yuan':'item-balance-text-yuan-red'}}">元</text>
          </view>
          <text class="{{item.inUse===false?'item-button':'item-button-gray'}}" bind:tap="openValva" data-item="{{item}}">{{item.displayText}}</text>
        </view>
      </view>
    </block>
    <view wx:if="{{allCardPoints.length === 0}}" class="noMore-View">
      <image class="noMore-img" src="/images/no_more.svg" />
      <text class="noMore-text">没有数据</text>
    </view>
  </scroll-view>
  <!-- 黑色蒙层 -->
  <view class="overlay" wx:if="{{showDialog}}" bindtap="closeDialog"></view>
  <!-- 选择灌溉模式 -->
  <view class="dialog" wx:if="{{showDialog}}">
    <image class="close" src="/images/close.svg" bindtap="handleClost"></image>
    <view class="dialog-content" wx:if="{{dialog_mode}}">
      <view class="dialog-title">请选择灌溉模式</view>
      <button bindtap="handleAutoIrrigation">自管灌溉</button>
      <button bindtap="handleSetDuration">定灌溉时长</button>
      <button bindtap="handleSetWaterVolume">定灌溉水量</button>
    </view>
    <view class="dialog-content" wx:if="{{dialog_time}}">
      <view class="dialog-title">
      <image class="dialog-title-img" bind:tap="dialogBack" src="/images/back.svg"></image>
      <text class="dialog-title-text">定灌溉时长</text>
      </view>
      <view>
        <view class="row">
          <view class="choseitem{{activeIndex === 0 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="0">
            <view class="chose-wrapper">
              <text class="chose-number">{{irrigateProfile[0].defaultValue}}</text>
              <text class="chose-label">{{irrigateProfile[0].unitText}}</text>
            </view>
          </view>
          <view class="choseitem{{activeIndex === 1 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="1">
            <view class="chose-wrapper">
              <text class="chose-number">{{irrigateProfile[1].defaultValue}}</text>
              <text class="chose-label">{{irrigateProfile[1].unitText}}</text>
            </view>
          </view>
        </view>
        <view class="row">
          <view class="choseitem{{activeIndex === 2 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="2">
            <view class="chose-wrapper">
              <text class="chose-number">{{irrigateProfile[2].defaultValue}}</text>
              <text class="chose-label">{{irrigateProfile[2].unitText}}</text>
            </view>
          </view>
          <view class="choseitem{{activeIndex === 3 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="3">
            <view class="chose-wrapper">
              <text class="chose-number">{{irrigateProfile[3].defaultValue}}</text>
              <text class="chose-label">{{irrigateProfile[3].unitText}}</text>
            </view>
          </view>
        </view>
        <view>
          <t-input label="" placeholder="或在此输入自定义时间" bind:change="onTimeInputChange">
          </t-input>
          <t-radio-group wx:if="{{group_time}}" default-value="0" borderless t-class="box">
            <t-radio block="{{false}}" label="分钟" value="0" />
            <t-radio block="{{false}}" label="小时" value="1" />
          </t-radio-group>
          <t-radio-group bind:change="onGroupChange" default-value="0" borderless t-class="box">
            <t-radio block="{{false}}" label="现在开阀" value="0" />
            <t-radio block="{{false}}" label="计划开阀时间" value="1" />
          </t-radio-group>
          <text class="open-time" wx:if="{{isShowOpenTime}}">{{openTime}}</text>
          <button bindtap="handleSetWaterVolume">开阀</button>
        </view>
      </view>
    </view>
    <view class="dialog-content" wx:if="{{dialog_water}}">
      <view class="dialog-title">
      <image class="dialog-title-img" bind:tap="dialogBack" src="/images/back.svg"/>
      <text class="dialog-title-text">定灌溉水量</text>
      </view>
      <view>
        <view class="row">
          <view class="choseitem{{activeIndex === 0 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="0">
            <view class="chose-wrapper">
              <text class="chose-number">{{irrigateProfile[0].defaultValue}}</text>
              <text class="chose-label">{{irrigateProfile[0].unitText}}</text>
            </view>
          </view>
          <view class="choseitem{{activeIndex === 1 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="1">
            <view class="chose-wrapper">
              <text class="chose-number">{{irrigateProfile[1].defaultValue}}</text>
              <text class="chose-label">{{irrigateProfile[1].unitText}}</text>
            </view>
          </view>
        </view>
        <view class="row">
          <view class="choseitem{{activeIndex === 2 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="2">
            <view class="chose-wrapper">
              <text class="chose-number">{{irrigateProfile[2].defaultValue}}</text>
              <text class="chose-label">{{irrigateProfile[2].unitText}}</text>
            </view>
          </view>
          <view class="choseitem{{activeIndex === 3 ? 'active' : ''}}" bindtap="handleMoneyWrapperTap" data-index="3">
            <view class="chose-wrapper">
              <text class="chose-number">{{irrigateProfile[3].defaultValue}}</text>
              <text class="chose-label">{{irrigateProfile[3].unitText}}</text>
            </view>
          </view>
        </view>
        <view>
          <t-input label=""   suffix="元" align="right" type="number" placeholder="或在此输入自定义水量(立方米)" bind:change="onWaterInputChange">
          </t-input>
          <t-radio-group bind:change="onGroupChange" default-value="0" borderless t-class="box">
            <t-radio block="{{false}}" label="现在开阀" value="0" />
            <t-radio block="{{false}}" label="计划开阀时间" value="1" />
          </t-radio-group>
          <text class="open-time" wx:if="{{isShowOpenTime}}">{{openTime}}</text>
          <button bindtap="handleSetWaterVolume">开阀</button>
        </view>
      </view>
    </view>
  </view>
  <!-- 年月日时分 -->
  <t-date-time-picker title="选择日期和时间" visible="{{datetimeVisible}}" mode="minute" value="{{datetime}}" format="YYYY-MM-DD HH:mm" bindchange="onConfirm" bindpick="onColumnChange" bindcancel="hidePicker" start="{{datetime}}"/>
</view>