| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 | @extends('admin/layout')@section('content')    <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;        }    </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="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>        var units = {            search: function () {                tips.selectPage();            },            getIdsBySelections: function () {                var selections = $("#table").bootstrapTable('getSelections');                var ids = [];                $.each(selections, function (inx, val) {                    ids.push(val.id);                });                return ids;            },            save: function (id) {                layer.open({                    type: 2,                    content: ['/admin/articles/' + id],                    area: ['100%', '100%'],                    title: '',                    closeBtn: 0                });            },            status: function (status, _this) {                $(_this).addClass('dim');                $(_this).siblings().removeClass('dim');                $("#status").val(status);                if (status === 1) {                    $("#auto-translate").css('display', '');                } else {                    $("#auto-translate").css('display', 'none');                }                tips.tableRefresh();            },            translate: function () {                var ids = units.getIdsBySelections();                if (ids.length === 0) {                    layer.alert('请先选择您所要操作的对象', {icon: 0});                    return;                }                layer.confirm('您确定要翻译以下内容吗?', {icon: 3, title: '有道翻译'}, function () {                    var config = {url: '/admin/articles/auto-translate', type: 'put', data: {ids: ids}};                    tips.ajax(config);                });            },            delete: 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/articles',                        type: 'delete',                        data: {ids: ids},                        tableRefresh: '#table'                    });                });            },            detail: function (id) {                layer.open({                    type: 2,                    content: ['/admin/articles-detail/' + id],                    area: ['100%', '100%'],                    title: '',                    closeBtn: 0                });            }        };        var config = {};        config.url = '/admin/articles/spec';        config.columns = [ //字段            {title: '公司', field: 'cn_title' },            {title: '域名', field: 'domain'},            {title: '项目阶段', field: 'status_title', align: 'center'},            {title: '软文指标', field: 'article_goal', align: 'center'},            {title: '撰写人员', field: 'editor', align: 'center'},            {title: '软文发布量', field: 'articles_count', align: 'center'},        ];        tips.bootstrapTable(config);    </script>@endsection
 |