summaryChart.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <template>
  2. <view :class="['result-data-search-summary', 'content-padding']">
  3. <view class="report-ul">
  4. <view class="report-item" v-for="(report, index) in resultList" :key="index" v-if="index % 2 === 0" @click="goDetail(report)">
  5. <view class="item-content-img" v-if="report.BodyHtml">
  6. <image :src="report.BodyHtml" mode=""></image>
  7. </view>
  8. <view class="item-content" v-else><u-parse :html="report.Body[0] + '...'"></u-parse></view>
  9. <view class="line"></view>
  10. <view :class="['item-title', report.Source != 1 && 'chart-title text_twoLine']"><u-parse :html="report.Title"></u-parse></view>
  11. <text class="item-createtime" v-if="report.Source == 1">{{ report.PublishDate }}</text>
  12. <view class="item-createtime chart-tag" v-else>
  13. <text class="tag-item" v-if="report.PtagName">{{ report.PtagName }}</text>
  14. <text class="tag-item" v-if="report.CtagName">{{ report.CtagName }}</text>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="report-ul">
  19. <view class="report-item" v-for="(report, index) in resultList" :key="index" v-if="index % 2 !== 0" @click="goDetail(report)">
  20. <view class="item-content-img" v-if="report.BodyHtml">
  21. <image :src="report.BodyHtml" mode=""></image>
  22. </view>
  23. <view class="item-content" v-else><u-parse :html="report.Body[0] + '...'"></u-parse></view>
  24. <view class="line"></view>
  25. <view :class="['item-title', report.Source != 1 && 'chart-title text_twoLine']"><u-parse :html="report.Title"></u-parse></view>
  26. <text class="item-createtime" v-if="report.Source == 1">{{ report.PublishDate }}</text>
  27. <view class="item-createtime chart-tag" v-else>
  28. <text class="tag-item" v-if="report.PtagName">{{ report.PtagName }}</text>
  29. <text class="tag-item" v-if="report.CtagName">{{ report.CtagName }}</text>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. props: {
  38. resultList: {
  39. type: Array,
  40. default: [],
  41. },
  42. tabsActiveChild: {
  43. type: Number,
  44. },
  45. },
  46. data() {
  47. return {
  48. };
  49. },
  50. methods: {
  51. /* 进入详情 校验是否有该品种权限 */
  52. goDetail(item) {
  53. if (item.Source == 2) {
  54. /* 无需授权且已绑定 检验是或否有权限 */
  55. this.$store.dispatch("checkHandle", "/pages-my/chartPage/chartPage?id=" + item.ChartId);
  56. } else {
  57. /* 无需授权且已绑定 检验是或否有权限 */
  58. this.$store.dispatch("checkHandle", "/pages-my/reportDetail/reportDetail?id=" + item.ArticleId);
  59. }
  60. },
  61. },
  62. };
  63. </script>
  64. <style lang="scss">
  65. .result-data-search-summary {
  66. padding: 0rpx 34rpx;
  67. display: flex;
  68. background-color: #f5f6fa;
  69. .report-ul {
  70. width: 50%;
  71. &:first-child {
  72. margin-right: 10rpx;
  73. }
  74. .report-item {
  75. padding: 20rpx 20rpx 24rpx 20rpx;
  76. margin-bottom: 20rpx;
  77. border-radius: 8rpx;
  78. box-shadow: 0 3rpx 6rpx rgba($color: #000000, $alpha: 0.16);
  79. background: #fff;
  80. .item-content {
  81. font-size: 24rpx;
  82. line-height: 40rpx;
  83. color: #7f7f7f;
  84. display: -webkit-box;
  85. word-break: break-all;
  86. text {
  87. display: inline !important;
  88. }
  89. }
  90. .line {
  91. margin: 18rpx 0;
  92. content: "";
  93. width: 100%;
  94. height: 1px;
  95. padding: 0 32rpx;
  96. box-sizing: border-box;
  97. background-color: #e5e5e5;
  98. -webkit-transform: scale(1, 0.5);
  99. transform: scale(1, 0.5);
  100. -webkit-transform-origin: center bottom;
  101. transform-origin: center bottom;
  102. }
  103. .item-title {
  104. font-size: 28rpx;
  105. color: #4a4a4a;
  106. margin-bottom: 10rpx;
  107. position: relative;
  108. text-indent: 0.5em;
  109. &::before {
  110. content: "";
  111. position: absolute;
  112. top: 5rpx;
  113. left: 0;
  114. width: 6rpx;
  115. height: 31rpx;
  116. background-color: #3385ff;
  117. }
  118. text {
  119. display: inline;
  120. }
  121. }
  122. .chart-title {
  123. height: 72rpx;
  124. padding-bottom: 10rpx;
  125. text-indent: 0em;
  126. &::before {
  127. display: none;
  128. }
  129. }
  130. .item-abstract {
  131. font-size: 26rpx;
  132. color: #6a6a6a;
  133. margin-bottom: 10rpx;
  134. .report_ico {
  135. width: 32rpx;
  136. height: 26rpx;
  137. margin-right: 20rpx;
  138. display: inline-block;
  139. }
  140. }
  141. .item-createtime {
  142. color: #acacac;
  143. font-size: 24rpx;
  144. }
  145. }
  146. }
  147. .chart-tag {
  148. display: flex;
  149. align-items: center;
  150. justify-content: space-between;
  151. padding-top: 1rpx;
  152. height: 36rpx;
  153. .tag-item {
  154. width: 148rpx;
  155. border-radius: 28rpx;
  156. border: 2rpx solid rgba(49, 137, 255, 1);
  157. overflow: hidden;
  158. color: #3385ff;
  159. text-align: center;
  160. line-height: 32rpx;
  161. }
  162. }
  163. .item-content-img {
  164. display: flex;
  165. align-items: center;
  166. width: 330rpx;
  167. margin-left: -15rpx;
  168. margin-bottom: -20rpx;
  169. image {
  170. width: 100%;
  171. height: 262rpx;
  172. vertical-align: middle;
  173. }
  174. }
  175. }
  176. .content-padding {
  177. padding-top: 90rpx !important;
  178. }
  179. </style>