<!--pages/xiangmugaikuang/xiangmugaikuang.wxml-->
<!-- <view class="header_title height_0">
  <view class="header_title_row">
    <van-row>
      <van-col span="3">
        <view class="header_img" bindtap="showPopup"><image src="/images/core.png"></image></view>
      </van-col>
      <van-col span="4">
        <view class="header_img" bindtap="goGCLB">
          <image src="/images/left.png"></image>
          <text class="header_fh">返回</text>
        </view>
      </van-col>
      <van-col span="10">
        <view class="header_name">项目预警</view>
      </van-col>
    </van-row>
  </view>
</view> -->

<!-- 左侧账号信息 -->
<!-- <van-popup show="{{ show }}" position="left" custom-style="width: 70%;height:100%;background:#191d28" bind:close="onClose" >
  <view class="left_max">
    <van-row class="demo clearfix">
      <van-col span="10">
        <view class="left_head"><image src="http://fileimg.makalu.cc/szgl/9015e824c5004e629049c4f72967cfdc.png"></image></view>
      </van-col>
      <van-col span="14">
        <view class="left_info">
          <view class="left_info_name">{{userName}}</view>
          <view class="left_info_name">{{loginName}}</view>
        </view>
      </van-col>
    </van-row>

     <view class="left_manage_max">
    </view>
    <view class="left_manage_min">
      <view class="left_manage" bindtap="TCDL">
        <view class="left_sign">
          退出登录
        </view>
      </view>
    </view>
  </view>
</van-popup> -->

<!-- 中间内容 -->
<view class="max_new_content">
  <project-select init="{{initData}}" class="height_1" bindchange="onProjectSelect"></project-select>
  <view class="echarts_max new_yu_jing height_2" style="margin-top: 60rpx;">
    <view class="echarts_min">
      <view class="eharts_title new_icon">
        预警信息
        <text class="new_text" bindtap="YJXQ">详情 >></text>
      </view>  
      <view class="van_row">
        <van-row wx:for="{{enviorDayData}}" wx:key="enviorDayData">
          <van-col span="14">
            <view class="new_yj_left">{{item.envirName}}</view>
          </van-col>
          <van-col span="10">
            <view class="new_yj_right">{{item.createTime}}</view>
          </van-col>
        </van-row> 
      </view>      
    </view>
  </view>

  <view class="echarts_max new_yu_jing height_3">
    <view class="echarts_min">
      <view class="eharts_title">预警状态</view>  
      <van-row>
        <van-col span="12" bindtap="CheckdDayEnviron" data-projectId="{{projectId}}">
          <view class="eharts_head">本日预警：<text>{{dayCountNum}}</text> 次</view>
        </van-col>
        <van-col span="12" bindtap="CheckdMonthEnviron" data-projectId="{{projectId}}">
          <view class="eharts_head">本月预警：<text>{{monthCountNum}}</text> 次</view>
        </van-col>
      </van-row>
      <view class="eharts_con">
        <ec-canvas ec="{{ ec_0 }}" id="mychart-zero"></ec-canvas>
      </view>  
    </view>
  </view>


  <van-sticky  offset-top="{{ 80 }}">
    <view class="video_nav_max height_4">
      <view class="video_nav {{index  === highlight  ? 'active' :' ' }}" data-index="{{index}}" wx:for = "{{list}}"  wx:key="list" bindtap='clickScroll' data-id="{{item}}">
        {{item}}
      </view>
    </view>
  </van-sticky>

  <view class="echarts_max height_5">
    <view class="echarts_min">
      <view class="eharts_title">人员预警</view>  
      <van-row>
        <van-col span="12" bindtap="checkUserEnivr" data-projectId="{{projectId}}" data-type="1">
          <view class="eharts_head">本日预警：<text>{{userEnvironCountDay}}</text> 次</view>
        </van-col>
        <van-col span="12" bindtap="checkUserEnivr" data-projectId="{{projectId}}" data-type="2">
          <view class="eharts_head">本月预警：<text>{{userEnvironCountMonyh}}</text> 次</view>
        </van-col>
      </van-row>
      <view class="eharts_con">
        <ec-canvas ec="{{ ec_1 }}" id="mychart-one"></ec-canvas>
      </view>  
    </view>
  </view>

  <view class="echarts_max height_6">
    <view class="echarts_min">
      <view class="eharts_title">机械预警</view>  
      <van-row>
        <van-col span="12" bindtap="chechMachine" data-projectId="{{projectId}}" data-state="1">
          <view class="eharts_head">本日预警：<text>{{machineEnvironCountDay}}</text> 次</view>
        </van-col>
        <van-col span="12" bindtap="chechMachine" data-projectId="{{projectId}}" data-state="2">
          <view class="eharts_head">本月预警：<text>{{machineEnvironCountmonth}}</text> 次</view>
        </van-col>
      </van-row>
      <view class="eharts_con">
        <ec-canvas ec="{{ ec_6 }}" id="mychart-sex"></ec-canvas>
      </view>  
    </view>
  </view>

  <view class="echarts_max height_7">
    <view class="echarts_min">
      <view class="eharts_title">物料预警</view>  
      <van-row>
        <van-col span="12">
          <view class="eharts_head">本日预警：<text>-</text> 次</view>
        </van-col>
        <van-col span="12">
          <view class="eharts_head">本月预警：<text>-</text> 次</view>
        </van-col>
      </van-row>
      <view class="eharts_con">
        <ec-canvas ec="{{ ec_2 }}" id="mychart-two"></ec-canvas>
      </view>  
    </view>
  </view>

  <view class="echarts_max height_8">
    <view class="echarts_min">
      <view class="eharts_title">环境预警</view>  
      <view class="eharts_head">今日扬尘：<text>{{yangchenCount}}</text></view>

      
      <view class="eharts_con">
       <ec-canvas ec="{{ ec_5 }}" id="mychart-five"></ec-canvas>
      </view>  

      <view class="bar_arrow" style="margin-left:{{marginLeft}}">
          <view>{{aqi}}</view>
          <view><image src="/images/jt.png" class="bar_jt"></image></view>
        </view>  
      <view class="bar_max">
        <view class="bar_con"></view>
        <view class="bar_top_max">
          <view class="bar_top_min bar_min_1"></view>
          <view class="bar_top_min bar_min_2"></view>
          <view class="bar_top_min bar_min_3"></view>
          <view class="bar_top_min bar_min_4"></view>
          <view class="bar_top_min bar_min_5"></view>
        </view>
        <view class="bar_num">
          <van-row>
            <van-col span="4">
              <view class="bar_min" >0</view>
            </van-col>
            <van-col span="4">
              <view class="bar_min">100</view>
            </van-col>
            <van-col span="4">
              <view class="bar_min">200</view>
            </van-col>
            <van-col span="4">
              <view class="bar_min">300</view>
            </van-col>
            <van-col span="4">
              <view class="bar_min">400</view>
            </van-col>
            <van-col span="4">
              <view class="bar_min">500+</view>
            </van-col>
          </van-row>
        </view>
      </view>

      <view class="speed_max">
        <van-row>
          <van-col span="4">
            <view class="speed_min">
              <view class="bar_speed">PM2.5</view>
              <view>{{PM25}}ug/m³</view>
            </view>
          </van-col>
          <van-col span="4" offset="16">
            <view class="speed_min">
              <view class="bar_speed">风速</view>
              <view>{{WindSpeed}}m/s</view>
            </view>
          </van-col>
          <van-col span="4">
            <view class="speed_min">
              <view class="bar_speed">PM10</view>
              <view>{{PM10}}ug/m³</view>
            </view>
          </van-col>
          <van-col span="4" offset="16">
            <view class="speed_min">
              <view class="bar_speed">风向</view>
              <view>{{WindDirection}}</view>
            </view>
          </van-col>
          <van-col span="4">
            <view class="speed_min">
              <view class="bar_speed">TSP</view>
              <view>{{TSP}}ug/m³</view>
            </view>
          </van-col>
          <van-col span="4" offset="16">
            <view class="speed_min">
              <view class="bar_speed">温度</view>
              <view>{{Temperature}}℃</view>
            </view>
          </van-col>
          <van-col span="4">
            <view class="speed_min">
              <view class="bar_speed">噪音</view>
              <view>{{DB}}db</view>
            </view>
          </van-col>
          <van-col span="4" offset="16">
            <view class="speed_min">
              <view class="bar_speed">湿度</view>
              <view>{{Humidity}}%</view>
            </view>
          </van-col>
        </van-row>
        <view class="clear"></view>
      </view>



      <view class="margin_top">
        <view class="eharts_head">本月预警：<text>{{envirMonthEarlyNum}}</text> 次</view>
        <view class="eharts_con">
          <ec-canvas ec="{{ ec_3 }}" id="mychart-three"></ec-canvas>
        </view> 
      </view>
       
    </view>
  </view>

  <view class="echarts_max height_9">
    <view class="echarts_min">
      <view class="eharts_title">视频预警</view>  
      <van-row>
        <van-col span="12" bindtap="chechVideo" data-projectId="{{projectId}}" data-state="1">
          <view class="eharts_head">本日离线：<text>{{videoDay}}</text> 次</view>
        </van-col>
        <van-col span="12" bindtap="chechVideo" data-projectId="{{projectId}}" data-state="2">
          <view class="eharts_head">本月离线预警：<text>{{videoMonth}}</text> 次</view>
        </van-col>
      </van-row>
      <view class="eharts_con">
        <ec-canvas ec="{{ ec_4 }}" id="mychart-four"></ec-canvas>
      </view>  
    </view>
  </view>
</view>

<van-overlay show="{{loadShow}}">
  <view class="gif">
    <image src="../../images/loding2.gif"></image>
    <view>数据加载中！请稍后...</view>
  </view>
</van-overlay>  