123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330 |
- @extends('admin/site/side_layout')
- @section('header_extend')
- @endsection
- @section('right')
- <link href="{{asset('css/plugins/switchery/switchery.css')}}" rel="stylesheet">
- <style>
- .btn-primary, .btn-info {
- background: #009688 !important;
- border-color: #009688 !important;
- }
- </style>
- <body class="gray-bg">
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <div class="ibox-content">
- <div class="row">
- <div class="col-sm-6">
- <div class="ibox float-e-margins">
- <div class="ibox-title">
- <h5>百千约访流量</h5>
- </div>
- <div class="ibox-content">
- <div id="bqFlow" style="width: 100%;height: 300px;"></div>
- </div>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="ibox float-e-margins">
- <div class="ibox-title">
- <h5>百千约访后台询盘</h5>
- </div>
- <div class="ibox-content">
- <div id="bqInquiry" style="width: 100%;height: 300px;"></div>
- </div>
- </div>
- </div>
- </div>
- <div class="table-responsive">
- <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
- </div>
- </div>
- </div>
- <div class="ibox-content">
- <form method="get" class="form-horizontal" id="form">
- <div class="col-sm-6">
- <div class="ibox float-e-margins">
- <div class="ibox-title">
- <h5>百千约访客户询盘</h5>
- </div>
- <div class="ibox-content">
- <div id="clientInquiry" style="width: 100%;height: 300px;"></div>
- </div>
- </div>
- </div>
- <div class="form-group">
- @foreach($clientInquireDate as $item)
- <label class="col-sm-2 control-label" for="nickname"><span
- class="red">* </span>自定义客户询盘时间{{$item['date']}}:</label>
- <div class="col-sm-2">
- <input type="text" class="form-control" id="{{$item['date']??''}}"
- name="{{$item['date']??''}}" autocomplete="off"
- value="{{$item['clientInquire']??''}}">
- </div>
- @endforeach
- </div>
- <div class="form-group">
- <div class="col-sm-4 col-sm-offset-2">
- <button class="btn btn-primary" type="button" onclick="utils.saveFlow()"
- id="save">
- 保存
- </button>
- <button class="btn btn-white" type="button" id="cancel">取消</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- <input type="hidden" value="{{$siteId}}" id="siteId">
- </body>
- @endsection
- @section('footer_extend')
- <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
- <script src="{{asset('js/plugins/echarts/echarts.min.js')}}"></script>
- <script src="{{asset('js/plugins/wonderland/wonderland.js?v=1.3')}}"></script>
- <script>
- var utils = {
- saveFlow: function () {
- var ajaxConfig = {
- url: '/admin/bqTraffic/save/{{$siteId}}',
- type: 'post',
- data: $('#form').serialize(),
- success: function () {
- layer.msg('操作成功', {
- icon: 1,
- time: 1500 //2秒关闭(如果不配置,默认是3秒)
- }, function () {
- window.location.reload()
- });
- }
- };
- tips.ajax(ajaxConfig);
- }
- };
- //流量
- var config = {};
- config.url = '/admin/bqTraffic/sites/{{$siteId}}';
- config.pageSize = 300;
- config.showColumns = true;
- config.paginationDetailHAlign = 'right';
- config.columns = [ //字段
- {title: '公司', field: 'cn_title', align: 'center', width: '200px'},
- {title: '网站', field: 'domain', align: 'center', width: '240px'},
- {title: '下单时间', field: 'order_at', align: 'center', width: '120px'},
- {title: '上线时间', field: 'online_at', align: 'center', width: '120px'},
- {title: '约访时间', field: 'bq_at', align: 'center', width: '120px'},
- {title: '百千客户评分', field: 'bq_score', align: 'center', width: '120px'},
- {title: '月流量300 - 时长', field: 'duration_300', align: 'center', width: '120px'},
- {title: '月流量500 - 时长', field: 'duration_500', align: 'center', width: '120px'},
- {title: '月流量1000 - 时长', field: 'duration_1000', align: 'center', width: '120px'},
- {title: '月流量1500 - 时长', field: 'duration_1500', align: 'center', width: '120px'},
- {title: '月流量2000 - 时长', field: 'duration_2000', align: 'center', width: '120px'},
- {title: '月流量', field: 'traffic', align: 'center', width: '160px', sortable: true},
- {title: '询盘总数', field: 'inquire', align: 'center', width: '160px'},
- ];
- tips.bootstrapTable(config);
- //流量
- var bqFlowChart = echarts.init(document.getElementById('bqFlow'),'wonderland');
- var bqFlowXAxis = JSON.parse('{!!json_encode($trafficList['xAxis'])!!}');
- var bqFlowYAix = JSON.parse('{!!json_encode($trafficList['yAxis'])!!}');
- var bqFlowOption = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- crossStyle: {
- color: '#999'
- }
- }
- },
- toolbox: {
- feature: {
- dataView: {show: true, readOnly: false},
- magicType: {show: true, type: ['bar', 'pie']},
- restore: {show: true},
- saveAsImage: {show: true}
- }
- },
- legend: {
- data: ['流量']
- },
- xAxis: [
- {
- type: 'category',
- data: bqFlowXAxis,
- axisPointer: {
- type: 'shadow'
- },
- splitLine: {
- show: false
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '',
- min: 0,
- axisLabel: {
- formatter: '{value}'
- },
- axisLine: {
- show: false //隐藏Y轴
- }
- }
- ],
- series: [
- {
- name: '流量',
- // type: 'line',
- type: 'bar',
- data: bqFlowYAix
- }
- ]
- };
- bqFlowChart.setOption(bqFlowOption);
- //询盘
- var bqInquiryChart = echarts.init(document.getElementById('bqInquiry'),'wonderland');
- var bqInquiryXAxis = JSON.parse('{!!json_encode($inquireList['xAxis'])!!}');
- var bqInquiryYAix = JSON.parse('{!!json_encode($inquireList['yAxis'])!!}');
- var bqInquiryOption = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- crossStyle: {
- color: '#999'
- }
- }
- },
- toolbox: {
- feature: {
- dataView: {show: true, readOnly: false},
- magicType: {show: true, type: ['bar', 'pie']},
- restore: {show: true},
- saveAsImage: {show: true}
- }
- },
- legend: {
- data: ['后台询盘']
- },
- xAxis: [
- {
- type: 'category',
- data: bqInquiryXAxis,
- axisPointer: {
- type: 'shadow'
- },
- splitLine: {
- show: false
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '',
- min: 0,
- axisLabel: {
- formatter: '{value}'
- },
- axisLine: {
- show: false //隐藏Y轴
- }
- }
- ],
- series: [
- {
- name: '后台询盘',
- // type: 'line',
- type: 'bar',
- data: bqInquiryYAix
- }
- ]
- };
- bqInquiryChart.setOption(bqInquiryOption);
- //询盘
- var clientInquiryChart = echarts.init(document.getElementById('clientInquiry'),'wonderland');
- var clientInquiryXAxis = JSON.parse('{!!json_encode($clientInquireList['xAxis'])!!}');
- var clientInquiryYAix = JSON.parse('{!!json_encode($clientInquireList['yAxis'])!!}');
- var clientInquiryOption = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- crossStyle: {
- color: '#999'
- }
- }
- },
- toolbox: {
- feature: {
- dataView: {show: true, readOnly: false},
- magicType: {show: true, type: ['bar', 'pie']},
- restore: {show: true},
- saveAsImage: {show: true}
- }
- },
- legend: {
- data: ['客户询盘']
- },
- xAxis: [
- {
- type: 'category',
- data: clientInquiryXAxis,
- axisPointer: {
- type: 'shadow'
- },
- splitLine: {
- show: false
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '',
- min: 0,
- axisLabel: {
- formatter: '{value}'
- },
- axisLine: {
- show: false //隐藏Y轴
- }
- }
- ],
- series: [
- {
- name: '客户询盘',
- // type: 'line',
- type: 'bar',
- data: clientInquiryYAix
- }
- ]
- };
- clientInquiryChart.setOption(clientInquiryOption);
- </script>
- @endsection
|