industrialsource.vue 2.9 KB

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