hall.blade.php 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. @extends('admin/layout')
  2. @section('header')
  3. <style>
  4. .spaceBtn {
  5. margin-left: 10px;
  6. }
  7. </style>
  8. @endsection
  9. @section('content')
  10. <body class="gray-bg">
  11. <div class="row">
  12. <div class="wrapper wrapper-content animated fadeInRight">
  13. <div class="row">
  14. <div class="col-sm-12">
  15. <div class="wrapper wrapper-content animated fadeInRight">
  16. <div class="ibox-content m-b-sm border-bottom">
  17. <div class="p-xs">
  18. <div class="pull-left m-r-md">
  19. <i class="fa fa-globe text-navy mid-icon"></i>
  20. </div>
  21. <h2>欢迎来到外链任务</h2>
  22. <span></span>
  23. <a href="{{url('admin/auth/logoff')}}">退出</a>
  24. <a href="{{url('admin/link/calc-history')}}">结算历史</a>
  25. <div class="pull-right"><a onclick="units.notice()">注意事项</a></div>
  26. </div>
  27. </div>
  28. <div class="ibox-content m-b-sm border-bottom" style="padding-top: 5px">
  29. <div class="p-xs">
  30. <form class="row" id="searchForm" onsubmit="units.search();return false;">
  31. <div class="col-sm-6">
  32. <div class="input-group">
  33. <input type="hidden" name="status" id="status" value="2"> {{--默认状态为翻译中--}}
  34. <span class="input-group-btn">
  35. <button type="button" class="btn btn-primary"
  36. onclick="units.status(1,this)">
  37. 任务大厅
  38. </button>
  39. <button type="button" class="btn btn-primary dim"
  40. style="margin-left: 10px"
  41. onclick="units.status(2,this)">
  42. 任务中
  43. </button>
  44. <button type="button" class="btn btn-primary" style="margin-left: 10px"
  45. onclick="units.status(3,this)">
  46. 待审核
  47. </button>
  48. <button type="button" class="btn btn-primary" style="margin-left: 10px"
  49. onclick="units.status(4,this)">
  50. 审核失败
  51. </button>
  52. <button type="button" class="btn btn-primary" style="margin-left: 10px"
  53. onclick="units.status(5,this)">
  54. 审核通过
  55. </button>
  56. <button type="button" class="btn btn-primary"
  57. style="margin-left: 10px"
  58. onclick="units.status(6,this)">
  59. 外链监控
  60. </button>
  61. </span>
  62. </div>
  63. </div>
  64. <div class="col-md-4 pull-right">
  65. <div class="input-group">
  66. <input type="text" placeholder="请输入输入标题" class="input-md form-control"
  67. name="keyword"
  68. id="keyword">
  69. <span class="input-group-btn">
  70. <button type="button" class="btn btn-md btn-primary"
  71. onclick="units.search()"> 搜索</button>
  72. <button type="reset" class="btn btn-md btn-primary" style="margin-left: 10px"
  73. name="resetBtn"> 重置</button> </span>
  74. </div>
  75. </div>
  76. </form>
  77. </div>
  78. </div>
  79. <div class="ibox-content forum-container">
  80. <div class="project-list">
  81. <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. </body>
  90. <div class="ibox-content" id="notice-text" style="display: none">
  91. <div>
  92. {!! $notice->content !!}
  93. </div>
  94. </div>
  95. @endsection
  96. @section('footer')
  97. <script>
  98. var units = {
  99. search: function () {
  100. tips.selectPage();
  101. },
  102. save: function (id, status) {
  103. var url = '/admin/link/hall-save/' + id;
  104. // if (status === 2 || status === 4) {
  105. // url = '/admin/project/article/' + id + '/translate';
  106. // }
  107. layer.open({
  108. type: 2,
  109. content: [url],
  110. area: ['90%', '100%'],
  111. title: '外链任务',
  112. closeBtn: 1
  113. });
  114. },
  115. status: function (status, _this) {
  116. $(_this).addClass('dim');
  117. $(_this).siblings().removeClass('dim');
  118. $("#status").val(status);
  119. tips.tableRefresh();
  120. },
  121. notice: function () {
  122. layer.open({
  123. type: 1,
  124. content: $("#notice-text"),
  125. title: '注意事项',
  126. area: ['60%', '80%'],
  127. closeBtn: 0,
  128. btn: ['确认']
  129. });
  130. }
  131. };
  132. var config = {};
  133. config.url = '/admin/link/hall';
  134. config.columns = [ //字段
  135. {
  136. title: '序号', align: 'center', formatter: function (value, item, index) {
  137. return index + 1;
  138. }
  139. },
  140. {
  141. title: '标题', field: 'title', align: 'center', formatter: function (value, row) {
  142. if (row.status == 2 && row.flag == 1) {
  143. return (
  144. '<label class="text-danger">' + value + '</label><b class="badge badge-warning">notice</b>'
  145. );
  146. } else {
  147. return value;
  148. }
  149. }
  150. },
  151. {title: '兼职人员', field: 'worker_name', align: 'center'},
  152. {title: '站点名称', field: 'site_title', align: 'center'},
  153. // {title: '平台链接', field: 'translate_words', align: 'center'},
  154. {title: '状态', field: 'status_title', align: 'center'},
  155. {title: '审核时间', field: 'audit_at', align: 'center'},
  156. {title: '创建时间', field: 'created_at', align: 'center'},
  157. {title: '过期时间', field: 'expired_at', align: 'center'},
  158. {
  159. title: '操作', field: 'id', align: 'center',
  160. formatter: function (value, row) {
  161. return (
  162. '<button onclick="units.save(' + value + ',' + row.status + ')" class="btn btn-xs"><span class="glyphicon glyphicon-edit"></span>查看</button>'
  163. );
  164. // var str = '', title = '查看';
  165. // if (row.status === 2 || row.status === 4) {
  166. // title = '翻译';
  167. // }
  168. // str += '<button onclick="units.detail(' + value + ',' + row.status + ')" class="btn btn-xs"><span class="glyphicon glyphicon-edit"></span>' + title + '</button>';
  169. //
  170. // return str;
  171. }
  172. }
  173. ];
  174. tips.bootstrapTable(config);
  175. setTimeout('units.notice();', 500);
  176. </script>
  177. @endsection