zhuanti.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <template>
  2. <div id="zhuanti">
  3. <el-row>
  4. <el-col :span="24" class="info">
  5. <el-tabs type="border-card">
  6. <el-tab-pane>
  7. <span slot="label">专题研讨</span>
  8. <el-col :span="24" class="list">
  9. <ul>
  10. <li
  11. class="zhuantiList"
  12. v-for="(item, index) in ztytList"
  13. :key="index"
  14. @click="$router.push({ path: '/service/servicedetail', query: { id: item.id } })"
  15. >
  16. <el-col :span="20" class="title textOver">{{ item.title }}</el-col>
  17. <el-col :span="4" class="date textOver">{{
  18. item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || ''
  19. }}</el-col>
  20. </li>
  21. </ul>
  22. <el-col class="more" :span="24"><el-link :underline="false" @click="moreClick()">查看更多</el-link></el-col>
  23. </el-col>
  24. </el-tab-pane>
  25. <el-tab-pane>
  26. <span slot="label">技术问答</span>
  27. <el-col :span="24" class="list">
  28. <ul>
  29. <li
  30. class="zhuantiList"
  31. v-for="(item, index) in jswdList"
  32. :key="index"
  33. @click="$router.push({ path: '/service/servicedetail', query: { id: item.id } })"
  34. >
  35. <el-col :span="20" class="title textOver">{{ item.title }}</el-col>
  36. <el-col :span="4" class="date textOver">{{
  37. item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || ''
  38. }}</el-col>
  39. </li>
  40. </ul>
  41. <el-col class="more" :span="24"><el-link :underline="false" @click="moreClick()">查看更多</el-link></el-col>
  42. </el-col>
  43. </el-tab-pane>
  44. <el-tab-pane>
  45. <span slot="label">行业研究</span>
  46. <el-col :span="24" class="list">
  47. <ul>
  48. <li
  49. class="zhuantiList"
  50. v-for="(item, index) in hyyjList"
  51. :key="index"
  52. @click="$router.push({ path: '/service/servicedetail', query: { id: item.id } })"
  53. >
  54. <el-col :span="20" class="title textOver">{{ item.title }}</el-col>
  55. <el-col :span="4" class="date textOver">{{
  56. item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || ''
  57. }}</el-col>
  58. </li>
  59. </ul>
  60. <el-col class="more" :span="24"><el-link :underline="false" @click="moreClick()">查看更多</el-link></el-col>
  61. </el-col>
  62. </el-tab-pane>
  63. <el-tab-pane>
  64. <span slot="label">科技培训</span>
  65. <el-col :span="24" class="list">
  66. <ul>
  67. <li
  68. class="zhuantiList"
  69. v-for="(item, index) in kjpxList"
  70. :key="index"
  71. @click="$router.push({ path: '/service/servicedetail', query: { id: item.id } })"
  72. >
  73. <el-col :span="20" class="title textOver">{{ item.title }}</el-col>
  74. <el-col :span="4" class="date textOver">{{
  75. item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || ''
  76. }}</el-col>
  77. </li>
  78. </ul>
  79. <el-col class="more" :span="24"><el-link :underline="false" @click="moreClick()">查看更多</el-link></el-col>
  80. </el-col>
  81. </el-tab-pane>
  82. </el-tabs>
  83. </el-col>
  84. </el-row>
  85. </div>
  86. </template>
  87. <script>
  88. export default {
  89. name: 'zhuanti',
  90. props: {
  91. ztytList: null, //专题研讨
  92. jswdList: null, //技术问答
  93. hyyjList: null, //行业研究
  94. kjpxList: null, //科技培训
  95. },
  96. components: {},
  97. data: () => ({}),
  98. created() {},
  99. computed: {},
  100. methods: {
  101. moreClick() {
  102. this.$router.push({ path: '/service/servicelist' });
  103. },
  104. },
  105. };
  106. </script>
  107. <style lang="less" scoped>
  108. ul {
  109. padding: 0;
  110. margin: 0;
  111. }
  112. li {
  113. padding: 0;
  114. margin: 0;
  115. color: #999;
  116. }
  117. .info {
  118. padding: 20px;
  119. height: 300px;
  120. overflow: hidden;
  121. }
  122. /deep/.el-tabs--border-card {
  123. border: none;
  124. box-shadow: none;
  125. }
  126. /deep/.el-tabs--border-card > .el-tabs__header {
  127. background-color: transparent;
  128. border-bottom: none;
  129. margin: 0 0 10px 0;
  130. }
  131. /deep/.el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active {
  132. color: #2c3350;
  133. border-right-color: transparent;
  134. border-left-color: transparent;
  135. }
  136. /deep/.el-tabs__item {
  137. padding: 0 15px 0 0;
  138. font-size: 22px;
  139. font-weight: bold;
  140. }
  141. /deep/.el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2) {
  142. padding-left: 0;
  143. }
  144. /deep/.el-tabs--border-card > .el-tabs__content {
  145. padding: 0;
  146. }
  147. .list {
  148. height: 220px;
  149. overflow: hidden;
  150. }
  151. .list ul {
  152. min-height: 30px;
  153. max-height: 180px;
  154. overflow: hidden;
  155. padding: 0 0 0 20px;
  156. }
  157. .list ul li {
  158. padding: 0 0 9px 0;
  159. }
  160. .list ul li .date {
  161. display: inline-block;
  162. width: 90px;
  163. text-align: left;
  164. font-size: 16px;
  165. color: #60626e;
  166. }
  167. .list ul li .title {
  168. display: inline-block;
  169. font-size: 16px;
  170. color: #60626e;
  171. width: 610px;
  172. margin: 0 20px 0 0;
  173. }
  174. .list ul li:hover .date {
  175. color: #215299;
  176. }
  177. .list ul li:hover .title {
  178. color: #215299;
  179. }
  180. .more {
  181. height: 30px;
  182. line-height: 25px;
  183. text-align: center;
  184. background: #f5f5f5;
  185. }
  186. .more .el-link {
  187. font-size: 16px;
  188. color: #60626e;
  189. }
  190. </style>