|  |  |  | 
|---|
|  |  |  | margin-left: 4px; | 
|---|
|  |  |  | line-height: 32px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .testColorBlack{ | 
|---|
|  |  |  | color: black; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </style> | 
|---|
|  |  |  | </head> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="layui-fluid"> | 
|---|
|  |  |  | <div class="layui-row layui-col-space15"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <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-col-xs12 layui-col-md8" > | 
|---|
|  |  |  | <div class="layui-card" style="" id="popup"> | 
|---|
|  |  |  | <div class="layui-card-header testColorBlack" style="background-color: #FFFA1C1C">团队活动实时交易情况</div> | 
|---|
|  |  |  | <div class="layui-card-body" style="padding-bottom: 20px;background-color: #FFC6A02D"> | 
|---|
|  |  |  | <div class="layui-row"> | 
|---|
|  |  |  | <div class="testColorBlack">团队数据</div> | 
|---|
|  |  |  | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> | 
|---|
|  |  |  | <div class="numberInfoSubTitle">今日交易总额</div> | 
|---|
|  |  |  | <div class="numberInfoSubTitle testColorBlack" >年度销售目标</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 testColorBlack">已完成销售任务</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 testColorBlack">未完成销售任务</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 testColorBlack">完成率</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> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-card" style="background-color: #ffffff"> | 
|---|
|  |  |  | <div class="layui-card-header testColorBlack" style="background-color: #FFFA1C1C">实时销售情况</div> | 
|---|
|  |  |  | <div class="layui-card-body" style="padding-bottom: 20px;background-color: #FFC6A02D"> | 
|---|
|  |  |  | <div class="layui-row"> | 
|---|
|  |  |  | <div class="testColorBlack">个人数据</div> | 
|---|
|  |  |  | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> | 
|---|
|  |  |  | <div class="numberInfoSubTitle testColorBlack">年度销售目标</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 testColorBlack">已完成销售任务</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 testColorBlack">未完成销售任务</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 testColorBlack">完成率</div> | 
|---|
|  |  |  | <div class="numberInfoValue"><span id="personRate">92</span>%</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-row" style="margin-top: 40px;"> | 
|---|
|  |  |  | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> | 
|---|
|  |  |  | <div class="numberInfoSubTitle testColorBlack">跟踪项目数量</div> | 
|---|
|  |  |  | <div class="numberInfoValue"> | 
|---|
|  |  |  | <a href="#" id="openProgress" style="color: #1E9FFF"><span id="progressCount">124</span><em class="numberInfoSuffix">个</em></a> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> | 
|---|
|  |  |  | <div class="numberInfoSubTitle testColorBlack">跟踪项目金额</div> | 
|---|
|  |  |  | <div class="numberInfoValue"> | 
|---|
|  |  |  | <span id="progressMoney">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 testColorBlack">成交项目数量</div> | 
|---|
|  |  |  | <div class="numberInfoValue"> | 
|---|
|  |  |  | <a href="#" id="openSuccess" style="color: #1E9FFF"><span id="successCount">121</span><em class="numberInfoSuffix">个</em></a> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> | 
|---|
|  |  |  | <div class="numberInfoSubTitle testColorBlack">成交项目金额</div> | 
|---|
|  |  |  | <div class="numberInfoValue"> | 
|---|
|  |  |  | <span id="successMoney">124,543,233</span><em class="numberInfoSuffix">万元</em> | 
|---|
|  |  |  | </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: 403px;overflow: hidden;background-color: #FFFA1C1C;height: 438px"> | 
|---|
|  |  |  | <div class="layui-card-header" style="display: flex;justify-content: space-between;"> | 
|---|
|  |  |  | <div>公司公告</div> | 
|---|
|  |  |  | <div><a href="#" id="openCompanyPost" style="color: #1E9FFF">查看更多>></a></div> | 
|---|
|  |  |  | </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 class="layui-card-body" id="companyPostId" style="background-color: #FFC6A02D"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="layui-tab layui-tab-brief" lay-filter="tabZZT"> | 
|---|
|  |  |  | <ul class="layui-tab-title"> | 
|---|
|  |  |  | <li class="layui-this">销售额</li> | 
|---|
|  |  |  | <li>访问量</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> | 
|---|
|  |  |  | 
|---|
|  |  |  | </colgroup> | 
|---|
|  |  |  | <thead> | 
|---|
|  |  |  | <tr style="background: none;color: #333;"> | 
|---|
|  |  |  | <th colspan="3">员工销售额排行</th> | 
|---|
|  |  |  | <th colspan="3">销售业绩排行榜</th> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | </thead> | 
|---|
|  |  |  | <tbody> | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | // 显示团队数据 | 
|---|
|  |  |  | function showPopup(res) { | 
|---|
|  |  |  | if (res==="true"){ | 
|---|
|  |  |  | document.getElementById('popup').style.display = 'block'; | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | // 隐藏团队数据 | 
|---|
|  |  |  | document.getElementById('popup').style.display = 'none'; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 隐藏团队数据 | 
|---|
|  |  |  | function hidePopup() { | 
|---|
|  |  |  | document.getElementById('popup').style.display = 'none'; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- js部分 --> | 
|---|
|  |  |  | <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> | 
|---|
|  |  |  | f() | 
|---|
|  |  |  | layui.use(['layer', 'element'], function () { | 
|---|
|  |  |  | var $ = layui.jquery; | 
|---|
|  |  |  | var layer = layui.layer; | 
|---|
|  |  |  | var element = layui.element; | 
|---|
|  |  |  | element.init(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 渲染活动情况预测 | 
|---|
|  |  |  | 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) | 
|---|
|  |  |  | $("#progressCount").text(res.data.progressCount) | 
|---|
|  |  |  | $("#successCount").text(res.data.successCount) | 
|---|
|  |  |  | $("#progressMoney").text(res.data.progressMoney2) | 
|---|
|  |  |  | $("#successMoney").text(res.data.successMoney) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //获取员工交易额排行 | 
|---|
|  |  |  | $.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 = ""; | 
|---|
|  |  |  | if (i==0){ | 
|---|
|  |  |  | div += "<tr style='color: red'>"; | 
|---|
|  |  |  | }else if (i==1){ | 
|---|
|  |  |  | div += "<tr style='color: blueviolet'>"; | 
|---|
|  |  |  | }else if (i==2){ | 
|---|
|  |  |  | div += "<tr style='color: #0181ee'>"; | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | 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;display: flex;justify-content: space-between;'>"; | 
|---|
|  |  |  | // div += '<div><span class="layui-badge-dot layui-bg-green" style="margin-right: 10px;"></span>' | 
|---|
|  |  |  | // div += data[i].content + "</div>" | 
|---|
|  |  |  | // div += "<div>" + data[i].updateTime$ + "</div>" | 
|---|
|  |  |  | // div += "</div>" | 
|---|
|  |  |  | let div = "<div style='margin-top: 10px;display: flex;justify-content: space-between;'>"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | div += "<div style='width: 79%;'>"; | 
|---|
|  |  |  | div += "<span class='layui-badge-dot layui-bg-green' style='margin-right: 10px;'></span>"; | 
|---|
|  |  |  | div += data[i].content; | 
|---|
|  |  |  | div += "</div>"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | div += "<div style='width: 19%;'>"; | 
|---|
|  |  |  | div += data[i].updateTime$; | 
|---|
|  |  |  | div += "</div>"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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(); | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $("#openProgress").on("click", () => { | 
|---|
|  |  |  | layer.open({ | 
|---|
|  |  |  | type: 2, | 
|---|
|  |  |  | title: '跟踪项目', | 
|---|
|  |  |  | maxmin: true, | 
|---|
|  |  |  | area: [top.detailWidth, top.detailHeight], | 
|---|
|  |  |  | shadeClose: true, | 
|---|
|  |  |  | content: '../order/order.html?status=0', | 
|---|
|  |  |  | success: function(layero, index){ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $("#openSuccess").on("click", () => { | 
|---|
|  |  |  | layer.open({ | 
|---|
|  |  |  | type: 2, | 
|---|
|  |  |  | title: '跟踪项目', | 
|---|
|  |  |  | maxmin: true, | 
|---|
|  |  |  | area: [top.detailWidth, top.detailHeight], | 
|---|
|  |  |  | shadeClose: true, | 
|---|
|  |  |  | content: '../order/order.html?status=1', | 
|---|
|  |  |  | success: function(layero, index){ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $("#openCompanyPost").on("click", () => { | 
|---|
|  |  |  | layer.open({ | 
|---|
|  |  |  | type: 2, | 
|---|
|  |  |  | title: '公告', | 
|---|
|  |  |  | maxmin: true, | 
|---|
|  |  |  | area: [top.detailWidth, top.detailHeight], | 
|---|
|  |  |  | shadeClose: true, | 
|---|
|  |  |  | content: '../companyPost/companyPost_view.html', | 
|---|
|  |  |  | success: function(layero, index){ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function f() { | 
|---|
|  |  |  | let token = localStorage.getItem("token"); | 
|---|
|  |  |  | layui.jquery.ajax({ | 
|---|
|  |  |  | url: baseUrl + "/dashboard/popup/auth", | 
|---|
|  |  |  | data:{token : token}, | 
|---|
|  |  |  | method: 'GET', | 
|---|
|  |  |  | success: function (res) { | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | showPopup(res.msg) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  | </body> | 
|---|
|  |  |  | </html> | 
|---|