| | |
| | | <div class="layui-col-xs12 layui-col-md8"> |
| | | <div class="layui-card" style=""> |
| | | <div class="layui-card-header">活动实时交易情况</div> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-card-body" style="padding-bottom: 20px;"> |
| | | <div class="layui-row"> |
| | | <div>团队数据</div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="numberInfoSubTitle">今日交易总额</div> |
| | | <div class="numberInfoSubTitle">全年目标</div> |
| | | <div class="numberInfoValue"> |
| | | 124,543,233<em class="numberInfoSuffix">元</em> |
| | | <span id="companyYearTarget">124,543,233</span><em class="numberInfoSuffix">元</em> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="numberInfoSubTitle">销售目标完成率</div> |
| | | <div class="numberInfoValue">92%</div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="numberInfoSubTitle">活动剩余时间</div> |
| | | <div class="numberInfoValue">00:57:10</div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="numberInfoSubTitle">每秒交易总额</div> |
| | | <div class="numberInfoSubTitle">已完成交易</div> |
| | | <div class="numberInfoValue"> |
| | | 234<em class="numberInfoSuffix">元</em> |
| | | <span id="companySuccess">124,543,233</span><em class="numberInfoSuffix">元</em> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="numberInfoSubTitle">未完成交易</div> |
| | | <div class="numberInfoValue"> |
| | | <span id="companyProgress">124,543,233</span><em class="numberInfoSuffix">元</em> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="numberInfoSubTitle">交易率</div> |
| | | <div class="numberInfoValue"><span id="companyRate">92</span>%</div> |
| | | </div> |
| | | </div> |
| | | <div style="text-align: center;padding: 30px 0 10px 0;"> |
| | | <img src="https://gw.alipayobjects.com/zos/rmsportal/HBWnDEUXCnGnGrRfrpKa.png" |
| | | style="max-height: 437px; max-width: 100%;" alt="map"> |
| | | <div class="layui-row" style="margin-top: 50px;"> |
| | | <div>个人数据</div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="numberInfoSubTitle">全年目标</div> |
| | | <div class="numberInfoValue"> |
| | | <span id="personYearTarget">124,543,233</span><em class="numberInfoSuffix">元</em> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="numberInfoSubTitle">已完成交易</div> |
| | | <div class="numberInfoValue"> |
| | | <span id="personSuccess">124,543,233</span><em class="numberInfoSuffix">元</em> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="numberInfoSubTitle">未完成交易</div> |
| | | <div class="numberInfoValue"> |
| | | <span id="personProgress">124,543,233</span><em class="numberInfoSuffix">元</em> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="numberInfoSubTitle">交易率</div> |
| | | <div class="numberInfoValue"><span id="personRate">92</span>%</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-col-xs12 layui-col-md4"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-header">活动情况</div> |
| | | <div class="layui-card-body" style="height: 240px;overflow: hidden;"> |
| | | <div id="hdqkyc" style="width: 100%;height: 260px;"></div> |
| | | <div class="layui-card" style="height: 299px;overflow: hidden;"> |
| | | <div class="layui-card-header">公司公告</div> |
| | | <div class="layui-card-body" id="companyPostId"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-header">业绩效率</div> |
| | | <div class="layui-card-body" style="height: 222px;overflow: hidden;"> |
| | | <div id="hjxl" style="width: 100%;height: 280px;margin-top: -20px;"></div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <div class="layui-col-xs12"> |
| | |
| | | <div class="layui-card-body"> |
| | | <div class="layui-tab layui-tab-brief" lay-filter="tabZZT"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">销售额</li> |
| | | <li>访问量</li> |
| | | <li class="layui-this">交易额</li> |
| | | <!-- <li>访问量</li>--> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | |
| | | </colgroup> |
| | | <thead> |
| | | <tr style="background: none;color: #333;"> |
| | | <th colspan="3">员工销售额排行</th> |
| | | <th colspan="3">员工交易额排行</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr> |
| | | <td><span class="layui-badge layui-bg-cyan">1</span></td> |
| | | <td>aaa</td> |
| | | <td>323,234</td> |
| | | </tr> |
| | | <tr> |
| | | <td><span class="layui-badge layui-bg-cyan">2</span></td> |
| | | <td>bbb</td> |
| | | <td>323,234</td> |
| | | </tr> |
| | | <tr> |
| | | <td><span class="layui-badge layui-bg-cyan">3</span></td> |
| | | <td>ccc</td> |
| | | <td>323,234</td> |
| | | </tr> |
| | | <tr> |
| | | <td><span class="layui-badge layui-bg-gray">4</span></td> |
| | | <td>ddd</td> |
| | | <td>323,234</td> |
| | | </tr> |
| | | <tr> |
| | | <td><span class="layui-badge layui-bg-gray">5</span></td> |
| | | <td>eee</td> |
| | | <td>323,234</td> |
| | | </tr> |
| | | <tr> |
| | | <td><span class="layui-badge layui-bg-gray">6</span></td> |
| | | <td>fff</td> |
| | | <td>323,234</td> |
| | | </tr> |
| | | <tr> |
| | | <td><span class="layui-badge layui-bg-gray">7</span></td> |
| | | <td>ggg</td> |
| | | <td>323,234</td> |
| | | </tr> |
| | | <tbody id="staffRankId"> |
| | | |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/echarts/echarts.min.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/echarts/echartsTheme.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | |
| | | <script> |
| | | layui.use(['layer', 'element'], function () { |
| | |
| | | var layer = layui.layer; |
| | | var element = layui.element; |
| | | |
| | | // 渲染活动情况预测 |
| | | var myCharts = echarts.init(document.getElementById('hdqkyc'), myEchartsTheme); |
| | | var mData = [50, 100, 150, 80, 120, 150, 200, 250, 220, 250, 300, 350, 400, 380, 440, 450, 500, 550, 500]; |
| | | var option = { |
| | | title: { |
| | | text: '有望达到预期', |
| | | subtext: '目标评估', |
| | | textStyle: { |
| | | color: '#000' |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: "axis" |
| | | }, |
| | | xAxis: [{ |
| | | type: "category", |
| | | boundaryGap: !1, |
| | | data: ["06:00", "06:30", "07:00", "07:30", "08:00", "08:30", "09:00", "09:30", "10:00", "11:30", "12:00", "12:30", "13:00", "13:30", "14:00", "14:30", "15:00", "15:30", "16:00"] |
| | | }], |
| | | yAxis: [{ |
| | | type: "value" |
| | | }], |
| | | series: [{ |
| | | name: "金额", |
| | | type: "line", |
| | | smooth: !0, |
| | | itemStyle: { |
| | | normal: { |
| | | areaStyle: { |
| | | type: "default" |
| | | } |
| | | } |
| | | }, |
| | | data: mData |
| | | }] |
| | | }; |
| | | myCharts.setOption(option); |
| | | |
| | | // 动态改变图表1数据 |
| | | setInterval(function () { |
| | | for (var i = 0; i < mData.length; i++) { |
| | | mData[i] += (Math.random() * 50 - 25); |
| | | if (mData[i] < 0) { |
| | | mData[i] = 0; |
| | | } |
| | | } |
| | | myCharts.setOption({ |
| | | series: [{ |
| | | data: mData |
| | | }] |
| | | }); |
| | | }, 1000); |
| | | |
| | | // 渲染券核效率图表 |
| | | var myCharts2 = echarts.init(document.getElementById('hjxl'), myEchartsTheme); |
| | | var option2 = { |
| | | tooltip: { |
| | | formatter: "{a} <br/>{b} : {c}%" |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '业绩效率', |
| | | type: 'gauge', |
| | | detail: {formatter: '{value}%'}, |
| | | data: [{value: 80, name: '命中率'}] |
| | | } |
| | | ] |
| | | }; |
| | | myCharts2.setOption(option2); |
| | | |
| | | // 渲染销售额图表 |
| | | var myCharts3 = echarts.init(document.getElementById('xse'), myEchartsTheme); |
| | | var option3 = { |
| | | title: { |
| | | text: '销售趋势', |
| | | textStyle: { |
| | | color: '#000', |
| | | fontSize: 14 |
| | | } |
| | | }, |
| | | tooltip: {}, |
| | | grid: { |
| | | left: '0', |
| | | right: '0', |
| | | bottom: '0', |
| | | containLabel: true |
| | | }, |
| | | xAxis: { |
| | | data: ['1月', '2月', '3月', '4月', '6月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] |
| | | }, |
| | | yAxis: {}, |
| | | series: [{ |
| | | type: 'bar', |
| | | data: [726, 1013, 690, 892, 982, 570, 536, 546, 988, 1002, 206, 506], |
| | | barMaxWidth: 45 |
| | | }] |
| | | }; |
| | | myCharts3.setOption(option3); |
| | | |
| | | // 渲染访问量图表 |
| | | var myCharts4 = echarts.init(document.getElementById('fwl'), myEchartsTheme); |
| | | var option4 = { |
| | | title: { |
| | | text: '访问量趋势', |
| | | textStyle: { |
| | | color: '#000', |
| | | fontSize: 14 |
| | | } |
| | | }, |
| | | tooltip: {}, |
| | | grid: { |
| | | left: '0', |
| | | right: '0', |
| | | bottom: '0', |
| | | containLabel: true |
| | | }, |
| | | xAxis: { |
| | | data: ['1月', '2月', '3月', '4月', '6月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] |
| | | }, |
| | | yAxis: {}, |
| | | series: [{ |
| | | type: 'bar', |
| | | data: [558, 856, 880, 1325, 982, 856, 655, 546, 988, 985, 568, 302], |
| | | barMaxWidth: 45 |
| | | }] |
| | | }; |
| | | myCharts4.setOption(option4); |
| | | |
| | | // 切换选项卡重新渲染 |
| | | element.on('tab(tabZZT)', function (data) { |
| | | if (data.index == 0) { |
| | | myCharts3.resize(); |
| | | } else { |
| | | myCharts4.resize(); |
| | | //获取团队数据 |
| | | $.ajax({ |
| | | url: baseUrl + "/dashboard/companyData/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {}, |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | $("#companyYearTarget").text(res.data.yearTarget) |
| | | $("#companySuccess").text(res.data.successMoney) |
| | | $("#companyProgress").text(res.data.progressMoney) |
| | | $("#companyRate").text(res.data.yearTransactionRate) |
| | | } |
| | | }); |
| | | |
| | | //获取个人数据 |
| | | $.ajax({ |
| | | url: baseUrl + "/dashboard/personData/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {}, |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | $("#personYearTarget").text(res.data.yearTarget) |
| | | $("#personSuccess").text(res.data.successMoney) |
| | | $("#personProgress").text(res.data.progressMoney) |
| | | $("#personRate").text(res.data.yearTransactionRate) |
| | | } |
| | | }); |
| | | |
| | | //获取员工交易额排行 |
| | | $.ajax({ |
| | | url: baseUrl + "/dashboard/staffRank/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {}, |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | let data = res.data |
| | | for (var i = 0; i < data.length; i++) { |
| | | let div = "<tr>"; |
| | | if (i < 3) { |
| | | div += "<td><span class='layui-badge layui-bg-cyan'>" + (i+1) + "</span></td>" |
| | | }else { |
| | | div += "<td><span class='layui-badge layui-bg-gray'>" + (i+1) + "</span></td>" |
| | | } |
| | | |
| | | div += "<td>" + data[i].username + "</td>" |
| | | div += "<td>" + data[i].money + "</td>" |
| | | div += "</tr>" |
| | | |
| | | $("#staffRankId").append(div) |
| | | } |
| | | } |
| | | }); |
| | | |
| | | //获取公司公告 |
| | | $.ajax({ |
| | | url: baseUrl + "/companyPost/list/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {}, |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | let data = res.data.records |
| | | for (var i = 0; i < data.length; i++) { |
| | | let div = "<div style='margin-top: 10px;'>"; |
| | | div += '<span class="layui-badge-dot layui-bg-green" style="margin-right: 10px;"></span>' |
| | | div += data[i].content |
| | | div += "</div>" |
| | | |
| | | $("#companyPostId").append(div) |
| | | } |
| | | } |
| | | }); |
| | | |
| | | // 渲染交易趋势图表 |
| | | var myCharts3 = echarts.init(document.getElementById('xse'), myEchartsTheme); |
| | | //获取获取当前年度12个月的交易成功数据 |
| | | $.ajax({ |
| | | url: baseUrl + "/dashboard/currentMonthData/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {}, |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | let data = res.data |
| | | var option3 = { |
| | | title: { |
| | | text: '交易趋势', |
| | | textStyle: { |
| | | color: '#000', |
| | | fontSize: 14 |
| | | } |
| | | }, |
| | | tooltip: {}, |
| | | grid: { |
| | | left: '0', |
| | | right: '0', |
| | | bottom: '0', |
| | | containLabel: true |
| | | }, |
| | | xAxis: { |
| | | data: ['1月', '2月', '3月', '4月', '6月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] |
| | | }, |
| | | yAxis: {}, |
| | | series: [{ |
| | | type: 'bar', |
| | | data: data, |
| | | barMaxWidth: 45 |
| | | }] |
| | | }; |
| | | myCharts3.setOption(option3); |
| | | } |
| | | }); |
| | | |
| | | |
| | | // // 渲染访问量图表 |
| | | // var myCharts4 = echarts.init(document.getElementById('fwl'), myEchartsTheme); |
| | | // var option4 = { |
| | | // title: { |
| | | // text: '访问量趋势', |
| | | // textStyle: { |
| | | // color: '#000', |
| | | // fontSize: 14 |
| | | // } |
| | | // }, |
| | | // tooltip: {}, |
| | | // grid: { |
| | | // left: '0', |
| | | // right: '0', |
| | | // bottom: '0', |
| | | // containLabel: true |
| | | // }, |
| | | // xAxis: { |
| | | // data: ['1月', '2月', '3月', '4月', '6月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] |
| | | // }, |
| | | // yAxis: {}, |
| | | // series: [{ |
| | | // type: 'bar', |
| | | // data: [558, 856, 880, 1325, 982, 856, 655, 546, 988, 985, 568, 302], |
| | | // barMaxWidth: 45 |
| | | // }] |
| | | // }; |
| | | // myCharts4.setOption(option4); |
| | | // |
| | | // // 切换选项卡重新渲染 |
| | | // element.on('tab(tabZZT)', function (data) { |
| | | // if (data.index == 0) { |
| | | // myCharts3.resize(); |
| | | // } else { |
| | | // myCharts4.resize(); |
| | | // } |
| | | // }); |
| | | |
| | | // 窗口大小改变事件 |
| | | window.onresize = function () { |
| | | myCharts.resize(); |
| | | myCharts2.resize(); |
| | | myCharts3.resize(); |
| | | myCharts4.resize(); |
| | | }; |
| | | |
| | | }); |