<!--pages/warning/warning.wxml-->
<view class="warning-container">


  <!-- 标题栏 -->
  <view class="header">
    <text class="title">日常预警</text>
  </view>

  <!-- 提示横幅 -->
  <view class="banner">
    <text class="banner-icon">📢</text>
    <text class="banner-text">每天6:30进行盘点统计</text>
  </view>

  <!-- 今日预警 -->
  <view class="today-warnings" bindtap="viewTodayWarnings">
    <text class="section-title">今日预警</text>
    <text class="arrow">></text>
  </view>

  <!-- 养殖场列表 -->
  <view class="farm-list">
    <view 
      class="farm-item" 
      wx:for="{{farms}}" 
      wx:key="id"
      data-farm-id="{{item.id}}"
      bindtap="viewFarmDetail"
    >
      <view class="farm-name">{{item.name}}</view>
      <view class="warnings-grid">
        <view class="warning-item red">
          <text class="warning-count">{{item.warnings.notInventoried}}</text>
          <text class="warning-label">未盘点</text>
        </view>
        <view class="warning-item green">
          <text class="warning-count">{{item.warnings.abnormalSteps}}</text>
          <text class="warning-label">步数异常</text>
        </view>
        <view class="warning-item blue">
          <text class="warning-count">{{item.warnings.collarCut}}</text>
          <text class="warning-label">项圈剪断</text>
        </view>
        <view class="warning-item orange">
          <text class="warning-count">{{item.warnings.hostDisconnected}}</text>
          <text class="warning-label">主机断网</text>
        </view>
      </view>
    </view>
  </view>
</view>