reportItem.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <view class="container-report-item" @click="goDetail(list)">
  3. <view class="item-title text-Line">{{ list.Title }}</view>
  4. <view class="item-content">
  5. <text>核心观点:</text>
  6. <rich-text class="text-Line rich-text-item" v-if="list.Annotation" :nodes="list.Annotation"></rich-text>
  7. </view>
  8. <view class="item-abstract text-Line" v-if="list.Abstract"> 摘要:{{ list.Abstract }} </view>
  9. <view class="item-time">
  10. <text>{{ list.PublishDate }}</text>
  11. <view class="item-examine" v-if="list.IsResearch">
  12. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png"></image>
  13. <text>{{ list.Pv }}</text>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. import mpHtml from "@/uni_modules/mp-html/components/mp-html/mp-html.vue";
  20. export default {
  21. name: "",
  22. components: { mpHtml },
  23. props: {
  24. list: {
  25. type: Object,
  26. default: {},
  27. required: true,
  28. },
  29. },
  30. data() {
  31. return {};
  32. },
  33. computed: {},
  34. watch: {},
  35. created() {},
  36. mounted() {},
  37. methods: {
  38. goDetail(item) {
  39. if (item.HomeType !== 1) {
  40. /* 无需授权且已绑定 检验是或否有权限 */
  41. this.$store.dispatch("checkHandle", "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId);
  42. }
  43. },
  44. },
  45. };
  46. </script>
  47. <style scoped lang="scss">
  48. .container-report-item {
  49. width: 100%;
  50. background: #ffffff;
  51. box-shadow: 0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16);
  52. border-radius: 8rpx;
  53. padding: 20rpx;
  54. margin-bottom: 20rpx;
  55. .item-title {
  56. position: relative;
  57. font-size: 32rpx;
  58. font-weight: 500;
  59. color: #333333;
  60. line-height: 38rpx;
  61. -webkit-line-clamp: 3;
  62. line-clamp: 3;
  63. text-indent: 0.5em;
  64. &::before {
  65. content: "";
  66. position: absolute;
  67. top: 5rpx;
  68. left: 0;
  69. width: 6rpx;
  70. height: 31rpx;
  71. background-color: #3385ff;
  72. }
  73. }
  74. .item-content {
  75. min-height: 140rpx;
  76. font-size: 26rpx;
  77. font-weight: 400;
  78. color: #666666;
  79. line-height: 30rpx;
  80. margin: 10rpx 0;
  81. .rich-text-item {
  82. line-height: 30rpx;
  83. overflow: hidden;
  84. -webkit-line-clamp: 7;
  85. line-clamp: 7;
  86. }
  87. }
  88. .item-abstract {
  89. font-size: 28rpx;
  90. font-weight: 400;
  91. color: #333333;
  92. line-height: 33rpx;
  93. -webkit-line-clamp: 3;
  94. line-clamp: 3;
  95. margin-bottom: 20rpx;
  96. }
  97. .text-Line {
  98. text-overflow: -o-ellipsis-lastline;
  99. overflow: hidden;
  100. text-overflow: ellipsis;
  101. display: -webkit-box;
  102. -webkit-box-orient: vertical;
  103. }
  104. .item-time {
  105. display: flex;
  106. align-items: center;
  107. justify-content: space-between;
  108. color: #acacac;
  109. font-size: 24rpx;
  110. line-height: 28rpx;
  111. .item-examine {
  112. display: flex;
  113. align-items: center;
  114. image {
  115. width: 30rpx;
  116. height: 24rpx;
  117. margin: 0 10rpx 0 15rpx;
  118. }
  119. }
  120. }
  121. }
  122. </style>