_table.blade.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <table class="table table-striped table-bordered table-sm table-hover">
  2. <thead class="text-center">
  3. <tr class="align-text-bottom">
  4. <th rowspan="2">序号</th>
  5. <th rowspan="2">类型</th>
  6. <th rowspan="2">需求描述</th>
  7. <th colspan="3" rowspan="1">过程</th>
  8. <th rowspan="2">附件</th>
  9. <th rowspan="2">发起人</th>
  10. <th rowspan="2">处理人</th>
  11. <th rowspan="2">发起时间</th>
  12. <th rowspan="2">状态</th>
  13. <th rowspan="2">操作</th>
  14. </tr>
  15. <tr class="thead-light">
  16. <th>说明</th>
  17. <th>经手人</th>
  18. <th>时间</th>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. <template v-if="demands.length>0">
  23. <tr class="text-center" v-for="(demand,i) in demands" @click="selectTr===i+1?selectTr=0:selectTr=i+1"
  24. :class="selectTr===i+1?'focusing' : ''">
  25. <td>@{{ i+1 }}</td>
  26. <td>@{{ demand.type }}</td>
  27. <td>@{{ demand.description }}</td>
  28. <template v-for="(process,index) in demand.processes">
  29. <td>@{{ process.explain }}</td>
  30. <td>@{{ process.processor ? process.processor.name : '' }}</td>
  31. <td>@{{ process.created_at }}</td>
  32. </template>
  33. <template>
  34. <td></td>
  35. <td></td>
  36. <td></td>
  37. </template>
  38. <td>
  39. {{-- 附件 --}}
  40. <template v-if="demand.uploadFile">
  41. 附件
  42. </template>
  43. <template v-else>
  44. <button type="button" class="btn btn-outline-secondary" @click="showUploadDiv(demand,i)">上传文件
  45. </button>
  46. </template>
  47. </td>
  48. <td>@{{ demand.initiator ? demand.initiator.name : '' }}</td>
  49. <td>@{{ demand.handle ? demand.handle.name : '' }}</td>
  50. <td>@{{ demand.created_at }}</td>
  51. <td>@{{ demand.status }}</td>
  52. <td>
  53. <button class="btn btn-outline-success" @click="finishDemand(demand)" v-if="demand['status'] === '处理中'">完结</button>
  54. <button class="btn btn-outline-success" @click="claimDemand(demand,i)" v-if="demand['status'] === '未处理'">认领</button>
  55. <button class="btn btn-outline-danger" @click="destroyDemand(demand,i)">删</button>
  56. </td>
  57. </tr>
  58. </template>
  59. <template v-else>
  60. <tr>
  61. <td colspan="11">
  62. <div class="alert alert-info text-center">
  63. 按条件查询的数据结果未空
  64. </div>
  65. </td>
  66. </tr>
  67. </template>
  68. </tbody>
  69. </table>
  70. {{ $demands->withQueryString()->links() }}