expertData.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <div id="expertData">
  3. <el-row>
  4. <el-col :span="24" class="style">
  5. <el-tabs v-model="active" type="card">
  6. <el-tab-pane label="专家智库" name="first">
  7. <el-col :span="24" class="info">
  8. <el-col :span="8" class="list" v-for="(item, index) in expertList" :key="index">
  9. <el-col :span="6" class="image">
  10. <el-image :src="item.img_path">
  11. <div slot="error" class="image-slot">
  12. <el-image :src="img_url"></el-image>
  13. </div>
  14. </el-image>
  15. </el-col>
  16. <el-col :span="18" class="text">
  17. <p class="textOver">{{ item.name }}</p>
  18. <p class="textOver">{{ item.zwzc }}</p>
  19. <p class="textOver">{{ item.company }}</p>
  20. <p>
  21. <el-button type="primary" size="mini">详情</el-button>
  22. <el-button type="success" size="mini">对接</el-button>
  23. </p>
  24. </el-col>
  25. </el-col>
  26. </el-col>
  27. <el-col :span="24" class="btn">
  28. <el-button type="primary" size="mini">查看更多专家</el-button>
  29. </el-col>
  30. </el-tab-pane>
  31. </el-tabs>
  32. </el-col>
  33. </el-row>
  34. </div>
  35. </template>
  36. <script>
  37. import { mapState, createNamespacedHelpers } from 'vuex';
  38. const { mapActions: expert } = createNamespacedHelpers('expert');
  39. export default {
  40. metaInfo() {
  41. return { title: this.$route.meta.title };
  42. },
  43. name: 'expertData',
  44. props: {},
  45. components: {},
  46. data: function() {
  47. return {
  48. active: 'first',
  49. // 专家列表
  50. // 无头像
  51. img_url: require('@common/src/assets/live/d10_fbb1.png'),
  52. expertList: [],
  53. };
  54. },
  55. async created() {
  56. await this.search();
  57. },
  58. methods: {
  59. ...expert(['query']),
  60. async search({ skip = 0, limit = 9, ...info } = {}) {
  61. let res = await this.query({ skip, limit, ...info });
  62. if (this.$checkRes(res)) {
  63. this.$set(this, `expertList`, res.data);
  64. }
  65. },
  66. },
  67. computed: {
  68. ...mapState(['user']),
  69. },
  70. watch: {},
  71. };
  72. </script>
  73. <style lang="less" scoped>
  74. .style {
  75. .info {
  76. height: 465px;
  77. overflow: hidden;
  78. padding: 0 10px;
  79. .list {
  80. width: 32.6%;
  81. height: 140px;
  82. box-shadow: 0 0 5px #ccc;
  83. border-radius: 5px;
  84. margin: 5px 10px 10px 0;
  85. padding: 10px;
  86. .image {
  87. height: 120px;
  88. overflow: hidden;
  89. border: 1px dashed #ccc;
  90. .el-image {
  91. height: 120px;
  92. overflow: hidden;
  93. }
  94. }
  95. .text {
  96. padding: 0 0 0 10px;
  97. p {
  98. font-size: 16px;
  99. margin: 0 0 8px 0;
  100. }
  101. p:nth-child(1) {
  102. font-size: 18px;
  103. font-weight: bold;
  104. }
  105. }
  106. }
  107. .list:nth-child(3n) {
  108. margin: 5px 0 10px 0;
  109. }
  110. }
  111. .btn {
  112. text-align: center;
  113. }
  114. }
  115. </style>