infoList.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <div id="infoList">
  3. <el-row>
  4. <el-col :span="24" class="info">
  5. <el-col :span="24" class="one">
  6. <el-col :span="24" class="top">
  7. <span></span>
  8. <span>科技资讯</span>
  9. <span @click="$router.push({ path: '/news/listDetail', query: { col_name: '科技资讯', display: '0' } })">MORE</span>
  10. </el-col>
  11. <el-col :span="24" class="list">
  12. <el-col :span="24" class="oneList" @click.native="zixun(item)" v-for="(item, index) in oneList" :key="index">
  13. <span></span>
  14. <span class="textOver">{{ item.title }}</span>
  15. <span>{{ item.date }}</span>
  16. </el-col>
  17. </el-col>
  18. </el-col>
  19. <el-col :span="24" class="one">
  20. <el-col :span="24" class="top">
  21. <span></span>
  22. <span>技术前沿</span>
  23. <span @click="$router.push({ path: '/news/listDetail', query: { col_name: '技术前沿', display: '0' } })">MORE</span>
  24. </el-col>
  25. <el-col :span="24" class="list">
  26. <el-col :span="24" class="oneList" @click.native="jishu(item)" v-for="(item, index) in twoList" :key="index">
  27. <span></span>
  28. <span class="textOver">{{ item.title }}</span>
  29. <span>{{ item.date }}</span>
  30. </el-col>
  31. </el-col>
  32. </el-col>
  33. <el-col :span="24" class="one">
  34. <el-col :span="24" class="top">
  35. <span></span>
  36. <span>工作动态</span>
  37. <span @click="$router.push({ path: '/news/listDetail', query: { col_name: '工作动态', display: '0' } })">MORE</span>
  38. </el-col>
  39. <el-col :span="24" class="list">
  40. <el-col :span="24" class="oneList" @click.native="jobs(item)" v-for="(item, index) in threeList" :key="index">
  41. <span></span>
  42. <span class="textOver">{{ item.title }}</span>
  43. <span>{{ item.date }}</span>
  44. </el-col>
  45. </el-col>
  46. </el-col>
  47. </el-col>
  48. </el-row>
  49. </div>
  50. </template>
  51. <script>
  52. import { mapState, createNamespacedHelpers } from 'vuex';
  53. export default {
  54. name: 'infoList',
  55. props: {
  56. oneList: null,
  57. twoList: null,
  58. threeList: null,
  59. },
  60. components: {},
  61. data: function() {
  62. return {};
  63. },
  64. created() {},
  65. methods: {
  66. async jobs(item) {
  67. if (item.url) {
  68. window.open(item.url);
  69. } else {
  70. console.log(item);
  71. this.$router.push({ path: '/news/listDetail', query: { col_name: '工作动态', id: item.id, display: '1' } });
  72. }
  73. },
  74. async zixun(item) {
  75. if (item.url) {
  76. window.open(item.url);
  77. } else {
  78. this.$router.push({ path: '/news/listDetail', query: { col_name: '科技资讯', id: item.id, display: '1' } });
  79. }
  80. },
  81. async jishu(item) {
  82. if (item.url) {
  83. window.open(item.url);
  84. } else {
  85. this.$router.push({ path: '/news/listDetail', query: { col_name: '技术前沿', id: 'id', display: '1' } });
  86. }
  87. },
  88. },
  89. computed: {
  90. ...mapState(['user']),
  91. pageTitle() {
  92. return `${this.$route.meta.title}`;
  93. },
  94. },
  95. metaInfo() {
  96. return { title: this.$route.meta.title };
  97. },
  98. };
  99. </script>
  100. <style lang="less" scoped>
  101. .info {
  102. padding: 0 20px;
  103. .one {
  104. height: 330px;
  105. overflow: hidden;
  106. margin: 0 0 20px 0;
  107. .top {
  108. height: 35px;
  109. margin: 20px 0;
  110. border-bottom: 1px dashed #ccc;
  111. span:first-child {
  112. display: inline-block;
  113. width: 4px;
  114. height: 20px;
  115. background: #005293;
  116. margin: 0 10px -3px 0;
  117. }
  118. span:nth-child(2) {
  119. font-size: 20px;
  120. color: #005293;
  121. font-weight: bold;
  122. }
  123. span:last-child {
  124. float: right;
  125. font-size: 15px;
  126. color: #005293;
  127. cursor: pointer;
  128. }
  129. }
  130. .oneList {
  131. padding: 0 0 7px 0;
  132. span:first-child {
  133. display: inline-block;
  134. width: 4px;
  135. height: 4px;
  136. background: #ccc;
  137. margin: 0px 10px 7px 0px;
  138. }
  139. span:nth-child(2) {
  140. display: inline-block;
  141. font-size: 16px;
  142. color: #555555;
  143. font-family: '微软雅黑';
  144. width: 85%;
  145. margin: 0 30px 0 0;
  146. }
  147. span:last-child {
  148. display: inline-block;
  149. width: 90px;
  150. font-size: 16px;
  151. color: #a8abb7;
  152. font-family: '微软雅黑';
  153. text-align: right;
  154. }
  155. }
  156. .oneList:hover span:nth-child(2) {
  157. cursor: pointer;
  158. color: #005293;
  159. }
  160. }
  161. }
  162. </style>