123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- <!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>评价统计</title>
- <link rel="stylesheet" href="/static/antv/f2.style.css" />
- <script src="/static/antv/f2.min.js"></script>
- <script type="text/javascript" src="/static/jquery-2.2.4.min.js"></script>
- <style>
- html,body {
- overflow-y: scroll;
- -webkit-overflow-scrolling: touch;
- background: #f1f1f1;
- }
- html,body,ul {
- margin: 0;
- padding: 0;
- }
- .select-tab {
- border-radius:10px;
- margin: 10px 10px 0;
- background: #fff;
- }
- .nav {
- display: flex;
- display: -webkit-flex;
- justify-content: center;
- align-items: center;
- border:1px solid #148d8f;
- 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: #148d8f;
- }
- .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;
- background-color: #fff;
- border-radius: 10px;
- }
- .record-data {
- display: flex;
- display: -webkit-flex;
- justify-content: center;
- align-items: center;
- height: 7vh;
- }
- .first span {
- color: #148d8f;
- font-size: 18px;
- font-weight: bold;
- }
- .line:not(:last-child) {
- margin: 0 15px;
- height: 1px;
- background-color: #CCCCCC;
- }
- .daily-title, .daily-nums, .daily-count {
- flex: 1;
- text-align: center;
- display: inline-block;
- font-size: 17px;
- font-weight: 500;
- }
- .daily-title {
- margin-left: 5px;
- }
- .daily-nums {
- margin-right: 5px;
- /*color:rgba(153,153,153,1);*/
- }
- .text {
- color:rgba(153,153,153,1);
- }
- .chart-wrapper {
- margin: 10px;
- background: linear-gradient(288deg,#8ce4f3,#148d8f);
- border-radius:10px;
- -webkit-text-fill-color: transparent;
- }
- </style>
- </head>
- <body>
- <div class="select-tab">
- <ul id="myTab" class="nav nav-tabs">
- <li {eq name="type" value="1"}class="active"{/eq}>
- <a href="{:url('comment',['type'=>1,'orgId'=>$orgId])}">日评价统计</a>
- </li>
- <li {eq name="type" value="2"}class="active"{/eq}>
- <a href="{:url('comment',['type'=>2,'orgId'=>$orgId])}">月评价统计</a>
- </li>
- <li {eq name="type" value="3"}class="active"{/eq}>
- <a href="{:url('comment',['type'=>3,'orgId'=>$orgId])}">总评价统计</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">
- <span class="daily-title">业务类型</span>
- <span class="daily-count">评价总数</span>
- <span class="daily-nums">平均得分</span>
- </div>
- <div class="line"></div>
- {volist name="list" id="v"}
- <div class="record-data" onclick="comment(this)" data-orgId="{$orgId}" data-day="{$type}" data-mode="{$v['work_type_mode']}">
- <span class="daily-title text">{$v['year']}</span>
- <span class="daily-count text">{$v['count']}</span>
- <span class="daily-nums text">{$v['sales']}</span>
- </div>
- <div class="line"></div>
- {/volist}
- </div>
- <script>
- function comment(obj) {
- var orgId = $(obj).attr('data-orgId');
- var day = $(obj).attr('data-day');
- var mode = $(obj).attr('data-mode');
- var url = "{:url('Statistics/commentList')}?mode="+mode+'&orgId='+orgId+'&day='+day;
- window.location.href=url;
- }
- </script>
- <script>
- var data = {:json_encode($list)};
- var chart = new F2.Chart({
- id: 'mountNode',
- pixelRatio: window.devicePixelRatio
- });
- var defs = {
- year: {
- type: 'cat'
- },
- sales: {
- min: 0,
- max: 5
- }
- };
- chart.source(data,defs);
- chart.tooltip({
- showItemMarker: false,
- onShow: function onShow(ev) {
- var items = ev.items;
- items[0].name = null;
- items[0].name = items[0].title;
- items[0].value = items[0].value + '分';
- }
- });
- chart.axis('year', {
- label: function label() {
- return {
- fontSize: 12,
- fill: '#fff'
- };
- }
- });
- chart.axis('sales', {
- label: function label() {
- return {
- fontSize: 12,
- fill: '#fff'
- };
- }
- });
- chart.guide().text({
- position: ['45%', '1%'],
- content: '各业务平均得分',
- style: {
- fontSize: 14,
- textBaseline: 'middle',
- textAlign: 'center',
- fill: '#fff'
- },
- offsetY: -23
- });
- chart.interval().position('year*sales');
- chart.render();
- </script>
- </body>
- </html>
|