<!--pages/newAddPage/safetyManagement/index.wxml-->
<view class="header_title">
  <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>
</van-popup>


<view class="max_content">
    <project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>

    <view class="module_max" style="margin-top: 60rpx;">
      <view class="module_min">
        <view class="module_title module_title_flex" >
          <view>教育培训</view>
          <view class="module_see_info" bindtap="goEducations">查看详情<van-icon name="arrow" /></view>
        </view>
        <safety-pie-chart chart-id="chart1" title="教育总数" chart-data="{{videoSurvey}}"></safety-pie-chart>
      </view>
    </view>

    <view class="module_max">
      <view class="module_min">
        <view class="module_title module_title_flex">
          <view>安全检查</view>
          <view class="module_see_info" bindtap="goCheckView">查看详情<van-icon name="arrow" /></view>
        
        </view>
        <view class="safety_inspect">
          <van-row>
            <van-col span="12">
              <view class="safety_inspect_title">常规检查次数</view>
              <safety-number number="{{securityCheck.routineCheckNumber}}"></safety-number>
              <view class="safety_prop">
                <view style="padding-right: 30rpx;">整改率</view>
                <view class="safety_prop_val"><text>{{securityCheck.routineRectificationRate}}</text> %</view>
              </view>
              <view class="safety_issue">
                <view class="safety_issue_number">
                  <view style="padding-right: 30rpx;">检查问题数</view>
                  <view>{{securityCheck.routineProblemTotal}}</view>
                </view>
              </view>
            </van-col>
            <van-col span="12">
              <view class="safety_inspect_title">专项检查次数</view>
              <safety-number number="{{securityCheck.specialCheckNumber}}"></safety-number>
              <view class="safety_prop">
                <view style="padding-right: 30rpx;">整改率</view>
                <view class="safety_prop_val"><text>{{securityCheck.specialRectificationRate}}</text> %</view>
              </view>
              <view class="safety_issue">
                <view class="safety_issue_number">
                  <view style="padding-right: 30rpx;">检查问题数</view>
                  <view>{{securityCheck.specialProblemTotal}}</view>
                </view>
              </view>
            </van-col>
          </van-row>
        </view>
      </view>
    </view>

    <view class="module_max">
      <view class="module_min">
        <view class="module_title module_title_flex">
          <view>基坑监测</view>
          <view class="module_see_info" bindtap="gofoundation" data-id="4">查看详情<van-icon name="arrow" /></view>
        </view>
        <view class="safety_deep">
          <view class="safety_deep_row">
            <view class="safety_deep_img safety_deep_img_1">
              <!-- <image src="http://fileimg.makalu.cc/WEB_A8903AF7C4E2470C9E6107E3246B8775.png"></image> -->
            </view>
            <view class="safety_deep_col">
              <view class="safety_deep_col_text">监测点位数</view>
              <view class="safety_deep_col_number"><text>{{pitCount.total}}</text> 个</view>
            </view>
          </view>
          <view class="safety_deep_row">
            <view class="safety_deep_img safety_deep_img_2">
              <!-- <image src="http://fileimg.makalu.cc/WEB_16916419A0EB4677AE873B6EFE418DD6.png"></image> -->
            </view>
            <view class="safety_deep_col">
              <view class="safety_deep_col_text">在线点位数</view>
              <view class="safety_deep_col_number safety_deep_col_green"><text>{{pitCount.onlineNumber}}</text> 个</view>
            </view>
          </view>
        </view>
        <safety-bar-chart chart-id="chart2" data="{{safetyDeepData}}" height="350"></safety-bar-chart>
      </view>
    </view>

    <view class="module_max">
      <view class="module_min">
        <view class="module_title module_title_flex">
          <view>爬架监测</view>
          <view class="module_see_info" bindtap="gofoundation" data-id="5">查看详情<van-icon name="arrow" /></view>
        </view>
        <view class="safety_deep">
          <view class="safety_deep_row">
            <view class="safety_deep_img safety_deep_img_1">
              <!-- <image src="http://fileimg.makalu.cc/WEB_A8903AF7C4E2470C9E6107E3246B8775.png"></image> -->
            </view>
            <view class="safety_deep_col">
              <view class="safety_deep_col_text">监测点位数</view>
              <view class="safety_deep_col_number"><text>{{climbCount.total}}</text> 个</view>
            </view>
          </view>
          <view class="safety_deep_row">
            <view class="safety_deep_img safety_deep_img_2">
              <!-- <image src="http://fileimg.makalu.cc/WEB_16916419A0EB4677AE873B6EFE418DD6.png"></image> -->
            </view>
            <view class="safety_deep_col">
              <view class="safety_deep_col_text">在线点位数</view>
              <view class="safety_deep_col_number safety_deep_col_green"><text>{{climbCount.onlineNumber}}</text> 个</view>
            </view>
          </view>
        </view>
        <safety-bar-chart chart-id="chart3" data="{{safetyFrameData}}" height="350"></safety-bar-chart>
      </view>
    </view>

    <view class="module_max">
      <view class="module_min">
        <view class="module_title module_title_flex">
          <view>配电箱监测</view>
          <view class="module_see_info" bindtap="goPDJCDetail">查看详情<van-icon name="arrow" /></view>
        </view>
        <view class="safety_inspect">
          <van-row>
            <van-col span="12">

              <view class="safety_electric">
                <view>环境阈值：</view>
                <view class="safety_electric_threshold"><text>70</text>℃</view>
              </view>

              <view class="safety_electric_row">
                <view class="safety_electric_img safety_deep_img_1">
                  <image src="http://fileimg.makalu.cc/WEB_AF606BB7762C44E7A259E506EAF7FCF3.png"></image>
                </view>
                <view class="safety_electric_col">
                  <view class="safety_deep_col_text">A相温度</view>
                  <view class="safety_electric_number safety_deep_col_blue"><text>{{power.t1}}</text> ℃</view>
                </view>
              </view>

              <view class="safety_electric_row">
                <view class="safety_electric_img safety_deep_img_1">
                  <image src="http://fileimg.makalu.cc/WEB_AF606BB7762C44E7A259E506EAF7FCF3.png"></image>
                </view>
                <view class="safety_electric_col">
                  <view class="safety_deep_col_text">B相温度</view>
                  <view class="safety_electric_number safety_deep_col_blue"><text>{{power.t2}}</text> ℃</view>
                </view>
              </view>

              <view class="safety_electric_row">
                <view class="safety_electric_img safety_deep_img_1">
                  <image src="http://fileimg.makalu.cc/WEB_AF606BB7762C44E7A259E506EAF7FCF3.png"></image>
                </view>
                <view class="safety_electric_col">
                  <view class="safety_deep_col_text">C相温度</view>
                  <view class="safety_electric_number safety_deep_col_blue"><text>{{power.t3}}</text> ℃</view>
                </view>
              </view>

              <view class="safety_electric_row">
                <view class="safety_electric_img safety_deep_img_1">
                  <image src="http://fileimg.makalu.cc/WEB_98D6C14CBE3348A89F73244A3BEACB98.png"></image>
                </view>
                <view class="safety_electric_col">
                  <view class="safety_deep_col_text">零线温度</view>
                  <view class="safety_electric_number safety_deep_col_blue"><text>{{power.t4}}</text> ℃</view>
                </view>
              </view>

            </van-col>
            <van-col span="12">
              <view class="safety_electric" style="visibility: hidden;">
                <view>漏电预警阈值：</view>
                <view class="safety_electric_threshold"><text>150</text>mA</view>
              </view>

              <view class="safety_electric_row">
                <view class="safety_electric_img safety_deep_img_1">
                  <image src="http://fileimg.makalu.cc/WEB_FE6A3AD7D3A94CA697E519CE147D50A8.png"></image>
                </view>
                <view class="safety_electric_col">
                  <view class="safety_deep_col_text">A相电流</view>
                  <view class="safety_electric_number safety_deep_col_blue"><text>{{power.c1}}</text> A</view>
                </view>
              </view>

              <view class="safety_electric_row">
                <view class="safety_electric_img safety_deep_img_1">
                  <image src="http://fileimg.makalu.cc/WEB_FE6A3AD7D3A94CA697E519CE147D50A8.png"></image>
                </view>
                <view class="safety_electric_col">
                  <view class="safety_deep_col_text">B相电流</view>
                  <view class="safety_electric_number safety_deep_col_blue"><text>{{power.c2}}</text> A</view>
                </view>
              </view>

              <view class="safety_electric_row">
                <view class="safety_electric_img safety_deep_img_1">
                  <image src="http://fileimg.makalu.cc/WEB_FE6A3AD7D3A94CA697E519CE147D50A8.png"></image>
                </view>
                <view class="safety_electric_col">
                  <view class="safety_deep_col_text">C相电流</view>
                  <view class="safety_electric_number safety_deep_col_blue"><text>{{power.c3}}</text> A</view>
                </view>
              </view>

              <view class="safety_electric_row" style="display: none;"> 
                <view class="safety_electric_img safety_deep_img_1">
                  <image src="http://fileimg.makalu.cc/WEB_6AF4FEC2B2724A4DB80D40516303612C.png"></image>
                </view>
                <view class="safety_electric_col" >
                  <view class="safety_deep_col_text">漏电电流</view>
                  <view class="safety_electric_number safety_deep_col_blue"><text>{{power.leak}}</text> A</view>
                </view>
              </view>
            </van-col>

          </van-row>
        </view>
      </view>
    </view>

    <view class="module_max" >
      <view class="module_min">
        <view class="module_title module_title_flex">
          <view>亮点照片</view>
          <view class="module_see_info"  bindtap="goHighLightPage">查看详情<van-icon name="arrow" /></view>
        </view>
        <view class="safety_highlights">
          <van-row>
            <!-- <swiper circular>
            <swiper-item wx:for="{{highlightPictures}}" wx:key="videoIndex">
              <image  src="{{item}}" style="width: 100%;height: 100%;"/>
            </swiper-item>
          </swiper> -->
            <van-col span="12" wx:for="{{highlightPictures}}" wx:key="index" wx:if="{{index < 2}}">
              <view class="safety_highlights_img">
                <image  src="{{item.photo_url}}"></image>
              </view>
            </van-col>
          </van-row>
        </view>
      </view>
    </view>

</view>


<!-- 底部导航 -->
<van-tabbar active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
  <van-tabbar-item bindtap="XMGK" >
    <image
      slot="icon"
      src="/images/footer_5.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    <image
      slot="icon-active"
      src="/images/foot_5.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    项目概况
  </van-tabbar-item>

  <van-tabbar-item bindtap="XMSP">
    <image
      slot="icon"
      src="/images/footer_7.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    <image
      slot="icon-active"
      src="/images/foot_7.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    安全管理
  </van-tabbar-item>

  <van-tabbar-item bindtap="ZLGL2">
    <image
      slot="icon"
      src="/images/footer_5.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    <image
      slot="icon-active"
      src="/images/foot_5.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    质量管理
    </van-tabbar-item>
    
    <van-tabbar-item bindtap="JDGL2">
    <image
      slot="icon"
      src="/images/footer_6.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    <image
      slot="icon-active"
      src="/images/foot_6.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    进度管理
  </van-tabbar-item>

  <van-tabbar-item bindtap="GDGN">
    <image
      slot="icon"
      src="/images/footer_1.png"
      mode="aspectFit"
      style="width:40rpx; height: 40rpx;"
    />
    <image
      slot="icon-active"
      src="/images/foot_1.png"
      mode="aspectFit"
      style="width:40rpx; height:40rpx;"
    />
    更多功能
  </van-tabbar-item>
</van-tabbar>



