industrialsource.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <view class="container-report-item global_card_content" @click="goDetail(list)">
  3. <view class="global_title" v-if="list.IndustryName">
  4. <mp-html :content="richTextClamp(3) + list.IndustryName + isSourceText(list) + '</div>'" />
  5. </view>
  6. <searchTimeLine v-if="list.ListTimeLine && list.ListTimeLine.length" :timeList="list.ListTimeLine" />
  7. <block v-else>
  8. <view class="item-lable">
  9. <view class="lable-list" v-for="item in list.IndustrialSubjectList" :key="item.IndustrialSubjectId">{{ item.SubjectName }}</view>
  10. </view>
  11. <view class="item-time">
  12. <text>{{ list.PublishDate }} &nbsp;&nbsp;更新</text>
  13. </view>
  14. </block>
  15. </view>
  16. </template>
  17. <script>
  18. import mpHtml from "@/uni_modules/mp-html/components/mp-html/mp-html.vue";
  19. import searchTimeLine from "./searchTimeLine.vue";
  20. export default {
  21. name: "",
  22. components: { mpHtml, searchTimeLine },
  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.Source == 2) {
  40. uni.navigateTo({ url: "/reportPages/researchTheme/researchTheme?id=" + item.IndustrialManagementId });
  41. return;
  42. }
  43. uni.navigateTo({ url: "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId });
  44. },
  45. isSourceText(list) {
  46. let str = list.Source == 1 ? "(弘则资源包)" : list.Source == 2 ? "(买方研选主题)" : "";
  47. return str;
  48. },
  49. richTextClamp(val) {
  50. return `<div style="${
  51. val == 7 ? "min-height: 50px;" : ""
  52. }line-clamp: ${val};-webkit-line-clamp: ${val};text-overflow: -o-ellipsis-lastline;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;word-wrap: break-word;word-break: break-all;">`;
  53. },
  54. },
  55. };
  56. </script>
  57. <style scoped lang="scss">
  58. .container-report-item {
  59. width: 100%;
  60. background: #ffffff;
  61. box-shadow: 0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16);
  62. border-radius: 8rpx;
  63. padding: 20rpx;
  64. margin-bottom: 20rpx;
  65. overflow: hidden;
  66. .item-title {
  67. position: relative;
  68. font-size: 32rpx;
  69. font-weight: 500;
  70. color: #333333;
  71. line-height: 38rpx;
  72. text-indent: 0.5em;
  73. }
  74. .item-lable {
  75. margin-top: 20rpx;
  76. height: 290rpx;
  77. display: flex;
  78. flex-direction: column;
  79. flex-wrap: wrap;
  80. overflow: hidden;
  81. overflow-x: auto;
  82. .lable-list {
  83. display: flex;
  84. align-items: center;
  85. justify-content: center;
  86. font-size: 24rpx;
  87. font-weight: 600;
  88. width: 185rpx;
  89. height: 42rpx;
  90. border-radius: 200rpx;
  91. margin-bottom: 30rpx;
  92. margin-right: 30rpx;
  93. background: #f8f8fa;
  94. color: $uni-color-new;
  95. }
  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. word-wrap: break-word;
  104. word-break: break-all;
  105. }
  106. .item-time {
  107. display: flex;
  108. align-items: center;
  109. justify-content: space-between;
  110. color: #acacac;
  111. font-size: 24rpx;
  112. line-height: 28rpx;
  113. }
  114. }
  115. </style>