index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <div id="index">
  3. <el-row>
  4. <el-col :span="24" class="main">
  5. <div class="w_1200">
  6. <el-col :span="24" class="one">
  7. <el-col :span="12" class="left">
  8. <achieve :list="achieveList"></achieve>
  9. </el-col>
  10. <el-col :span="12" class="right">
  11. <patent :list="patentList"></patent>
  12. </el-col>
  13. </el-col>
  14. <el-col :span="24" class="two">
  15. <el-image :src="imgUrl"></el-image>
  16. </el-col>
  17. <el-col :span="24" class="one">
  18. <el-col :span="12" class="left">
  19. <business :list="businessList"></business>
  20. </el-col>
  21. <el-col :span="12" class="right">
  22. <expert :list="expertList"></expert>
  23. </el-col>
  24. </el-col>
  25. <el-col :span="24" class="two">
  26. <el-image :src="imgUrl"></el-image>
  27. </el-col>
  28. <el-col :span="24" class="one">
  29. <el-col :span="12" class="left">
  30. <technology :list="technologyList"></technology>
  31. </el-col>
  32. <el-col :span="12" class="right">
  33. <roadshow :list="roadshowList"></roadshow>
  34. </el-col>
  35. </el-col>
  36. </div>
  37. </el-col>
  38. </el-row>
  39. </div>
  40. </template>
  41. <script>
  42. import achieve from './index/achieve.vue';
  43. import patent from './index/patent.vue';
  44. import business from './index/business.vue';
  45. import expert from './index/expert.vue';
  46. import technology from './index/technology.vue';
  47. import roadshow from './index/roadshow.vue';
  48. import { mapState, createNamespacedHelpers } from 'vuex';
  49. const { mapActions: productIndex } = createNamespacedHelpers('productIndex');
  50. export default {
  51. metaInfo() {
  52. return { title: this.$route.meta.title };
  53. },
  54. name: 'index',
  55. props: {},
  56. components: {
  57. achieve,
  58. patent,
  59. business,
  60. expert,
  61. technology,
  62. roadshow,
  63. },
  64. data: function() {
  65. return {
  66. imgUrl: require('@common/src/assets/center/gqxx.png'),
  67. // 技术成果
  68. achieveList: [],
  69. // e专利
  70. patentList: [],
  71. // 商务服务
  72. businessList: [],
  73. // 专家智库
  74. expertList: [],
  75. // 科技需求
  76. technologyList: [],
  77. // 项目路演
  78. roadshowList: [],
  79. };
  80. },
  81. async created() {
  82. await this.search();
  83. },
  84. methods: {
  85. ...productIndex(['query']),
  86. async search({ skip = 0, limit = 10, ...info } = {}) {
  87. let res = await this.query({ ...info });
  88. if (this.$checkRes(res)) {
  89. this.$set(this, `achieveList`, res.data.achieve);
  90. this.$set(this, `technologyList`, res.data.require);
  91. this.$set(this, `businessList`, res.data.serve);
  92. this.$set(this, `patentList`, res.data.patent);
  93. this.$set(this, `expertList`, res.data.expert);
  94. this.$set(this, `roadshowList`, res.data.roadShow);
  95. }
  96. },
  97. },
  98. computed: {
  99. ...mapState(['user']),
  100. },
  101. watch: {},
  102. };
  103. </script>
  104. <style lang="less" scoped>
  105. .main {
  106. background-image: linear-gradient(#ffffff, #a3d5f6, #ffffff);
  107. min-height: 557px;
  108. padding: 10px 0;
  109. .one {
  110. margin: 0 0 10px 0;
  111. .left {
  112. width: 49%;
  113. min-height: 530px;
  114. background: #ffffff;
  115. padding: 15px;
  116. border-radius: 20px;
  117. margin: 0 24px 0 0;
  118. box-shadow: 0 0 5px #409eff;
  119. }
  120. .right {
  121. width: 49%;
  122. min-height: 530px;
  123. background: #ffffff;
  124. border-radius: 20px;
  125. padding: 15px;
  126. box-shadow: 0 0 5px #409eff;
  127. }
  128. }
  129. .two {
  130. height: 140px;
  131. overflow: hidden;
  132. margin: 0 0 10px 0;
  133. }
  134. }
  135. </style>