index.blade.php 1.7 KB

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