service.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <div class="service">
  3. <div class="container">
  4. <div class="top clearfix">
  5. <div class="title">
  6. <p>Platform service</p>
  7. <h2>平台服务</h2>
  8. </div>
  9. </div>
  10. <ul class="content clearfix list-unstyled">
  11. <li v-for="(data, index) in serviceData" @click="enterModule(index)"
  12. @mouseenter="setStatus('in', index)"
  13. @mouseleave="setStatus('out', index)">
  14. <div>
  15. <img :src="data.imgUrl">
  16. </div>
  17. <div>
  18. <h2>{{data.chinaName}}</h2>
  19. <p>{{data.englishName}}</p>
  20. </div>
  21. </li>
  22. </ul>
  23. </div>
  24. </div>
  25. </template>
  26. <script>
  27. export default {
  28. name: 'PlatformService',
  29. data () {
  30. return {
  31. serviceData: [{
  32. imgUrl: '/images/btbBusiness/customer0.png',
  33. englishName: 'customer service',
  34. chinaName: '客户服务',
  35. enterUrl: 'http://uas.ubtob.com/serve'
  36. }, {
  37. imgUrl: '/images/btbBusiness/procurement0.png',
  38. englishName: 'Procurement management',
  39. chinaName: '采购管理',
  40. enterUrl: 'http://uas.ubtob.com/#/purc/order'
  41. }, {
  42. imgUrl: '/images/btbBusiness/sales0.png',
  43. englishName: 'Sales management',
  44. chinaName: '销售管理',
  45. enterUrl: 'http://uas.ubtob.com/#/sale/order'
  46. }, {
  47. imgUrl: '/images/btbBusiness/subcontract0.png',
  48. englishName: 'subcontract',
  49. chinaName: '委外加工',
  50. enterUrl: 'http://uas.ubtob.com/#/sale/maketodo/makeorder'
  51. }, {
  52. imgUrl: '/images/btbBusiness/quality0.png',
  53. englishName: 'Quality Control',
  54. chinaName: '品质管理',
  55. enterUrl: 'http://uas.ubtob.com/#/sale/MRB'
  56. }, {
  57. imgUrl: '/images/btbBusiness/financial0.png',
  58. englishName: 'Financial docking',
  59. chinaName: '财务对接',
  60. enterUrl: 'http://uas.ubtob.com/#/fa/apBill'
  61. }]
  62. }
  63. },
  64. methods: {
  65. // 鼠标移入更换图标
  66. setStatus: function (type, index) {
  67. switch (index) {
  68. case 0:
  69. this.serviceData[index].imgUrl = type === 'in' ? '/images/btbBusiness/customer1.png' : '/images/btbBusiness/customer0.png'
  70. break
  71. case 1:
  72. this.serviceData[index].imgUrl = type === 'in' ? '/images/btbBusiness/procurement1.png' : '/images/btbBusiness/procurement0.png'
  73. break
  74. case 2:
  75. this.serviceData[index].imgUrl = type === 'in' ? '/images/btbBusiness/sales1.png' : '/images/btbBusiness/sales0.png'
  76. break
  77. case 3:
  78. this.serviceData[index].imgUrl = type === 'in' ? '/images/btbBusiness/subcontract1.png' : '/images/btbBusiness/subcontract0.png'
  79. break
  80. case 4:
  81. this.serviceData[index].imgUrl = type === 'in' ? '/images/btbBusiness/quality1.png' : '/images/btbBusiness/quality0.png'
  82. break
  83. case 5:
  84. this.serviceData[index].imgUrl = type === 'in' ? '/images/btbBusiness/financial1.png' : '/images/btbBusiness/financial0.png'
  85. break
  86. }
  87. },
  88. enterModule: function (index) {
  89. if (this.user.logged) {
  90. window.location.href = this.serviceData[index].enterUrl
  91. } else {
  92. this.$router.push('/auth/login')
  93. }
  94. }
  95. }
  96. }
  97. </script>
  98. <style type="text/scss" lang="scss">
  99. .service{
  100. height: 450px;
  101. .container{
  102. width: 1190px;
  103. margin: 0 auto;
  104. .top{
  105. padding-top:30px;
  106. margin-bottom:50px;
  107. .title{
  108. margin: 0 auto;
  109. text-align: center;
  110. width:215px;
  111. border-bottom:1px solid #ff7070;
  112. p{
  113. margin:0;
  114. font-family: FZLTXHK;
  115. font-size: 14px;
  116. color: #666;
  117. }
  118. h2{
  119. font-size: 32px;
  120. margin:0;
  121. line-height: 46px;
  122. color: #333;
  123. }
  124. &::before{
  125. content: '';
  126. display:block;
  127. position:relative;
  128. left:55px;
  129. top:61px;
  130. width:105px;
  131. height:1px;
  132. background: #00caff;
  133. }
  134. &::after{
  135. content: '';
  136. display:block;
  137. position:relative;
  138. left:55px;
  139. top:4px;
  140. width:105px;
  141. height:1px;
  142. background: #4391f7;
  143. }
  144. }
  145. }
  146. .content{
  147. width: 1096px;
  148. margin: 0 auto;
  149. li{
  150. float: left;
  151. width: 225px;
  152. margin: 0px 170px 0px 2px;
  153. &:nth-child(2), &:nth-child(5) {
  154. width: 295px;
  155. }
  156. &:nth-child(3), &:nth-child(6) {
  157. margin-right: 0;
  158. }
  159. &:nth-child(4), &:nth-child(5), &:nth-child(6) {
  160. margin-top: 82px;
  161. }
  162. &:hover{
  163. cursor: pointer;
  164. }
  165. div{
  166. float: left;
  167. h2{
  168. margin: 0;
  169. position: relative;
  170. top: 10px;
  171. left: 20px;
  172. color: #666;
  173. font-size: 20px;
  174. }
  175. p{
  176. margin: 0px;
  177. position: relative;
  178. top: 12px;
  179. left: 20px;
  180. font-size: 10px;
  181. }
  182. }
  183. }
  184. }
  185. }
  186. }
  187. </style>