123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>{$mode_name['name']}统计</title>
- <link rel="stylesheet" href="/static/antv/f2.style.css" />
- <script type="text/javascript" src="/static/jquery-2.2.4.min.js"></script>
- <link rel="stylesheet" href="/static/h5/css/common.css">
- <style>
- html,body,ul {
- margin: 0;
- padding: 0;
- }
- html,body {
- overflow-y: scroll;
- -webkit-overflow-scrolling: touch;
- background-color: #F1F1F1;
- }
- .select-tab {
- margin: 10px 10px 0;
- border-radius: 10px;
- background: #fff;
- }
- .nav {
- display: flex;
- display: -webkit-flex;
- justify-content: center;
- -webkit-justify-content: center;
- align-items: center;
- border:1px solid var(--themeColor);
- border-radius:5px;
- list-style: none;
- }
- .nav>li {
- width: 100%;
- flex: 1;
- text-align: center;
- display: block;
- }
- .nav-tabs>li.active>a {
- line-height: 2;
- font-size: 16px;
- color: #fff;
- font-weight: 500;
- cursor: default;
- background-color: var(--themeColor);
- }
- .nav-tabs>li>a {
- line-height: 2;
- font-size: 16px;
- color: #999999;
- font-weight: 500;
- }
- a {
- display: block;
- text-decoration: none;
- }
- .daily-record {
- margin: 10px;
- border-radius: 10px;
- background: #fff;
- }
- .chart-wrapper {
- margin: 10px;
- border-radius: 10px;
- background: #fff;
- }
- .record-data {
- display: flex;
- display: -webkit-flex;
- justify-content: space-between;
- -webkit-justify-content: space-between;
- align-items: center;
- -webkit-box-align: center;
- height: 7vh;
- }
- .line {
- margin: 0 15px;
- height: 1px;
- background-color: #CCCCCC;
- }
- .daily-title, .daily-nums {
- display: inline;
- font-size: 17px;
- font-weight: 500;
- }
- .daily-title {
- margin-left: 15px;
- }
- .daily-nums {
- margin-right: 15px;
- color:rgba(153,153,153,1);
- }
- </style>
- </head>
- <body>
- <div class="select-tab">
- <ul id="myTab" class="nav nav-tabs">
- <li {eq name="type" value="0"}class="active"{/eq}>
- <a href="{:url('patrol',['type'=>0,'orgId'=>$orgId,'mode'=>$mode])}" data-toggle="tab">日{$mode_name['name']}统计</a>
- </li>
- <li {eq name="type" value="1"}class="active"{/eq}>
- <a href="{:url('patrol',['type'=>1,'orgId'=>$orgId,'mode'=>$mode])}" data-toggle="tab">月{$mode_name['name']}统计</a>
- </li>
- <li {eq name="type" value="2"}class="active"{/eq}>
- <a href="{:url('patrol',['type'=>2,'orgId'=>$orgId,'mode'=>$mode])}" data-toggle="tab">总{$mode_name['name']}统计</a>
- </li>
- </ul>
- </div>
- <div class="chart-wrapper">
- <canvas id="mountNode" style="width: 100%;"></canvas>
- </div>
- <div class="daily-record">
- <div class="record-data first">
- {eq name="type" value="0"}
- <div onclick="patrol(this)" data-type="1" data-mode="{$mode}" data-day="{$type}" data-orgId="{$orgId}" style="width: 100%">
- <span class="daily-title">今日总次数</span>
- <span class="daily-nums" style="float: right">{$allcount}</span>
- </div>
- {/eq}
- {eq name="type" value="1"}
- <div onclick="patrol(this)" data-type="1" data-mode="{$mode}" data-day="{$type}" data-orgId="{$orgId}" style="width: 100%">
- <span class="daily-title" >本月总次数</span>
- <span class="daily-nums" style="float: right">{$allcount}</span>
- </div>
- {/eq}
- {eq name="type" value="2"}
- <div onclick="patrol(this)" data-type="1" data-mode="{$mode}" data-day="{$type}" data-orgId="{$orgId}" style="width: 100%">
- <span class="daily-title" >历史总次数</span>
- <span class="daily-nums" style="float: right">{$allcount}</span>
- </div>
- {/eq}
- </div>
- <div class="line"></div>
- <div class="record-data">
- <span class="daily-title">地点</span>
- <span class="daily-nums">{$bluetooth}</span>
- </div>
- <div class="line"></div>
- <div class="record-data" onclick="patrol(this)" data-type="2" data-mode="{$mode}" data-day="{$type}" data-orgId="{$orgId}">
- <span class="daily-title">已完成</span>
- <span class="daily-nums">{$complete}</span>
- </div>
- <div class="line"></div>
- <div class="record-data" onclick="patrol(this)" data-type="3" data-mode="{$mode}" data-day="{$type}" data-orgId="{$orgId}">
- <span class="daily-title">未完成</span>
- <span class="daily-nums">{$incomplete}</span>
- </div>
- <div class="line"></div>
- <div class="record-data">
- <span class="daily-title">完成比</span>
- <span class="daily-nums">{$ratio}%</span>
- </div>
- </div>
- <script src="/static/antv/f2.min.js"></script>
- <script>
- var fontSize = 24 * (window.innerWidth / 375); // 字体适配不同屏幕
- var data = [{
- x: '1',
- y: {$ratio}
- }];
- var chart = new F2.Chart({
- id: 'mountNode',
- pixelRatio: window.devicePixelRatio
- });
- chart.source(data, {
- y: {
- max: 100,
- min: 0
- }
- });
- chart.axis(false);
- chart.tooltip(false);
- chart.coord('polar', {
- transposed: true,
- innerRadius: 0.8,
- radius: 0.85
- });
- chart.guide().arc({
- start: [0, 0],
- end: [1, 99.98],
- top: false,
- style: {
- lineWidth: 20,
- stroke: '#ccc'
- }
- });
- chart.guide().html({
- position: ['50%', '50%'],
- html: '<div style="width: 250px;height: 40px;text-align: center;">' + '<div style="font-size: 28px;font-weight: 700;color: #089875;">{$ratio}%</div>' + '<div style="font-size: 16px;font-weight:bold;">完成进度</div>' + '</div>'
- });
- // chart.guide().text({
- // position: ['50%', '50%'],
- // content: '85%',
- // style: {
- // fontSize: fontSize,
- // fill: '#1890FF'
- // }
- // });
- chart.interval().position('x*y').color('y', '#089875').size(20).animate({
- appear: {
- duration: 1200,
- easing: 'cubicIn'
- }
- });
- chart.render();
- </script>
- </body>
- </html>
- <script>
- function patrol(obj) {
- var type = $(obj).attr('data-type');
- var day = $(obj).attr('data-day');
- var mode = $(obj).attr('data-mode');
- var org = $(obj).attr('data-orgId');
- var url = "{:url('Statistics/patrolList')}?type="+type+'&orgId='+org+'&day='+day+'&mode='+mode;
- window.location.href=url;
- }
- </script>
|