|
@@ -0,0 +1,948 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
|
|
|
+ <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
|
|
|
+ <title></title>
|
|
|
+ <link rel="stylesheet" type="text/css" href="../../css/api.css">
|
|
|
+ <link rel="stylesheet" type="text/css" href="../../css/popoPicker.css"/>
|
|
|
+ <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
|
|
|
+ <link rel="stylesheet" href="../../css/aui.css">
|
|
|
+ <link rel="stylesheet" href="../../css/projeck.css">
|
|
|
+ <style>
|
|
|
+ body,html{
|
|
|
+ background: #F3F3F3;
|
|
|
+ overflow: hidden;
|
|
|
+ -webkit-box-sizing: border-box;
|
|
|
+ -moz-box-sizing: border-box;
|
|
|
+ box-sizing: border-box;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .api_layout{
|
|
|
+ height: 100%;
|
|
|
+ overflow-y: scroll;
|
|
|
+ -webkit-overflow-scrolling: touch;
|
|
|
+ }
|
|
|
+ .contents{
|
|
|
+ padding: 7px;
|
|
|
+ }
|
|
|
+ .monitorList{
|
|
|
+ padding: 14px;
|
|
|
+ }
|
|
|
+ .monitorList li{
|
|
|
+ display: flex;
|
|
|
+ display: -webkit-flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ -webkit-justify-content: space-between;
|
|
|
+ height: 56px;
|
|
|
+ line-height: 56px;
|
|
|
+ align-items: center;
|
|
|
+ color: #5a5a5a;
|
|
|
+ font-size: 14px;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .monitorList li:after{
|
|
|
+ content: '';
|
|
|
+ display: table;
|
|
|
+ position: absolute;
|
|
|
+ width: 100%;
|
|
|
+ height: 1px;
|
|
|
+ background: #e8e9ea;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
+ .monitorList li img{
|
|
|
+ width: 42px;
|
|
|
+ height: 42px;
|
|
|
+ display: block;
|
|
|
+ -webkit-border-radius: 50%;
|
|
|
+ -moz-border-radius: 50%;
|
|
|
+ border-radius: 50%;
|
|
|
+ margin-right: 19px;
|
|
|
+ }
|
|
|
+ .right_side{
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ right: -100%;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background: rgba(0,0,0,.6);
|
|
|
+ transition: .5ms;
|
|
|
+ }
|
|
|
+ .list{
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ right: -75%;
|
|
|
+ width: 75%;
|
|
|
+ right:0;
|
|
|
+ height: 100%;
|
|
|
+ background: #fff;
|
|
|
+ transition: .3s;
|
|
|
+ }
|
|
|
+ .titles{
|
|
|
+ height: 38px;
|
|
|
+ line-height: 38px;
|
|
|
+ padding-left: 15px;
|
|
|
+ font-size: 15px;
|
|
|
+ color: #2c3e50;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .titles:after{
|
|
|
+ content: '';
|
|
|
+ display: table;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 1px;
|
|
|
+ background: #009fe8;
|
|
|
+ }
|
|
|
+ .titles i{
|
|
|
+ display: block;
|
|
|
+ width: 19px;
|
|
|
+ height: 19px;
|
|
|
+ line-height: 19px;
|
|
|
+ background: url("../../image/close.png") no-repeat;
|
|
|
+ background-size: cover;
|
|
|
+ text-align: center;
|
|
|
+ -webkit-box-sizing: border-box;
|
|
|
+ -moz-box-sizing: border-box;
|
|
|
+ box-sizing: border-box;
|
|
|
+ position: absolute;
|
|
|
+ top: 8px;
|
|
|
+ right: 10px;
|
|
|
+ color: #ced3d6;
|
|
|
+ font-size: 8px;
|
|
|
+ }
|
|
|
+ .api_lists{
|
|
|
+ padding: 0 14px;
|
|
|
+ height: 100%;
|
|
|
+ overflow-y: scroll;
|
|
|
+ padding-bottom: 38px;
|
|
|
+ -webkit-overflow-scrolling: touch;
|
|
|
+ }
|
|
|
+ .api_lists li{
|
|
|
+ display: flex;
|
|
|
+ display: -webkit-flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ -webkit-justify-content:space-between;
|
|
|
+ height: 45px;
|
|
|
+ align-items: center;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .info p{
|
|
|
+ font-size: 15px;
|
|
|
+ }
|
|
|
+ .api_lists li:after{
|
|
|
+ content: '';
|
|
|
+ display: table;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 1px;
|
|
|
+ background: #e8e9ea;
|
|
|
+ }
|
|
|
+ .api_lists li p{
|
|
|
+ color: #2c3e50;
|
|
|
+ font-size: 13px;
|
|
|
+ }
|
|
|
+ .api_lists #contetnNo{
|
|
|
+ text-align: center;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #bdc3c7;
|
|
|
+ height: 50px;
|
|
|
+ margin-top:20px;
|
|
|
+ /*justify-content: center;
|
|
|
+ -webkit-justify-content: center;*/
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .api_lists #contetnNo:after{
|
|
|
+ content: '';
|
|
|
+ display: table;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 0;
|
|
|
+ background: #e8e9ea;
|
|
|
+ }
|
|
|
+ #noJurisdiction{
|
|
|
+ background: url('../../image/no.png') no-repeat;
|
|
|
+ background-size: contain;
|
|
|
+ position: absolute;
|
|
|
+ top: -50%;
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ right: 0;
|
|
|
+ margin: auto;
|
|
|
+ width: 125px;
|
|
|
+ height: 142px;
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .num{
|
|
|
+ color: #27AE60;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ .ico-more{
|
|
|
+ width: 13px;
|
|
|
+ height: 13px;
|
|
|
+ background: url("../../image/more.png") no-repeat;
|
|
|
+ background-size: cover;
|
|
|
+ background-position: center;
|
|
|
+ margin-left: 5px;
|
|
|
+ }
|
|
|
+ .loading{
|
|
|
+ position: absolute;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background: rgba(255,255,255,.3);
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
+ .Notice{
|
|
|
+ margin-bottom: 7px;
|
|
|
+ }
|
|
|
+ .ico-loading{
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ right: 0;
|
|
|
+ margin: auto;
|
|
|
+ width: 35px;
|
|
|
+ height: 35px;
|
|
|
+ background: url("../../icon/loading.gif") no-repeat;
|
|
|
+ background-size: cover;
|
|
|
+ background-position: center;
|
|
|
+ }
|
|
|
+ .time-box{
|
|
|
+ position: absolute;
|
|
|
+ bottom: 7px;
|
|
|
+ right: 7px;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #3B3B4D;
|
|
|
+ font-weight: bold;
|
|
|
+ line-height: initial;
|
|
|
+ }
|
|
|
+ .nav_title{
|
|
|
+ padding: 0 5px;
|
|
|
+ background: #F3F6FA;
|
|
|
+ }
|
|
|
+ .nav_title li{
|
|
|
+ text-align: center;
|
|
|
+ font-size: 14px;
|
|
|
+ padding: 9px 0 ;
|
|
|
+ color: #232627;
|
|
|
+ }
|
|
|
+ .nav_title li:nth-child(1),.nav_title li:nth-child(2){
|
|
|
+ width: 25%;
|
|
|
+ }
|
|
|
+ .nav_title li:nth-child(3){
|
|
|
+ width: 50%;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ .downWellPersonnal{
|
|
|
+ background: #fff;
|
|
|
+ }
|
|
|
+ .li-box{
|
|
|
+ height: 39px;
|
|
|
+ line-height: 39px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #232627;
|
|
|
+ }
|
|
|
+ .li-box span:nth-child(1),.li-box span:nth-child(2){
|
|
|
+ width: 25%;
|
|
|
+ }
|
|
|
+ .li-box span:nth-child(3){
|
|
|
+ width: 50%;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ .keyPostList{
|
|
|
+ margin-top: 30px;
|
|
|
+ }
|
|
|
+ .keyPostList p{
|
|
|
+ color: #3B4A74;
|
|
|
+ font-size: 14px;
|
|
|
+ width: 67px;
|
|
|
+ text-align: center;
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+ .keyPostList span{
|
|
|
+ display: block;
|
|
|
+ width: 60px;
|
|
|
+ height: 60px;
|
|
|
+ -webkit-border-radius: 50%;
|
|
|
+ -moz-border-radius: 50%;
|
|
|
+ border-radius: 50%;
|
|
|
+ line-height: 60px;
|
|
|
+ text-align: center;
|
|
|
+ color: #fff;
|
|
|
+ margin: auto;
|
|
|
+ }
|
|
|
+ .keyPostList li:nth-child(1) span:first-child{
|
|
|
+ background: #E74C3C;
|
|
|
+ }.keyPostList li:nth-child(2) span:first-child{
|
|
|
+ background: #2C3E50;
|
|
|
+ }.keyPostList li:nth-child(3) span:first-child{
|
|
|
+ background: #1ABC9C;
|
|
|
+ }.keyPostList li:nth-child(4) span:first-child{
|
|
|
+ background: #2873FF;
|
|
|
+ }
|
|
|
+ .depTitle{
|
|
|
+ margin-top: 20px;
|
|
|
+ color: #232627;
|
|
|
+ font-size: 16px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+ #button-value{
|
|
|
+ width: 194px;
|
|
|
+ padding-left:24px;
|
|
|
+ }
|
|
|
+ .lower{
|
|
|
+ top: 13px;
|
|
|
+ }
|
|
|
+ .equipmentStatus{
|
|
|
+ margin-top: 30px;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .hollowCircle{
|
|
|
+ display: block;
|
|
|
+ width: 60px;
|
|
|
+ height: 60px;
|
|
|
+ -webkit-border-radius: 50%;
|
|
|
+ -moz-border-radius: 50%;
|
|
|
+ border-radius: 50%;
|
|
|
+ line-height: 55px;
|
|
|
+ text-align: center;
|
|
|
+ border: 4px solid #6C6F74;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ color: #3B3B4D;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ .equipmentStatus li:nth-child(2) .hollowCircle{
|
|
|
+ border: 4px solid #14D2B8;
|
|
|
+ }
|
|
|
+ .equipmentStatus li:nth-child(3) .hollowCircle{
|
|
|
+ border: 4px solid #FF8B8C;
|
|
|
+ }
|
|
|
+ .circularR{
|
|
|
+ width: 85px;
|
|
|
+ height: 85px;
|
|
|
+ -webkit-border-radius: 50%;
|
|
|
+ -moz-border-radius: 50%;
|
|
|
+ border-radius: 50%;
|
|
|
+ line-height: 78px;
|
|
|
+ text-align: center;
|
|
|
+ border: 4px solid #14D2B8;
|
|
|
+ margin: auto;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ color: #3B3B4D;
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+ .Chart{
|
|
|
+ margin-top: 30px;
|
|
|
+ }
|
|
|
+ #equipmentStatusList{
|
|
|
+ padding: 0 15px;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div class="api_layout">
|
|
|
+ <!-- 图片展示 -->
|
|
|
+ <div class="banners relative">
|
|
|
+ <img src="http://jiewei-icon.oss-cn-beijing.aliyuncs.com/banner.png" alt="">
|
|
|
+ <!--时间-->
|
|
|
+ <div class="time-box"></div>
|
|
|
+ </div>
|
|
|
+ <div class="contents">
|
|
|
+ <!--当前井下人员-->
|
|
|
+ <div class="Notice borderRa beforS">
|
|
|
+ <p class="Stitle centertT">当前井下人员</p>
|
|
|
+ <div class="" style="width:100%">
|
|
|
+ <canvas id="downWell" style="width: 100%;margin-top:10px;height:210px"></canvas>
|
|
|
+ </div>
|
|
|
+ <!--列表-->
|
|
|
+ <nav>
|
|
|
+ <ul class="nav_title flex-start">
|
|
|
+ <li>姓名</li>
|
|
|
+ <li>下井时间</li>
|
|
|
+ <li>当前位置</li>
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ <ul class="downWellPersonnal" id="downWellPersonnal">
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <!--井下人员(区域分布)-->
|
|
|
+ <div class="Notice borderRa beforS">
|
|
|
+ <p class="Stitle centertT">井下人员(区域分布)</p>
|
|
|
+ <ul class="monitorList" id="monitorList">
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <!--人员告警信息-->
|
|
|
+ <div class="Notice borderRa beforS">
|
|
|
+ <p class="Stitle centertT">人员告警信息</p>
|
|
|
+ <div class="Chart flex-space">
|
|
|
+ <div style="width:50%" class="canvasParent centertT" onclick="giveAlarmDetails('giveAlarm','超时人数','姓名','部门','当前位置','下井时间',UrlRouter.getPersonnelTimeoutDetails,'')">
|
|
|
+ <div class="circularR sales">0人</div>
|
|
|
+ <span class="canvasTitle">超时人数</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="centertT" style="width:50%" onclick="giveAlarmDetails('giveAlarm','求救人数','姓名','部门','当前位置','下井时间',UrlRouter.getPersonnelHelpDetails,'')">
|
|
|
+ <div class="circularR cryhelp" style="border: 4px solid #FF8B8C;">0人</div>
|
|
|
+ <span class="canvasTitle">求救人数</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!--人员定位系统设备运行状态-->
|
|
|
+ <div class="Notice borderRa beforS">
|
|
|
+ <p class="Stitle centertT">人员定位系统设备运行状态</p>
|
|
|
+ <div class="equipmentStatus">
|
|
|
+ <ul class="flex-space" id="equipmentStatusList">
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!--井下人员(部门分布)-->
|
|
|
+ <div class="Notice borderRa beforS">
|
|
|
+ <p class="Stitle centertT">井下人员(部门分布)</p>
|
|
|
+ <div style="width:100%" class="canvasParent centertT">
|
|
|
+ <p class="centertT depTitle" style="margin-top:30px">职能科室</p>
|
|
|
+ <canvas id="department" style="width: 100%;height:350px"></canvas>
|
|
|
+ </div>
|
|
|
+ <div class="centertT" style="width:100%">
|
|
|
+ <p class="centertT depTitle">基层区队</p>
|
|
|
+ <canvas id="districtTeam" style="width: 100%;height:350px;"></canvas>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!--全矿周下井趋势-->
|
|
|
+ <div class="Notice borderRa beforS">
|
|
|
+ <p class="Stitle centertT">全矿周下井趋势</p>
|
|
|
+ <div class="Chart">
|
|
|
+ <div class="" style="width:100%">
|
|
|
+ <canvas id="moreDownWell" style="width: 100%;margin-top:10px;height:210px"></canvas>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!--井下重点岗位人员分布-->
|
|
|
+ <div class="Notice borderRa beforS">
|
|
|
+ <p class="Stitle centertT">井下重点岗位人员分布</p>
|
|
|
+ <ul class="flex-space keyPostList" id="keyPostList">
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <!--当前各科室井下人数-->
|
|
|
+ <div class="Notice borderRa">
|
|
|
+ <div class="Chart" style="margin-top:0">
|
|
|
+ <div class="flex-start">
|
|
|
+ <div class="relative screen" style="margin:auto">
|
|
|
+ <input id="button-value" class="js-picker" value="当前各科室下井人数">
|
|
|
+ <i class="lower"></i>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="" style="width:100%">
|
|
|
+ <canvas id="getDepartToday" style="width: 100%;"></canvas>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div id="noJurisdiction"> </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<!--侧滑 遮罩层-->
|
|
|
+<div class="right_side" onclick="recoveryFun()"></div>
|
|
|
+<!--列表-->
|
|
|
+<div class="list">
|
|
|
+ <p class="titles">
|
|
|
+ <span></span>
|
|
|
+ <i onclick="recoveryFun()"></i>
|
|
|
+ </p>
|
|
|
+ <ul class="api_lists" id="api_lists">
|
|
|
+ <li id="contetnNo">-暂无内容-</li>
|
|
|
+ </ul>
|
|
|
+ <div class="loading">
|
|
|
+ <i class="ico-loading"></i>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+
|
|
|
+
|
|
|
+<script type="text/template" id="template">
|
|
|
+ {{~it:value}}
|
|
|
+ <li onclick="seeMonitorList('{{=value.area_id}}','{{=value.area_name}}','')">
|
|
|
+ <div class="flex-start">
|
|
|
+ <img src="{{=value.thumb}}" alt="">
|
|
|
+ <span>{{=value.area_name}}</span>
|
|
|
+ </div>
|
|
|
+ <span class="num">{{=value.pepole_num}}人</span>
|
|
|
+ </li>
|
|
|
+ {{~}}
|
|
|
+</script>
|
|
|
+<script type="text/template" id="template01">
|
|
|
+ {{~it:value}}
|
|
|
+ <li onclick="personnelDeteila('{{=value.station_name}}','{{=value.station_id}}')">
|
|
|
+ <p>{{=value.station_name}}</p>
|
|
|
+ <div class="flex-start">
|
|
|
+ <p>{{=value.pepole_num}}人</p>
|
|
|
+ <i class="ico-more"></i>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ {{~}}
|
|
|
+</script>
|
|
|
+<script type="text/template" id="downWellTemplate">
|
|
|
+ {{~it:value}}
|
|
|
+ <li class="flex-start li-box centertT relative after-border">
|
|
|
+ <span>{{=value.name}}</span>
|
|
|
+ <span>{{=value.down_time}}</span>
|
|
|
+ <span>{{=value.station_name}}</span>
|
|
|
+ </li>
|
|
|
+ {{~}}
|
|
|
+</script>
|
|
|
+<script type="text/template" id="keyPostListTemplate">
|
|
|
+ {{~it:value}}
|
|
|
+ <li onclick="giveAlarmDetails('Working','{{=value.name}}','姓名','部门','当前位置','下井时间',UrlRouter.getPersonnelWorkingDetails,'{{=value.name}}')">
|
|
|
+ <span>{{=value.pepole_num}}个</span>
|
|
|
+ <p style="width:{{=it.length<4?'100%':'67px'}}">{{=value.name}}</p>
|
|
|
+ </li>
|
|
|
+ {{~}}
|
|
|
+</script>
|
|
|
+<script type="text/template" id="facilityStatusTemplate">
|
|
|
+ {{~it:value:index}}
|
|
|
+ <li onclick="giveAlarmDetails('equipmentStatus','{{=value.name}}','分站','','状态时间','状态',UrlRouter.getPersonnelFacilityDetails,'{{=value.type}}')">
|
|
|
+ <span class="hollowCircle">{{=value.num}}台</span>
|
|
|
+ <p class="canvasTitle">{{=value.name}}</p>
|
|
|
+ </li>
|
|
|
+ {{~}}
|
|
|
+</script>
|
|
|
+<script src="../../script/api.js"></script>
|
|
|
+<script src="../../script/doT.min.js"></script>
|
|
|
+<script src="../../script/popoPicker.js"></script>
|
|
|
+<script src="../../script/f2.js"></script>
|
|
|
+<script src="../../script/config.js"></script>
|
|
|
+<script>
|
|
|
+ var toast = new auiToast(),headers;
|
|
|
+ apiready = function () {
|
|
|
+ var info = $api.getStorage('data'),
|
|
|
+ token = JSON.parse(info).data.access_token;
|
|
|
+ $api.html($api.dom('.time-box'), getNowFormatDate());
|
|
|
+ setInterval(function () {
|
|
|
+ $api.html($api.dom('.time-box'), getNowFormatDate());
|
|
|
+ }, 1000)
|
|
|
+ headers = {
|
|
|
+ "Authorization": "Bearer " + token
|
|
|
+ };
|
|
|
+ monitorListFun();
|
|
|
+ // 当前下井人数
|
|
|
+ downWell();
|
|
|
+ // 井下人员(部门分布)
|
|
|
+ getDepartment();
|
|
|
+ getDistrit();
|
|
|
+ // 工作面人数统计
|
|
|
+ getWorkingTotal();
|
|
|
+ // 全矿下井人数
|
|
|
+ downWellFun();
|
|
|
+ // 各个部门人数统计
|
|
|
+ getDepartToday('now');
|
|
|
+ clickGetDepartToday();
|
|
|
+ // 人员定位系统设备运行状态
|
|
|
+ equipmentStatus();
|
|
|
+ // 超时
|
|
|
+ giveAlarm();
|
|
|
+ // 求救
|
|
|
+ giveHelp();
|
|
|
+
|
|
|
+ };
|
|
|
+ function monitorListFun(names) {
|
|
|
+ $http.fnReuestDataNologing(UrlRouter.getPersonnalList,headers,'post','',regionFun)
|
|
|
+ }
|
|
|
+ function regionFun(ret,err) {
|
|
|
+ if (ret.code === 0) {
|
|
|
+ $apis.html(monitorList,'#template',ret.data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function seeMonitorList(id,title,name) {
|
|
|
+ $api.removeCls($api.dom('.loading'), 'hide');
|
|
|
+ $api.html($api.dom('.titles>span'), title);
|
|
|
+ var list = document.querySelector('.list'),right_side = document.querySelector('.right_side');
|
|
|
+ list.style.right = '0';
|
|
|
+ right_side.style.right = '0';
|
|
|
+ var regionUuid ={
|
|
|
+ area_id:id,
|
|
|
+ };
|
|
|
+ $http.fnReuestDataNologing(UrlRouter.getPersonnalDistributionList,headers,'post',regionUuid,function (ret, err) {
|
|
|
+ if (ret.code === 0) {
|
|
|
+ if (ret.data.length>0) {
|
|
|
+ $apis.html(api_lists,'#template01',ret.data);
|
|
|
+ $api.addCls($api.dom('.loading'), 'hide');
|
|
|
+ }else {
|
|
|
+ $api.addCls($api.dom('.loading'), 'hide');
|
|
|
+ document.getElementById('contetnNo').style.display = 'block';
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ function recoveryFun() {
|
|
|
+ var list = document.querySelector('.list'),right_side = document.querySelector('.right_side');
|
|
|
+ list.style.right = '-75%';
|
|
|
+ right_side.style.right = '-100%';
|
|
|
+ }
|
|
|
+ // 人员详情
|
|
|
+ function personnelDeteila(name,ids) {
|
|
|
+ var pageParam = {
|
|
|
+ title:name,
|
|
|
+ id:ids
|
|
|
+ }
|
|
|
+ $event.openWin('personnalDeWin','personnalDeWin',pageParam,'');
|
|
|
+ };
|
|
|
+ // 当前下井人数
|
|
|
+ function downWell() {
|
|
|
+ $http.fnReuestDataNologing(UrlRouter.getPeopleNow,'','post','',function (ret,err) {
|
|
|
+ if (ret.code === 0) {
|
|
|
+ var data = ret.data.people_distribute;
|
|
|
+ $apis.html(downWellPersonnal,'#downWellTemplate',ret.data.people_list);
|
|
|
+ var map = {};
|
|
|
+ data.map(function(obj) {
|
|
|
+ map[obj.depart_name] = obj.pepole_num + '人';
|
|
|
+ });
|
|
|
+
|
|
|
+ var chart = new F2.Chart({
|
|
|
+ id: 'downWell',
|
|
|
+ pixelRatio: window.devicePixelRatio,
|
|
|
+ padding: [20, 'auto']
|
|
|
+ });
|
|
|
+ chart.source(data, {
|
|
|
+ percent: {
|
|
|
+ formatter: function formatter(val) {
|
|
|
+ return val + '人';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ chart.tooltip(false);
|
|
|
+ chart.legend({
|
|
|
+ position: 'right',
|
|
|
+ itemFormatter: function itemFormatter(val) {
|
|
|
+ return val + ' ' + map[val];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ chart.coord('polar', {
|
|
|
+ transposed: true,
|
|
|
+ innerRadius: 0.7,
|
|
|
+ radius: 0.85
|
|
|
+ });
|
|
|
+ chart.axis(false);
|
|
|
+ chart.interval().position('const*pepole_num').color('depart_name', ['#1890FF', '#13C2C2', '#2FC25B', '#FACC14', '#F04864', '#8543E0', '#3436C7', '#223273']).adjust('stack');
|
|
|
+
|
|
|
+ chart.guide().html({
|
|
|
+ position: ['50%', '45%'],
|
|
|
+ html: '<div style="width: 250px;height: 40px;text-align: center;">' + '<div style="font-size: 16px">总人数</div>' + '<div style="font-size: 18px">'+ret.data.people_total+'人</div>' + '</div>'
|
|
|
+ });
|
|
|
+ chart.render();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 井下人员(部门分布)
|
|
|
+ function getDepartment() {
|
|
|
+ // 职能科室
|
|
|
+ $http.fnReuestDataNologing(UrlRouter.getOfficeTotal,'','post','',function (ret,err) {
|
|
|
+ if (ret.code === 0) {
|
|
|
+ var data = ret.data;
|
|
|
+ var districtTeamChart = new F2.Chart({
|
|
|
+ id: 'department',
|
|
|
+ pixelRatio: window.devicePixelRatio
|
|
|
+ });
|
|
|
+
|
|
|
+ districtTeamChart.source(data);
|
|
|
+ districtTeamChart.coord('polar', {
|
|
|
+ transposed: true,
|
|
|
+ innerRadius: 0.6,
|
|
|
+ radius: 0.75
|
|
|
+ });
|
|
|
+ districtTeamChart.axis(false);
|
|
|
+ districtTeamChart.legend({
|
|
|
+ position: 'bottom',
|
|
|
+ align: 'center'
|
|
|
+ });
|
|
|
+ districtTeamChart.tooltip(false);
|
|
|
+ districtTeamChart.guide().html({
|
|
|
+ position: ['50%', '50%'],
|
|
|
+ html: '<div style="width: 100px;height: 20px;text-align: center;line-height: 20px;" id="textContent"></div>'
|
|
|
+ });
|
|
|
+ // 配置文本饼图
|
|
|
+ districtTeamChart.pieLabel({
|
|
|
+ sidePadding: 10,
|
|
|
+ anchorOffset:10,
|
|
|
+ activeShape: true,
|
|
|
+ label1: function label1(data) {
|
|
|
+ return {
|
|
|
+ text: data.depart_name,
|
|
|
+ fill: '#808080'
|
|
|
+ };
|
|
|
+ },
|
|
|
+ label2: function label2(data) {
|
|
|
+ return {
|
|
|
+ fill: '#000000',
|
|
|
+ text: data.pepole_num +'人',
|
|
|
+ fontWeight: 500,
|
|
|
+ fontSize: 10
|
|
|
+ };
|
|
|
+ },
|
|
|
+ onClick: function onClick(ev) {
|
|
|
+ var data = ev.data;
|
|
|
+ if (data) {
|
|
|
+ $api.html($api.dom('.title'), data.depart_name);
|
|
|
+ $api.html($api.dom('.personalNum'), data.pepole_num+'人');
|
|
|
+ giveAlarmDetails('depart_id',data.depart_name,'姓名','部门','当前位置','下井时间',UrlRouter.getPersonneldepartDetails,data.depart_id)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ districtTeamChart.interval().position('const*pepole_num').color('depart_name', ['#1890FF', '#13C2C2', '#2FC25B', '#FACC14', '#F04864', '#8543E0', '#3436C7', '#223273']).adjust('stack');
|
|
|
+ districtTeamChart.guide().html({
|
|
|
+ position: ['50%', '50%'],
|
|
|
+ html: '<div style="width: 250px;height: 40px;text-align: center;">' + '<div style="font-size: 17px" class="title">总人数</div>' + '<div style="font-size: 17px" class="personalNum">'+ret.people_total+'人</div>' + '</div>'
|
|
|
+ });
|
|
|
+ districtTeamChart.render();
|
|
|
+ districtTeamChart.get('canvas').draw();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 基层区队
|
|
|
+ function getDistrit() {
|
|
|
+ $http.fnReuestDataNologing(UrlRouter.getBasicTotal,'','post','',function (ret,err) {
|
|
|
+ if (ret.code === 0) {
|
|
|
+ // 基层区队
|
|
|
+ var data = ret.data
|
|
|
+ var districtTeamChart = new F2.Chart({
|
|
|
+ id: 'districtTeam',
|
|
|
+ pixelRatio: window.devicePixelRatio
|
|
|
+ });
|
|
|
+
|
|
|
+ districtTeamChart.source(data);
|
|
|
+ districtTeamChart.coord('polar', {
|
|
|
+ transposed: true,
|
|
|
+ innerRadius: 0.6,
|
|
|
+ radius: 0.85
|
|
|
+ });
|
|
|
+ districtTeamChart.axis(false);
|
|
|
+ districtTeamChart.legend({
|
|
|
+ position: 'bottom',
|
|
|
+ align: 'center'
|
|
|
+ });
|
|
|
+ districtTeamChart.tooltip(false);
|
|
|
+ districtTeamChart.guide().html({
|
|
|
+ position: ['50%', '50%'],
|
|
|
+ html: '<div style="width: 100px;height: 20px;text-align: center;line-height: 20px;" id="textContent"></div>'
|
|
|
+ });
|
|
|
+ // 配置文本饼图
|
|
|
+ districtTeamChart.pieLabel({
|
|
|
+ sidePadding: 10,
|
|
|
+ activeShape: true,
|
|
|
+ label1: function label1(data) {
|
|
|
+ return {
|
|
|
+ text: data.depart_name,
|
|
|
+ fill: '#808080'
|
|
|
+ };
|
|
|
+ },
|
|
|
+ label2: function label2(data) {
|
|
|
+ return {
|
|
|
+ fill: '#000000',
|
|
|
+ text: data.pepole_num +'人',
|
|
|
+ fontWeight: 500,
|
|
|
+ fontSize: 10
|
|
|
+ };
|
|
|
+ },
|
|
|
+ onClick: function onClick(ev) {
|
|
|
+ var data = ev.data;
|
|
|
+ if (data) {
|
|
|
+ $api.html($api.dom('.title1'), data.depart_name);
|
|
|
+ $api.html($api.dom('.personalNum1'), data.pepole_num+'人');
|
|
|
+ giveAlarmDetails('depart_id',data.depart_name,'姓名','部门','当前位置','下井时间',UrlRouter.getPersonneldepartDetails,data.depart_id)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ districtTeamChart.interval().position('const*pepole_num').color('depart_name', ['#1890FF', '#13C2C2', '#2FC25B', '#FACC14', '#F04864', '#8543E0', '#3436C7', '#223273']).adjust('stack');
|
|
|
+ districtTeamChart.guide().html({
|
|
|
+ position: ['50%', '50%'],
|
|
|
+ html: '<div style="width: 250px;height: 40px;text-align: center;">' + '<div style="font-size: 17px" class="title1">总人数</div>' + '<div style="font-size: 17px" class="personalNum1">'+ret.people_total+'人</div>'+'</div>'
|
|
|
+ });
|
|
|
+ districtTeamChart.render();
|
|
|
+ // 绘制内阴影
|
|
|
+ districtTeamChart.get('canvas').draw();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 工作面数据
|
|
|
+ function getWorkingTotal() {
|
|
|
+ $http.fnReuestDataNologing(UrlRouter.getWorkingTotal,'','post','',function (ret,err) {
|
|
|
+ if (ret.code === 0) {
|
|
|
+ $apis.html(keyPostList,'#keyPostListTemplate',ret.data);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 全矿一周周下井趋势
|
|
|
+ function downWellFun() {
|
|
|
+ $http.fnReuestDataNologing(UrlRouter.downWellTotal,'','post','',function(ret,err){
|
|
|
+ if (ret && ret.code === 0) {
|
|
|
+ api.refreshHeaderLoadDone();
|
|
|
+ var data = ret.data;
|
|
|
+ var chart = new F2.Chart({
|
|
|
+ id: 'moreDownWell',
|
|
|
+ pixelRatio: window.devicePixelRatio
|
|
|
+ });
|
|
|
+ chart.source(data, {
|
|
|
+ 'pepole_num': {
|
|
|
+ tickCount: 5
|
|
|
+ }
|
|
|
+ });
|
|
|
+ chart.tooltip({
|
|
|
+ custom: false, // 自定义 tooltip 内容框
|
|
|
+ });
|
|
|
+ chart.interval().position('dater*pepole_num').color('classes').adjust('stack');
|
|
|
+ chart.render();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // 当前人数
|
|
|
+ $http.fnReuestDataNologing(UrlRouter.currentPersonalNum,'','post','',function(ret,err){
|
|
|
+ if (ret && ret.code === 0 && ret.data.length > 0) {
|
|
|
+ $api.html($api.dom('.currentNum'), '当前下井人数:'+ret.data[0].pepole_num +'人');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // 各个部门人数统计
|
|
|
+ var chart = ""
|
|
|
+ function getDepartToday(types) {
|
|
|
+ $http.fnReuestDataNologing(UrlRouter.getDepartToday,'','post',{type:types},function(ret,err){
|
|
|
+ if (ret.code === 0) {
|
|
|
+ var data = ret.data;
|
|
|
+ chart = new F2.Chart({
|
|
|
+ id: 'getDepartToday',
|
|
|
+ height:1500,
|
|
|
+ pixelRatio: window.devicePixelRatio
|
|
|
+ });
|
|
|
+ chart.source(data, {
|
|
|
+ pepole_num: {
|
|
|
+ tickCount: 5
|
|
|
+ }
|
|
|
+ });
|
|
|
+ chart.coord({
|
|
|
+ transposed: true
|
|
|
+ });
|
|
|
+ chart.axis('depart_name', {
|
|
|
+ line: null,
|
|
|
+ label: function label(text, index, total) {
|
|
|
+ var textCfg = {};
|
|
|
+ if (index === 0) {
|
|
|
+ textCfg.textAlign = 'end';
|
|
|
+ } else if (index === total - 1) {
|
|
|
+ textCfg.textAlign = 'end';
|
|
|
+ }
|
|
|
+ textCfg.fontSize = 12
|
|
|
+ return textCfg;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ chart.tooltip(false);
|
|
|
+ data.map(function(obj) {
|
|
|
+ chart.guide().text({
|
|
|
+ position: [obj.depart_name, obj.pepole_num],
|
|
|
+ content: obj.pepole_num+'人',
|
|
|
+ style: {
|
|
|
+ textBaseline: 'bottom',
|
|
|
+ textAlign: 'center'
|
|
|
+ },
|
|
|
+ offsetY: 7,
|
|
|
+ offsetX:15
|
|
|
+ });
|
|
|
+ });
|
|
|
+ chart.interval().position('depart_name*pepole_num');
|
|
|
+ chart.render();
|
|
|
+ chart.interaction('interval-select', {
|
|
|
+ selectAxisStyle: {
|
|
|
+ fill: '#000',
|
|
|
+ fontWeight: 'bold'
|
|
|
+ },
|
|
|
+ startEvent:'tap',
|
|
|
+ mode: 'range',
|
|
|
+ onStart: function onEnd(ev) {
|
|
|
+ var data = ev.data,
|
|
|
+ selected = ev.selected;
|
|
|
+ if (data && data.pepole_num != 0) {
|
|
|
+ if (types === "now") {
|
|
|
+ giveAlarmDetails('depart_id',data.depart_name,'姓名','部门','当前位置','下井时间',UrlRouter.getPersonneldepartDetails,data.depart_id)
|
|
|
+ }
|
|
|
+ if (types === "today") {
|
|
|
+ giveAlarmDetails('today',data.depart_name,'姓名','部门','下井时间','上井时间',UrlRouter.getPersonneltodayDetails,data.depart_id)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 点击切换各个部门人数统计
|
|
|
+ function clickGetDepartToday() {
|
|
|
+ new popoPicker('.js-picker',{
|
|
|
+ container:'.screen',
|
|
|
+ wheels: [{
|
|
|
+ infinite: false,
|
|
|
+ //selected: 3,
|
|
|
+ data:[
|
|
|
+ {value:'now',display:'当前各科室下井人数'},
|
|
|
+ {value:'today',display:'今日各科室下井人数'},
|
|
|
+ ]
|
|
|
+ }],
|
|
|
+ background:'light',
|
|
|
+ save:function (data) {
|
|
|
+ if (data.result[0].value === 'now') {
|
|
|
+ chart.destroy();
|
|
|
+ getDepartToday('now');
|
|
|
+ }else if (data.result[0].value === 'today') {
|
|
|
+ chart.destroy();
|
|
|
+ getDepartToday('today');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // 人员定位系统设备运行状态
|
|
|
+ function equipmentStatus() {
|
|
|
+ $http.fnReuestDataNologing(UrlRouter.getFacilityStatus,'','post','',function (ret,err) {
|
|
|
+ if (ret.code === 0) {
|
|
|
+ $apis.html(equipmentStatusList,'#facilityStatusTemplate',ret.data);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 人员告警信息 超时
|
|
|
+ function giveAlarm() {
|
|
|
+ $http.fnReuestDataNologing(UrlRouter.getTimeout,'','post','',function (ret,err) {
|
|
|
+ if (ret.code === 0) {
|
|
|
+ $api.html($api.dom('.sales'), ret.data.timeout_num+'人');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 人员告警信息 求救人数
|
|
|
+ function giveHelp() {
|
|
|
+ $http.fnReuestDataNologing(UrlRouter.getHelptotal,'','post','',function (ret,err) {
|
|
|
+ if (ret.code === 0) {
|
|
|
+ $api.html($api.dom('.cryhelp'), ret.data.pepole_num+'人');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 详情
|
|
|
+ // 超时人数详情 // 求救人数详情 // 设备运行状态详情 // 井下重点岗位人员分布详情
|
|
|
+ function giveAlarmDetails(moduleType,title,name,dep,position,time,url,moduleParam) {
|
|
|
+ var params = {
|
|
|
+ moduleType:moduleType,
|
|
|
+ title:title,
|
|
|
+ name:name,
|
|
|
+ dep:dep,
|
|
|
+ position:position,
|
|
|
+ time:time,
|
|
|
+ url:url,
|
|
|
+ moduleParam:moduleParam
|
|
|
+ }
|
|
|
+ $event.openWin('personnelLocationDetails','personnelLocationDetails',params,'');
|
|
|
+ }
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|