| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 | @extends('admin/layout')@section('header')    <style>        .spaceBtn {            margin-left: 10px;        }    </style>@endsection@section('content')    <body class="gray-bg">    <div class="row">        <div class="wrapper wrapper-content animated fadeInRight">            <div class="row">                <div class="col-sm-12">                    <div class="wrapper wrapper-content animated fadeInRight">                        <div class="ibox-content m-b-sm border-bottom">                            <div class="p-xs">                                <div class="pull-left m-r-md">                                    <i class="fa fa-globe text-navy mid-icon"></i>                                </div>                                <h2>欢迎来到外链任务</h2>                                <span></span>                                <a href="{{url('admin/auth/logoff')}}">退出</a>                                <a href="{{url('admin/link/calc-history')}}">结算历史</a>                                <div class="pull-right"><a onclick="units.notice()">注意事项</a></div>                            </div>                        </div>                        <div class="ibox-content m-b-sm border-bottom" style="padding-top: 5px">                            <div class="p-xs">                                <form class="row" id="searchForm" onsubmit="units.search();return false;">                                    <div class="col-sm-6">                                        <div class="input-group">                                            <input type="hidden" name="status" id="status" value="2"> {{--默认状态为翻译中--}}                                            <span class="input-group-btn">                                            <button type="button" class="btn btn-primary"                                                    onclick="units.status(1,this)">                                                任务大厅                                            </button>                                                <button type="button" class="btn btn-primary dim"                                                        style="margin-left: 10px"                                                        onclick="units.status(2,this)">                                                任务中                                            </button>                                            <button type="button" class="btn btn-primary" style="margin-left: 10px"                                                    onclick="units.status(3,this)">                                                待审核                                            </button>                                            <button type="button" class="btn btn-primary" style="margin-left: 10px"                                                    onclick="units.status(4,this)">                                                审核失败                                            </button>                                            <button type="button" class="btn btn-primary" style="margin-left: 10px"                                                    onclick="units.status(5,this)">                                                审核通过                                            </button>                                            <button type="button" class="btn btn-primary"                                                          style="margin-left: 10px"                                                          onclick="units.status(6,this)">                                                外链监控                                            </button>                                        </span>                                        </div>                                    </div>                                    <div class="col-md-4 pull-right">                                        <div class="input-group">                                            <input type="text" placeholder="请输入输入标题" class="input-md form-control"                                                   name="keyword"                                                   id="keyword">                                            <span class="input-group-btn">                                    <button type="button" class="btn btn-md btn-primary"                                            onclick="units.search()"> 搜索</button>                                    <button type="reset" class="btn btn-md btn-primary" style="margin-left: 10px"                                            name="resetBtn"> 重置</button> </span>                                        </div>                                    </div>                                </form>                            </div>                        </div>                        <div class="ibox-content forum-container">                            <div class="project-list">                                <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>                            </div>                        </div>                    </div>                </div>            </div>        </div>    </div>    </body>    <div class="ibox-content" id="notice-text" style="display: none">        <div>            {!! $notice->content !!}        </div>    </div>@endsection@section('footer')    <script>        var units = {            search: function () {                tips.selectPage();            },            save: function (id, status) {                var url = '/admin/link/hall-save/' + id;                // if (status === 2 || status === 4) {                //     url = '/admin/project/article/' + id + '/translate';                // }                layer.open({                    type: 2,                    content: [url],                    area: ['90%', '100%'],                    title: '外链任务',                    closeBtn: 1                });            },            status: function (status, _this) {                $(_this).addClass('dim');                $(_this).siblings().removeClass('dim');                $("#status").val(status);                tips.tableRefresh();            },            notice: function () {                layer.open({                    type: 1,                    content: $("#notice-text"),                    title: '注意事项',                    area: ['60%', '80%'],                    closeBtn: 0,                    btn: ['确认']                });            }        };        var config = {};        config.url = '/admin/link/hall';        config.columns = [ //字段            {                title: '序号', align: 'center', formatter: function (value, item, index) {                    return index + 1;                }            },            {                title: '标题', field: 'title', align: 'center', formatter: function (value, row) {                    if (row.status == 2 && row.flag == 1) {                        return (                            '<label class="text-danger">' + value + '</label><b class="badge badge-warning">notice</b>'                        );                    } else {                        return value;                    }                }            },            {title: '兼职人员', field: 'worker_name', align: 'center'},            {title: '站点名称', field: 'site_title', align: 'center'},            // {title: '平台链接', field: 'translate_words', align: 'center'},            {title: '状态', field: 'status_title', align: 'center'},            {title: '审核时间', field: 'audit_at', align: 'center'},            {title: '创建时间', field: 'created_at', align: 'center'},            {title: '过期时间', field: 'expired_at', align: 'center'},            {                title: '操作', field: 'id', align: 'center',                formatter: function (value, row) {                    return (                        '<button onclick="units.save(' + value + ',' + row.status + ')" class="btn btn-xs"><span class="glyphicon glyphicon-edit"></span>查看</button>'                    );                    // var str = '', title = '查看';                    // if (row.status === 2 || row.status === 4) {                    //     title = '翻译';                    // }                    // str += '<button onclick="units.detail(' + value + ',' + row.status + ')" class="btn btn-xs"><span class="glyphicon glyphicon-edit"></span>' + title + '</button>';                    //                    // return str;                }            }        ];        tips.bootstrapTable(config);        setTimeout('units.notice();', 500);    </script>@endsection
 |