question.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <div id="question">
  3. <el-row>
  4. <el-col :span="24" class="style">
  5. <el-col :span="24" class="top">
  6. <top :topInfo="topInfo" @moreBtn="moreBtn"></top>
  7. </el-col>
  8. <el-col :span="24" class="down">
  9. <el-col :span="24" class="list" v-for="(item, index) in questionList" :key="index" @click.native="detailBtn(item)">
  10. <el-col :span="20" class="title textOver">
  11. {{ item.title }}
  12. </el-col>
  13. <el-col :span="4" class="date">
  14. {{ item.create_date || '暂无' }}
  15. </el-col>
  16. <el-col :span="24" class="orgin"> 信息来源:{{ item.origin || '暂无' }} </el-col>
  17. </el-col>
  18. </el-col>
  19. </el-col>
  20. </el-row>
  21. </div>
  22. </template>
  23. <script>
  24. import top from './parts/topColumn.vue';
  25. import { mapState, createNamespacedHelpers } from 'vuex';
  26. export default {
  27. metaInfo() {
  28. return { title: this.$route.meta.title };
  29. },
  30. name: 'question',
  31. props: {
  32. questionList: { type: Array },
  33. },
  34. components: {
  35. top,
  36. },
  37. data: function() {
  38. return {
  39. topInfo: {
  40. title: '调研调查',
  41. engTitle: 'question',
  42. },
  43. };
  44. },
  45. created() {},
  46. methods: {
  47. // 更多
  48. moreBtn() {
  49. this.$router.push({ path: '/techolchat/list', query: { index: 0 } });
  50. },
  51. // 详情
  52. detailBtn(data) {
  53. this.$router.push({ path: './list', query: { index: 0, id: data._id } });
  54. },
  55. },
  56. computed: {
  57. ...mapState(['user']),
  58. },
  59. watch: {},
  60. };
  61. </script>
  62. <style lang="less" scoped>
  63. .style {
  64. .top {
  65. height: 50px;
  66. }
  67. .down {
  68. height: 450px;
  69. position: relative;
  70. .list {
  71. border-bottom: 1px dashed #000;
  72. padding: 11px 0;
  73. .title {
  74. font-size: 16px;
  75. font-weight: bold;
  76. }
  77. .date {
  78. text-align: right;
  79. font-size: 16px;
  80. }
  81. .orgin {
  82. font-size: 16px;
  83. margin: 10px 0 0 0;
  84. }
  85. }
  86. .list:hover {
  87. cursor: pointer;
  88. .title {
  89. color: #409eff;
  90. }
  91. }
  92. }
  93. }
  94. </style>