<!--pages/waterabnormal/settings/settings.wxml-->
<mp-toptips msg="{{error}}" type="error" show="{{error}}"></mp-toptips>
<view class="alarm-rules-settings" bindtouchstart="selectHide">
	<view class="form">
		<view class="from-item">
			<view class="label">预警类型</view>
			<xk-select options="{{warningTypes}}" selectShow="{{selectShow}}" data-file="warningType"
				bind:change='formChange'>
			</xk-select>
		</view>
		<button class="btn-big" bindtap="submit">添加规则</button>
	</view>
	<view class="rules">
		<view class="rule-title">已设定规则({{rules.length}})</view>
		<view class="rule-item" wx:for="{{rules}}" wx:key="index">
			<view class="center">
				<view class="name">{{item.warningType==3?"单日用水量少于0.01吨":"单日用水量超过2吨"}}</view>
			</view>
			<view class="right">
				<image src="/static/img/icon_remove.png" data-index="{{item.id}}" bindtap="remove"></image>
			</view>
		</view>
		<view class="rule-item" style="justify-content:center;" wx:if="{{!rules.length}}">
			暂无相关信息
		</view>
	</view>
</view>