info.blade.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. @extends('admin/layout')
  2. @section('header')
  3. @endsection
  4. @section('content')
  5. <body class="gray-bg">
  6. <div class="wrapper wrapper-content animated fadeIn">
  7. <div class="ibox float-e-margins">
  8. <div class="ibox-content">
  9. <span style="font-weight: bold;font-size: 16px">总数: <span id="total">0</span></span>
  10. <form class="row" id="searchForm">
  11. <div class="col-md-7 pull-right">
  12. <div class="input-group">
  13. <input type="text" placeholder="请输入平台链接" class="form-control"
  14. name="keyword"
  15. id="keyword" style="width: 300px;float: right">
  16. <span class="input-group-btn">
  17. <button type="button" class="btn btn-md btn-primary" style="border-radius:2px;"
  18. onclick="units.search()"> 搜索
  19. </button>
  20. <button type="reset" class="btn btn-md btn-primary" style="margin-left: 10px;border-radius:2px;"
  21. name="resetBtn"> 重置
  22. </button>
  23. <button type="button" class="btn btn-md btn-primary" style="margin-left: 10px;border-radius:2px;"
  24. onclick="units.exportExcel()"> 导出</button>
  25. <button class="btn btn-default closeLayer" id="clo" type="button">关闭页面</button>
  26. </span>
  27. </div>
  28. </div>
  29. </form>
  30. <hr>
  31. <div class="table-responsive">
  32. <table id="table" class="table table-condensed"
  33. data-mobile-responsive="true"></table>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. </body>
  39. @endsection
  40. @section('footer')
  41. <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
  42. <script>
  43. laydate.render({
  44. elem: '#date_range',
  45. type: 'date',
  46. range: true
  47. });
  48. var units = {
  49. exportExcel: function () {
  50. var formValues = tips.getFormValues("#searchForm");
  51. var str = $.param(formValues);
  52. window.open('/admin/link/externalInfoExport?' + str)
  53. },
  54. search: function () {
  55. tips.selectPage();
  56. },
  57. fileUpload: function () {
  58. var config = {
  59. url: '/admin/tool/excel-upload'
  60. };
  61. config.success = function (result) {
  62. $("#excel_path").val(result.data.file_url);
  63. layer.msg(result.message, {icon: 6, time: 1500});
  64. };
  65. tips.fileUpload($("#excel_file"), config);
  66. },
  67. getIdsBySelections: function () {
  68. var selections = $("#table").bootstrapTable('getSelections');
  69. var ids = [];
  70. $.each(selections, function (inx, val) {
  71. ids.push(val.id);
  72. });
  73. return ids;
  74. },
  75. };
  76. var config = {};
  77. var keyword1 = getQueryVariable("keyword");
  78. $('#keyword').val(keyword1);
  79. if(keyword1==''){
  80. document.getElementById("clo").style.display="none";
  81. }
  82. config.url = '/admin/link/info?keyword='+keyword1;
  83. config.pageSize = 15;
  84. config.columns = [ //字段
  85. // {checkbox: true},
  86. {
  87. title: '序号', align: 'center', formatter: function (value, item, index) {
  88. return index + 1;
  89. }
  90. },
  91. {title: '类型', field: 'link_type', align: 'center'},
  92. {title: '项目名称', field: 'cn_title', align: 'center'},
  93. {title: '平台链接', field: 'link_url', align: 'center'},
  94. {title: '用户名', field: 'username', align: 'center'},
  95. {title: '邮箱', field: 'email', align: 'center'},
  96. {title: '密码', field: 'password', align: 'center'},
  97. {title: 'profile演示地址', field: 'url', align: 'center'},
  98. ];
  99. config.onLoadSuccess = function (data) {
  100. $("#total").text(data.total);
  101. };
  102. tips.bootstrapTable(config);
  103. function getQueryVariable(variable)
  104. {
  105. var query = window.location.search.substring(1);
  106. var vars = query.split("&");
  107. for (var i=0;i<vars.length;i++) {
  108. var pair = vars[i].split("=");
  109. if(pair[0] == variable){return pair[1];}
  110. }
  111. return(false);
  112. }
  113. </script>
  114. @endsection