index.blade.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. @extends('layouts.app')
  2. @section('title')监视器 - 站管理@endsection
  3. @section('content')
  4. <span id="nav2">
  5. @component('station.menu')@endcomponent
  6. @component('station.monitor.menu')@endcomponent
  7. </span>
  8. <div class="container-fluid">
  9. <div class="card">
  10. <div class="card-body">
  11. @if(Session::has('successTip'))
  12. <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
  13. @endif
  14. <table class="table table-striped table-sm" id="list">
  15. <tr>
  16. <th>设备ID</th>
  17. <th>显示器名称</th>
  18. <th>父级设备</th>
  19. <th>硬件ID</th>
  20. <th>备注</th>
  21. <th>录入时间</th>
  22. </tr>
  23. <tr v-for="station in stations">
  24. <td class="text-muted">@{{station.id}}</td>
  25. <td>
  26. <a :href="'{{url('station/monitor/')}}'+'/'+station.id" target="_blank">
  27. <button class="btn btn-outline-info" >@{{station.name}}</button>
  28. </a>
  29. </td>
  30. <td>@{{station.parent?station.parent.name:''}}</td>
  31. <td>@{{station.code}}</td>
  32. <td>@{{station.remark}}</td>
  33. <td class="text-muted">@{{station.created_at}}</td>
  34. </tr>
  35. </table>
  36. {{$stations->links()}}
  37. </div>
  38. </div>
  39. </div>
  40. @endsection
  41. @section('lastScript')
  42. <script>
  43. new Vue({
  44. el:"#list",
  45. data:{
  46. stations:{!! json_encode($stations->toArray()['data'])??'""' !!},
  47. },
  48. });
  49. </script>
  50. @endsection