index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <div class="historical-info">
  3. <div class="container">
  4. <div class="historical-top">
  5. <p>历史服务申请</p>
  6. <div class="top-list">
  7. <div class="list-left">
  8. <span>全部</span>
  9. </div>
  10. <div class="list-right">
  11. <span>共&nbsp;<b>{{ searchList ? searchList.listdata.length : '0' }}</b>&nbsp;条</span>
  12. <div class="nav-search">
  13. <input type="text">
  14. <i class="fa fa-search"/>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. <table class="table table-hover">
  20. <thead class="text-center">
  21. <tr style="background: #efefef;">
  22. <th class="text-center" v-for="list in searchList.columns">{{ list.caption }}</th>
  23. </tr>
  24. </thead>
  25. <tbody class="text-center" >
  26. <tr v-for="(item, index) in searchList.listdata" @click="onclick(index)">
  27. <td v-for="(sun, num) in searchList.columns">{{ item[searchList.columns[num].dataIndex] }}</td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. </div>
  33. </template>
  34. <script>
  35. export default {
  36. name: 'HistoricalInfo',
  37. layout: 'town',
  38. fetch ({ store, route }) {
  39. return Promise.all([
  40. store.dispatch('searchServiceList', { serve_id: route.params.id, page: 1, pageSize: 20, _self: true, client_type: 'cc', cityId: store.state.option.user.data.currentCity ? store.state.option.user.data.currentCity.id : null })
  41. ])
  42. },
  43. data () {
  44. return {
  45. page: 1,
  46. pageSize: 20
  47. }
  48. },
  49. computed: {
  50. searchList () {
  51. return this.$store.state.searchList.listData.data
  52. }
  53. },
  54. methods: {
  55. onclick (index) {
  56. let _self = this
  57. _self.$router.push('/repairs/' + _self.$route.params.id + '/historicalInfo/' + _self.searchList.listdata[index].rp_id)
  58. }
  59. }
  60. }
  61. </script>
  62. <style scoped>
  63. .historical-info{
  64. margin-top:54px;
  65. border-bottom:8px solid #d5d5d5;
  66. color:#333;
  67. }
  68. .historical-info .container{width:1180px;}
  69. .historical-info .historical-top{
  70. padding-top:40px;
  71. margin-bottom:12px;
  72. }
  73. .historical-info .historical-top p{
  74. padding-left:10px;
  75. font-size: 24px;
  76. color:#333;
  77. margin-bottom:25px;
  78. }
  79. .historical-info .historical-top .top-list{
  80. display:inline-flex;
  81. width:100%;
  82. justify-content:space-between;
  83. }
  84. .historical-info .historical-top .top-list .list-left span{
  85. display:inline-block;
  86. height:40px;
  87. line-height:40px;
  88. margin:0 14px;
  89. border-bottom:5px solid transparent;
  90. }
  91. .historical-info .historical-top .top-list .list-left span:hover{
  92. color:#d82128;
  93. border-bottom:5px solid #d82128;
  94. cursor:pointer;
  95. }
  96. .historical-info .historical-top .top-list .list-right{
  97. line-height: 40px;
  98. }
  99. .historical-info .historical-top .top-list .list-right span{
  100. margin-right:20px;
  101. }
  102. .historical-info .historical-top .top-list .list-right span b{
  103. color:#d82128;
  104. }
  105. .historical-info .historical-top .top-list .list-right .nav-search{
  106. display:inline-block;
  107. position:relative;
  108. margin-right:20px;
  109. padding-right:20px;
  110. }
  111. .historical-info .historical-top .top-list .list-right .nav-search i{
  112. position:absolute;
  113. font-weight: bold;
  114. top:12px ;
  115. right:25px;
  116. color:#9e9e9e;
  117. }
  118. .historical-info .historical-top .top-list .list-right .nav-search input{
  119. border-right:1px solid #ddd;
  120. border-radius: 10px;
  121. width:112px;
  122. height:24px;
  123. line-height: 22px;
  124. font-size: 14px;
  125. padding:0 20px 0 5px ;
  126. }
  127. </style>