reportItem.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. overflow: hidden;
  56. .item-title {
  57. position: relative;
  58. font-size: 32rpx;
  59. font-weight: 500;
  60. color: #333333;
  61. line-height: 38rpx;
  62. -webkit-line-clamp: 3;
  63. line-clamp: 3;
  64. text-indent: 0.5em;
  65. &::before {
  66. content: "";
  67. position: absolute;
  68. top: 5rpx;
  69. left: 0;
  70. width: 6rpx;
  71. height: 31rpx;
  72. background-color: #3385ff;
  73. }
  74. }
  75. .item-content {
  76. min-height: 140rpx;
  77. font-size: 26rpx;
  78. font-weight: 400;
  79. color: #666666;
  80. line-height: 30rpx;
  81. margin: 10rpx 0;
  82. .rich-text-item {
  83. line-height: 30rpx;
  84. overflow: hidden;
  85. -webkit-line-clamp: 7;
  86. line-clamp: 7;
  87. }
  88. }
  89. .item-abstract {
  90. font-size: 28rpx;
  91. font-weight: 400;
  92. color: #333333;
  93. line-height: 33rpx;
  94. -webkit-line-clamp: 3;
  95. line-clamp: 3;
  96. margin-bottom: 20rpx;
  97. }
  98. .text-Line {
  99. text-overflow: -o-ellipsis-lastline;
  100. overflow: hidden;
  101. text-overflow: ellipsis;
  102. display: -webkit-box;
  103. -webkit-box-orient: vertical;
  104. word-wrap: break-word;
  105. word-break: break-all;
  106. }
  107. .item-time {
  108. display: flex;
  109. align-items: center;
  110. justify-content: space-between;
  111. color: #acacac;
  112. font-size: 24rpx;
  113. line-height: 28rpx;
  114. .item-examine {
  115. display: flex;
  116. align-items: center;
  117. image {
  118. width: 30rpx;
  119. height: 24rpx;
  120. margin: 0 10rpx 0 15rpx;
  121. }
  122. }
  123. }
  124. }
  125. </style>