ServiceList.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <div class="service-list">
  3. <div class="container">
  4. <div class="list-title">
  5. <p>园区服务</p>
  6. </div>
  7. <div class="list-link">
  8. <ul class="list-inline">
  9. <li class="active">全部</li>
  10. <li v-for="item in serviceData" class="active">{{ item.st_name }}</li>
  11. </ul>
  12. </div>
  13. <div class="list-bottom" v-for="(item) in serviceData">
  14. <div class="left_title">
  15. <img :src="item.st_icon">
  16. <p v-text="item.st_name"/>
  17. </div>
  18. <ul class="list-inline" >
  19. <li v-for="(childItem) in item.serves" @click="jump(childItem.sv_id)">
  20. <img :src="childItem.sv_logourl.platform">
  21. <p>{{ childItem.sv_name }}</p>
  22. </li>
  23. </ul>
  24. </div>
  25. </div>
  26. </div>
  27. </template>
  28. <script>
  29. export default {
  30. name: 'ServiceList',
  31. computed: {
  32. serviceData () {
  33. return this.$store.state.serviceList.serviceData.data.configs
  34. }
  35. },
  36. methods: {
  37. jump (type) {
  38. if (!this.$store.state.option.user.data.name) {
  39. this.$message({
  40. type: 'error',
  41. message: '亲,请先登录!'
  42. })
  43. } else {
  44. this.$router.push('/repairs/' + type)
  45. }
  46. }
  47. }
  48. }
  49. </script>
  50. <style scoped type="text/scss" lang="scss">
  51. .service-list{
  52. padding-top:50px;
  53. padding-bottom:165px;
  54. .list-title {
  55. text-align: center;
  56. p{
  57. margin-bottom:40px;
  58. font-size: 28px;
  59. color:#000;
  60. }
  61. }
  62. .list-link{
  63. margin:0 auto;
  64. margin-bottom:80px;
  65. text-align: center;
  66. ul{
  67. margin:0;
  68. li {
  69. padding: 0 15px;
  70. font-size: 14px;
  71. color: #333;
  72. text-align: center;
  73. border-right:1px solid #bfbfbf;
  74. &:last-child{
  75. border:0;
  76. }
  77. &:hover, &.active{
  78. color:#149ccf;
  79. cursor:pointer;
  80. }
  81. }
  82. }
  83. }
  84. .list-bottom{
  85. margin-bottom:45px;
  86. .left_title{
  87. float:left;
  88. width:130px;
  89. height:240px;
  90. position:relative;
  91. img{
  92. position:absolute;
  93. top:0 ;
  94. left:0;
  95. width: 100%;
  96. height:100%;
  97. z-index:-100;
  98. }
  99. p{
  100. padding-top:24px;
  101. font-size: 22px;
  102. color:#fff;
  103. text-align: center;
  104. }
  105. }
  106. ul{
  107. margin-left:130px;
  108. height:240px;
  109. background: #fff;
  110. li{
  111. width: 150px;
  112. height: 120px;
  113. text-align: center;
  114. line-height: 40px;
  115. padding-top: 15px;
  116. &:hover{
  117. cursor:pointer;
  118. transform:scale(1.1);
  119. > p{
  120. color:#149ccf;
  121. }
  122. }
  123. img{
  124. vertical-align: top;
  125. text-align: center;
  126. width:40%;
  127. height:40%;
  128. }
  129. > p{
  130. font-size: 16px;
  131. color:#464646;
  132. width:100%;
  133. margin:0;
  134. }
  135. }
  136. }
  137. }
  138. }
  139. </style>