industrialsource.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. width: 185rpx;
  80. height: 42rpx;
  81. border-radius: 39rpx;
  82. margin-bottom: 30rpx;
  83. margin-right: 30rpx;
  84. text-align: center;
  85. line-height: 39rpx;
  86. background: url(~@/static/img/report_bg.png) no-repeat;
  87. background-size: 100% 100%;
  88. text-indent: 0em;
  89. }
  90. }
  91. .text-Line {
  92. text-overflow: -o-ellipsis-lastline;
  93. overflow: hidden;
  94. text-overflow: ellipsis;
  95. display: -webkit-box;
  96. -webkit-box-orient: vertical;
  97. word-wrap: break-word;
  98. word-break: break-all;
  99. }
  100. .item-time {
  101. display: flex;
  102. align-items: center;
  103. justify-content: space-between;
  104. color: #acacac;
  105. font-size: 24rpx;
  106. line-height: 28rpx;
  107. }
  108. }
  109. </style>