123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592 |
- @extends('admin/layout')
- @section('header')
- <link href="{{asset('css/plugins/switchery/switchery.css')}}" rel="stylesheet">
- <style>
- .btn-danger, .btn-primary, .btn-info {
- background: #009688 !important;
- border-color: #009688 !important;
- }
- .table-striped > tbody > tr:nth-of-type(odd) {
- background: #f8f8f8 !important;
- }
- .table-striped > tbody > tr .btn {
- background: none !important;
- }
- .table-striped > tbody > tr td {
- font-size: 14px !important;
- }
- .table-striped > tbody > tr:hover {
- background: #ffebd8 !important;
- }
- .table-striped > tbody > tr:hover .btn {
- background: #009688 !important;
- color: #fff !important;
- }
- .table-striped > tbody > tr:hover .btn .glyphicon {
- color: #fff !important;
- }
- .btn.btn-md:hover {
- opacity: 0.8;
- }
- .input-group-btn2 {
- white-space: normal
- }
- </style>
- @endsection
- @section('content')
- @php $authUser=auth()->user() @endphp
- <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">
- <form class="row" id="searchForm" onsubmit="units.search();return false;">
- @if($is_propaganda!=1)
- <div class="col-md-3">
- <div class="input-group">
- <span class="input-group-btn input-group-btn2">
- @hasAuth('sites-manage-add-and-del')
- <button type="button" class="btn btn-md btn-primary"
- style="margin-left: 10px;border-radius:2px;" onclick="units.edit(0)"> <span
- class="glyphicon glyphicon-plus" ></span> 添加</button>
- <button type="button" class="btn btn-md btn-danger" id="batchDelete"
- style="margin-left: 10px;border-radius:2px;"><span
- class="glyphicon glyphicon-remove"></span> 删除</button>
- @endHasAuth
- <button type="button" class="btn btn-md btn-primary"
- style="margin-left: 10px;border-radius:2px;"
- onclick="units.refresh()"><span
- class="glyphicon glyphicon-refresh"></span> 清除缓存
- </button>
- <button type="button" class="btn btn-md btn-primary"
- style="margin-left: 10px;border-radius:2px;" onclick="units.webmaster()"><span
- class="glyphicon glyphicon-film"></span> webmaster数据</button>
- <button type="button" class="btn btn-md btn-primary"
- style="margin-left: 10px;border-radius:2px;"
- onclick="window.open('http://rank.yinqingli.cn/admincp/webmaster/oauth2');"><span
- class="glyphicon glyphicon-film"></span> webmaste2数据</button>
- <button type="button" class="btn btn-md btn-primary" style="margin-left: 10px;border-radius:2px;"
- onclick="units.generateReport()"><span
- class="glyphicon glyphicon-film"></span> 批量月报</button>
- </span>
- </div>
- </div>
- @endif
- <div class="col-md-9 pull-right">
- <div class="input-group">
- <select name="status" id="status" title="" class="form-control"
- style="width: 150px;float: right" onchange="tips.selectPage();">
- <option value="">请选择项目状态</option>
- @foreach(\App\Http\Models\Site::STATUS_MAP as $key=>$item)
- @if(!in_array($key,[5,6]))
- <option value="{{$key}}">{{$item}}</option>
- @endif
- @endforeach
- </select>
- <input type="text" placeholder="请输入域名或项目名称" class="input-md form-control"
- name="keyword"
- id="keyword" style="width: 200px;float: right">
- <div style="float: right;margin-right: 6px">
- <input type="checkbox" id="bid_status" name="bid_status" class="js-switch"
- onchange="tips.selectPage();">是否竞价
- </div>
- <div style="float: right;margin-right: 6px">
- <input type="checkbox" id="feedback_status" name="feedback_status"
- class="js-switch2"
- onchange="tips.selectPage();">中文待反馈
- </div>
- <div style="float: right;margin-right: 6px">
- <input type="checkbox" id="customer_review" name="customer_review"
- class="js-switch3"
- onchange="tips.selectPage();">是否客户审核
- </div>
- <span class="input-group-btn">
- <button type="search" class="btn btn-md btn-primary"
- onclick="units.search()" style="border-radius:2px;"> 搜索</button>
- <button type="button" class="btn btn-md btn-primary" style="margin-left: 10px;border-radius:2px;"
- name="btnReset"> 重置</button>
- @if(!in_array($role_id,[15,34]))
- <button type="button" class="btn btn-md btn-primary"
- style="margin-left: 10px;border-radius:2px;"
- onclick="units.exportSitesList()"> 导出
- </button>
- @endif
- </span>
- </div>
- </div>
- <div class="col-md-8 pull-right">
- <select name="propagandaUserId" id="propagandaUserId" title="" class="form-control"
- style="width: 150px;float: right" onchange="tips.selectPage();">
- <option value="">请选择软文查找人员</option>
- @foreach($userList as $item)
- @if($item->role_id==34)
- <option value="{{$item->id}}">{{$item->nickname}}</option>
- @endif
- @endforeach
- </select>
- <select name="serverUserId" id="serverUserId" title="" class="form-control"
- style="width: 150px;float: right" onchange="tips.selectPage();">
- <option value="">请选择客服</option>
- @foreach($userList as $item)
- @if($item->role_id==7)
- <option value="{{$item->id}}">{{$item->nickname}}</option>
- @endif
- @endforeach
- </select>
- <select name="designUserId" id="designUserId" title="" class="form-control"
- style="width: 150px;float: right" onchange="tips.selectPage();">
- <option value="">请选择设计</option>
- @foreach($userList as $item)
- @if($item->role_id==27)
- <option value="{{$item->id}}">{{$item->nickname}}</option>
- @endif
- @endforeach
- </select>
- <select name="webUserId" id="webUserId" title="" class="form-control"
- style="width: 150px;float: right" onchange="tips.selectPage();">
- <option value="">请选择前端</option>
- @foreach($userList as $item)
- @if($item->role_id==14)
- <option value="{{$item->id}}">{{$item->nickname}}</option>
- @endif
- @endforeach
- </select>
- <select name="helpUserId" id="helpUserId" title="" class="form-control"
- style="width: 150px;float: right" onchange="tips.selectPage();">
- <option value="">请选择项目经理</option>
- @foreach($userList as $item)
- @if($item->role_id==25)
- <option value="{{$item->id}}">{{$item->nickname}}</option>
- @endif
- @endforeach
- </select>
- <select name="optimizeUserId" id="optimizeUserId" title="" class="form-control"
- style="width: 150px;float: right" onchange="tips.selectPage();">
- <option value="">请选择优化组长</option>
- @foreach($userList as $item)
- @if($item->role_id==26)
- <option value="{{$item->id}}">{{$item->nickname}}</option>
- @endif
- @endforeach
- </select>
- <select name="aeUserId" id="aeUserId" title="" class="form-control"
- style="width: 150px;float: right" onchange="tips.selectPage();">
- <option value="">请选择建站采编</option>
- @foreach($userList as $item)
- @if($item->role_id==2)
- <option value="{{$item->id}}">{{$item->nickname}}</option>
- @endif
- @endforeach
- </select>
- <select name="planUserId" id="planUserId" title="" class="form-control"
- style="width: 150px;float: right" onchange="tips.selectPage();">
- <option value="">请选择策划</option>
- @foreach($userList as $item)
- @if($item->role_id==29)
- <option value="{{$item->id}}">{{$item->nickname}}</option>
- @endif
- @endforeach
- </select>
- <select name="salesUserId" id="salesUserId" title="" class="form-control"
- style="width: 150px;float: right" onchange="tips.selectPage();">
- <option value="">请选择销售</option>
- @foreach($userList as $item)
- @if($item->role_id==1)
- <option value="{{$item->id}}">{{$item->nickname}}</option>
- @endif
- @endforeach
- </select>
- <select name="optimizationEditingUserId" id="optimizationEditingUserId" title=""
- class="form-control"
- style="width: 150px;float: right" onchange="tips.selectPage();">
- <option value="">请选择优化师/优化采编</option>
- @foreach($userList as $item)
- @if($item->role_id==32)
- <option value="{{$item->id}}">{{$item->nickname}}</option>
- @endif
- @endforeach
- </select>
- <select name="businessId" id="businessId" title="" class="form-control"
- style="width: 150px;float: right" onchange="tips.selectPage();">
- <option value="">请选择行业</option>
- @foreach($businessList as $key=>$item)
- <option value="{{$key}}">{{$item}}</option>
- @endforeach
- </select>
- <select name="projectType" id="projectType" title="" class="form-control"
- style="width: 150px;float: right" onchange="tips.selectPage();">
- <option value="">请选择项目类型</option>
- <option value="1">企业网站</option>
- <option value="2">电商网站</option>
- <option value="3">特殊项目</option>
- </select>
- <input type="text" placeholder="核心产品(中文)" class="input-md form-control"
- name="coreProduct"
- id="coreProduct" style="width: 200px;float: right">
- <input type="text" placeholder="核心产品(英文)" class="input-md form-control"
- name="layoutKeyword"
- id="layoutKeyword" style="width: 200px;float: right">
- </div>
- </form>
- <hr>
- <div class="table-responsive">
- <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- @endsection
- @section('footer')
- <script src="{{asset('js/plugins/switchery/switchery.js')}}"></script>
- <script>
- var jsSwitch = document.querySelector(".js-switch");
- new Switchery(jsSwitch, {color: "#1AB394", size: 'small'});
- var jsSwitch2 = document.querySelector(".js-switch2");
- new Switchery(jsSwitch2, {color: "#1AB394", size: 'small'});
- var jsSwitch3 = document.querySelector(".js-switch3");
- new Switchery(jsSwitch3, {color: "#1AB394", size: 'small'});
- var units = {
- refresh: function () {
- var ajaxConfig = {
- url: '/admin/tool/rmCacheKey',
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1000});
- }
- };
- tips.ajax(ajaxConfig);
- },
- generateReport: function () {
- var ajaxConfig = {
- url: '/admin/tool/generate-report',
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1000});
- }
- };
- tips.ajax(ajaxConfig);
- },
- search: function () {
- tips.selectPage();
- },
- exportSitesList: function () {
- var formValues = tips.getFormValues("#searchForm");
- var str = $.param(formValues);
- window.open('/admin/site/indexExport?' + str)
- },
- getIdsBySelections: function () {
- var selections = $("#table").bootstrapTable('getSelections');
- var ids = [];
- $.each(selections, function (inx, val) {
- ids.push(val.id);
- });
- return ids;
- },
- edit: function (id) {
- var title = '添加';
- if (id > 0) {
- title = '编辑';
- }
- layer.open({
- type: 2,
- content: ['/admin/sites/' + id],
- area: ['100%', '100%'],
- title: title
- });
- },
- openDetail: function (id, title) {
- tips.page('/admin/sites/' + id + '/overview', title);
- },
- webmaster: function () {
- window.open('https://rank.yinqingli.cn/admincp/webmaster/oauth');
- },
- pcSpeedMeasurement: function (siteId) {
- layer.confirm('确定重新跑分吗?', {icon: 3, title: '重新跑分'}, function (index, layero) {
- layer.close(index);
- tips.ajax({
- url: '/admin/sites/getSpeedMeasurementCacheResult/' + siteId,
- type: 'get',
- tableRefresh: '#table',
- });
- });
- },
- isComponent: function (siteId, type) {
- layer.confirm('是否更改状态?', {icon: 3, title: '项目是否有插件'}, function (index, layero) {
- layer.close(index);
- tips.ajax({
- url: '/admin/sites/isComponent/' + siteId + '?type=' + type,
- type: 'get',
- tableRefresh: '#table',
- });
- });
- }
- };
- var config = {};
- config.url = '/admin/sites?is_propaganda={{$is_propaganda}}';
- config.pageSize = 50;
- config.showColumns = true;
- config.height = 300;
- config.columns = [ //字段
- {checkbox: true},
- {
- title: '序号', align: 'center', formatter: function (value, item, index) {
- return index + 1;
- },
- width: '10px'
- },
- {title: '项目状态', field: 'statusTitle', align: 'center', sortable: true},
- {
- title: '项目名称', field: 'cn_title', align: 'center', width: '240px',
- formatter: function (value, item) {
- var res = '';
- if (item.the500Strongest) {
- res += '<img src="/img/500qiang4.png" style="padding-right: 5px">';
- }
- if (item.listedCompany) {
- res += '<img src="/img/shangshi4.png" style="padding-right: 5px">';
- }
- if (item.stateEnterprises) {
- res += '<img src="/img/guoqi4.png" style="padding-right: 5px">';
- }
- if (item.leadingEnterprise) {
- res += '<img src="/img/longtou4.png" style="padding-right: 5px">';
- }
- res += value;
- return res
- }
- },
- {
- title: '域名', field: 'domain', align: 'center', width: '160px'
- },
- @if(in_array($role_id,[14]))
- {
- title: '第三方插件', field: '', align: 'center',
- formatter: function (value, row) {
- var str = '';
- if (row.is_component === 0) {
- str += '<button onclick="units.isComponent(' + row.id + ',1)" class="btn btn-md btn-primary" style="background: #d0648a !important;border: none">无</button> ';
- } else {
- str += '<button onclick="units.isComponent(' + row.id + ',0)" class="btn btn-md btn-primary" style="background: #4ea397 !important;border: none">有</button> ';
- }
- return str;
- }
- },
- @endif
- @if(in_array($role_id,[15,34]))
- {
- title: '软文指标', field: 'article_goal', align: 'center'
- },
- {title: '每月查找量', field: 'articles_updates_per_month', align: 'center'},
- {title: '完成月份至', field: 'monthOfCompletionNum', align: 'center', sortable: true},
- {title: '剩余查找量', field: 'over', align: 'center'},
- {title: '软文查找人员', field: 'propaganda', align: 'center'},
- {
- title: '有无规划',
- field: 'articleNote',
- align: 'center',
- sortable: true,
- formatter: function (value, row, index) {
- if (value === 0) {
- return '无';
- } else {
- return '<span style="color:red">有</span>';
- }
- }
- },
- @else
- {
- title: 'PC端分数',
- field: 'pcSpeedMeasurement',
- align: 'center',
- sortable: true,
- formatter: function (value, row, index) {
- var a = '';
- if (!value) {
- a = '<span style="color:gray;cursor: pointer" onclick="units.pcSpeedMeasurement(' + row.id + ')">--</span>';
- } else {
- if (value < 85) {
- a = '<span style="color:red;cursor: pointer" onclick="units.pcSpeedMeasurement(' + row.id + ')">' + value + '</span>';
- } else {
- a = '<span style="color:gray;cursor: pointer" onclick="units.pcSpeedMeasurement(' + row.id + ')">' + value + '</span>';
- }
- }
- return a;
- }
- },
- {
- title: '移动端分数',
- field: 'mobileSpeedMeasurement',
- align: 'center',
- sortable: true,
- formatter: function (value, row, index) {
- var a = '';
- if (!value) {
- a = '<span style="color:gray;cursor: pointer" onclick="units.pcSpeedMeasurement(' + row.id + ')">--</span>';
- } else {
- if (value < 70) {
- a = '<span style="color:red;cursor: pointer" onclick="units.pcSpeedMeasurement(' + row.id + ')">' + value + '</span>';
- } else {
- a = '<span style="color:gray;cursor: pointer" onclick="units.pcSpeedMeasurement(' + row.id + ')">' + value + '</span>';
- }
- }
- return a;
- }
- },
- {
- title: '月流量'+'({{$lastMonth}})',
- field: 'traffic',
- align: 'center',
- sortable: true,
- formatter: function (value, item, index) {
- var res = value;
- if (item.clicksDropResults) {
- res += '<i class="fa fa-arrow-down" style="font-size:8px;margin-left:6px"></i>' + item.clicksDropResults;
- }
- if (item.clicksDropResults1) {
- res += '<i class="fa fa-arrow-up" style="font-size:8px;margin-left:6px;color:#F00"></i>' + item.clicksDropResults1;
- }
- return res
- }
- },
- {
- title: '月排名'+'({{$month}})',
- field: 'top10',
- align: 'center',
- sortable: true,
- formatter: function (value, item, index) {
- var res = value;
- if (item.keywordDropResults) {
- res += '<i class="fa fa-arrow-down" style="font-size:8px;margin-left:6px"></i>' + item.keywordDropResults;
- }
- if (item.keywordDropResults1) {
- res += '<i class="fa fa-arrow-up" style="font-size:8px;margin-left:6px;color:#F00"></i>' + item.keywordDropResults1;
- }
- return res
- }
- },
- {
- title: '询盘'+'({{$lastMonth}})',
- field: 'inquire',
- align: 'center',
- sortable: true,
- formatter: function (value, item, index) {
- var res = value;
- if (item.listReportMapResult) {
- res += '<i class="fa fa-arrow-down" style="font-size:8px;margin-left:6px"></i>' + item.listReportMapResult;
- }
- if (item.listReportMapResult1) {
- res += '<i class="fa fa-arrow-up" style="font-size:8px;margin-left:6px;color:#F00"></i>' + item.listReportMapResult1;
- }
- return res
- }
- },
- {title: '月软文', field: 'articles_count', align: 'center'},
- {title: '月外链', field: 'link_details_count', align: 'center'},
- {title: '下单时间', field: 'order_at', align: 'center', sortable: true},
- @endif
- {
- title: '客服人员', field: 'server_title', align: 'center'
- },
- {title: '上线时间', field: 'online_at', align: 'center', sortable: true},
- {title: '达标时间', field: 'reach_at', align: 'center', sortable: true, width: '100px'},
- {
- title: '操作', field: 'id', align: 'center',
- formatter: function (value, row) {
- var str = '<button onclick="units.openDetail(' + value + ',\'' + row.cn_title + '\')" class="btn btn-xs"><span class="glyphicon glyphicon-menu-hamburger"></span>详情</button><br>';
- if (row.is_google_bid) {
- if (row.bid_status) {
- str += '<span class="glyphicon glyphicon-fire" style="color:red">PPC</span>'
- } else {
- str += '<span class="glyphicon glyphicon-fire" style="color:#C0C0C0">PPC</span>'
- }
- }
- return str;
- }
- }
- ];
- tips.bootstrapTable(config);
- $(document).on('click', '#allotStaff', function () {
- var ids = units.getIdsBySelections();
- if (ids.length === 0) {
- layer.alert('请先选择您所要操作的对象', {icon: 0});
- return;
- }
- var siteIds = '?';
- $.each(ids, function (inx, val) {
- siteIds += 'siteIds[]=' + val + '&';
- });
- layer.open({
- type: 2,
- content: ['/admin/site/allot' + siteIds],
- area: ['50%', '50%'],
- title: '修改'
- });
- });
- $(document).on('click', '#batchDelete', function () {
- var ids = units.getIdsBySelections();
- if (ids.length === 0) {
- layer.alert('请先选择您所要操作的对象', {icon: 0});
- return;
- }
- layer.confirm('您确定要删除吗?', {icon: 3, title: '删除信息'}, function (index, layero) {
- layer.close(index);
- tips.ajax({
- url: '/admin/sites',
- type: 'delete',
- data: {ids: ids},
- tableRefresh: '#table'
- });
- });
- });
- </script>
- @endsection
|