report.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. <template>
  2. <view class="container-report-page">
  3. <view class="content-list">
  4. <block v-if="reportPageData.ListHzResource.length">
  5. <view class="resource">
  6. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/zybico.jpg"></image>
  7. <text>弘则资源包</text>
  8. </view>
  9. <text style="height: 1rpx; background: #ececec"></text>
  10. <view class="list-ui" v-for="item in reportPageData.ListHzResource" :key="item.IndustrialManagementId" @click="themeDetails(item)">
  11. <view class="item-title">
  12. <text>
  13. {{ item.IndustryName }}
  14. </text>
  15. <view class="publish">
  16. {{ item.PublishDate }}更新
  17. <u-icon name="arrow-right" color="#BDBDBD" size="34"></u-icon>
  18. </view>
  19. </view>
  20. <view class="read-more" v-if="item.IndustrialSubjectList">
  21. <text class="text-box text_oneLine" v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId">
  22. {{ val.SubjectName }}
  23. </text>
  24. </view>
  25. </view>
  26. </block>
  27. <block v-if="reportPageData.ListYxResource.length">
  28. <view class="resource">
  29. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/zybico.jpg"></image>
  30. <text>买方研选主题</text>
  31. </view>
  32. <text style="height: 1rpx; background: #ececec"></text>
  33. <view class="list-ui" v-for="item in reportPageData.ListYxResource" :key="item.IndustrialManagementId" @click="themeDetails(item)">
  34. <view class="item-title">
  35. <text>
  36. {{ item.IndustryName }}
  37. </text>
  38. <view class="publish">
  39. {{ item.PublishDate }}更新
  40. <u-icon name="arrow-right" color="#BDBDBD" size="34"></u-icon>
  41. </view>
  42. </view>
  43. <view class="read-more" @click="themeDetails(item)" v-if="item.IndustrialSubjectList">
  44. <text class="text-box text_oneLine" v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId">
  45. {{ val.SubjectName }}
  46. </text>
  47. </view>
  48. </view>
  49. </block>
  50. </view>
  51. <view class="content-report">
  52. <block v-if="reportPageData.ListYxReport.length">
  53. <view class="resource">
  54. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/report_Yx.png"></image>
  55. <text>买方研选报告</text>
  56. </view>
  57. <text style="height: 1rpx; background: #ececec"></text>
  58. <view class="content-item" v-for="item in reportPageData.ListYxReport" :key="item.ArticleId">
  59. <view class="item-user">
  60. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/user_report.png"></image>
  61. <text> {{ item.NickName }}</text>
  62. </view>
  63. <view class="item-title">
  64. <text style="display: inline" @click="goDetailReport(item)">
  65. {{ item.Title }}
  66. </text>
  67. <text class="item-industry" v-if="item.IndustryName" @click="themeDetails(item)">&nbsp;&nbsp;&nbsp;#{{ item.IndustryName }}</text>
  68. </view>
  69. <view class="item-more">
  70. <text>{{ item.PublishDate }}</text>
  71. <view class="pv-ollect">
  72. <view>
  73. <image class="pv" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png"></image>
  74. {{ item.Pv }}
  75. </view>
  76. <view @click="collectClick(item)">
  77. <image v-if="item.IsCollect" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_act.png"></image>
  78. <image v-else src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_ico.png"></image>
  79. {{ item.CollectNum }}人收藏
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. </block>
  85. <block v-if="reportPageData.ListHzReport.length">
  86. <view class="resource">
  87. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/report_Hz.png"></image>
  88. <text>弘则报告</text>
  89. </view>
  90. <text style="height: 1rpx; background: #ececec"></text>
  91. <view class="content-item" v-for="item in reportPageData.ListHzReport" :key="item.ArticleId">
  92. <view class="item-title">
  93. <text style="display: inline" @click="goDetailReport(item)">
  94. {{ item.Title }}
  95. </text>
  96. <text class="item-industry" @click="themeDetails(item)" v-if="item.IndustryName">&nbsp;&nbsp;&nbsp;#{{ item.IndustryName }}</text>
  97. </view>
  98. <view class="item-more">
  99. <text>{{ item.PublishDate }}</text>
  100. </view>
  101. </view>
  102. </block>
  103. </view>
  104. <u-modal
  105. v-model="goFollowShow"
  106. :content-style="{ fontSize: '32rpx' }"
  107. @confirm="goFollowShowBtn"
  108. :show-cancel-button="isCancelBtn"
  109. :confirm-text="confirmText"
  110. @cancel="isCancelBtn = false"
  111. :show-title="false"
  112. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  113. :confirm-style="{ fontWeight: '700' }"
  114. >
  115. <view class="slot-content">
  116. <rich-text :nodes="accounts"></rich-text>
  117. </view>
  118. </u-modal>
  119. </view>
  120. </template>
  121. <script>
  122. import {Report } from "@/config/api"
  123. export default {
  124. components: {},
  125. props: {
  126. reportPageData: {
  127. type: Object,
  128. },
  129. },
  130. data() {
  131. return {
  132. goFollowShow: false,
  133. confirmText: "知道了",
  134. isCancelBtn: false,
  135. accounts: "",
  136. };
  137. },
  138. watch: {},
  139. methods: {
  140. //去往文章详情页面
  141. goDetailReport(item) {
  142. this.$store.dispatch("checkHandle", "/pages-my/reportDetail/reportDetail?id=" + item.ArticleId);
  143. },
  144. /* 进入详情 校验是否有该品种权限 */
  145. goDetail(item) {
  146. uni.navigateTo({
  147. url: "/pages-report/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId,
  148. });
  149. },
  150. //去往主题详情
  151. themeDetails(item) {
  152. if (item.Source === 1) {
  153. //非严选
  154. this.$store.dispatch("checkHandle", "/pages-report/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId);
  155. } else {
  156. //严选
  157. this.$store.dispatch("checkHandle", "/pages-report/researchTheme/researchTheme?id=" + item.IndustrialManagementId);
  158. }
  159. },
  160. //收藏
  161. async collectClick(item) {
  162. const res = await Report.collectRpt({ ArticleId: item.ArticleId });
  163. if (res.Ret === 200) {
  164. item.IsCollect = !item.IsCollect;
  165. item.IsCollect
  166. ? (item.CollectNum += 1) &&
  167. uni.showToast({
  168. title: "收藏成功",
  169. icon: "none",
  170. duration: 2000,
  171. })
  172. : (item.CollectNum -= 1);
  173. !item.IsCollect &&
  174. uni.showToast({
  175. title: "已取消收藏",
  176. icon: "none",
  177. duration: 2000,
  178. });
  179. }
  180. },
  181. //点击了去关注
  182. goFollowShowBtn() {
  183. if (this.confirmText == "去关注") {
  184. uni.navigateTo({
  185. url: "/pages-activity/accountsOfficial/accountsOfficial",
  186. });
  187. }
  188. this.goFollowShow = false;
  189. },
  190. },
  191. };
  192. </script>
  193. <style scoped lang="scss">
  194. .container-report-page {
  195. background-color: #f5f6fa;
  196. .content-list {
  197. .list-ui {
  198. background-color: #fff;
  199. margin-top: 2rpx;
  200. }
  201. .item-title {
  202. display: flex;
  203. align-items: center;
  204. justify-content: space-between;
  205. height: 100rpx;
  206. border-bottom: 1px solid #f6f6f6;
  207. padding: 0 30rpx;
  208. background-color: #fff;
  209. .publish {
  210. display: flex;
  211. align-items: center;
  212. color: #999999;
  213. font-style: 26rpx;
  214. }
  215. }
  216. .read-more {
  217. margin-top: 20rpx;
  218. display: flex;
  219. flex-wrap: wrap;
  220. margin-left: 30rpx;
  221. .text-box {
  222. margin-bottom: 27rpx;
  223. margin-right: 15rpx;
  224. padding: 0;
  225. font-size: 24rpx;
  226. color: #408fff;
  227. width: 216rpx;
  228. height: 46rpx;
  229. line-height: 46rpx;
  230. text-align: center !important;
  231. background: url(~@/static/img/report_bg.png) no-repeat;
  232. background-size: 100% 100%;
  233. text-indent: 0em;
  234. }
  235. }
  236. }
  237. .resource {
  238. padding: 0 30rpx;
  239. background-color: #fff;
  240. margin-top: 4rpx;
  241. height: 91rpx;
  242. width: 100%;
  243. display: flex;
  244. align-items: center;
  245. justify-content: center;
  246. color: #333333;
  247. font-size: 30rpx;
  248. margin-top: 20rpx;
  249. image {
  250. width: 34rpx;
  251. height: 36rpx;
  252. margin-right: 10rpx;
  253. }
  254. }
  255. .content-report {
  256. .content-item {
  257. background-color: #fff;
  258. padding: 35rpx 20rpx 0;
  259. .item-title {
  260. font-weight: 500;
  261. .item-industry {
  262. margin-left: 10rpx;
  263. color: #3385ff;
  264. display: inline-block;
  265. }
  266. }
  267. .item-user {
  268. display: flex;
  269. align-items: center;
  270. color: #999999;
  271. font-size: 28rpx;
  272. margin-bottom: 20rpx;
  273. image {
  274. width: 23rpx;
  275. height: 26rpx;
  276. margin-right: 20rpx;
  277. }
  278. }
  279. .item-more {
  280. display: flex;
  281. justify-content: space-between;
  282. color: #cecece;
  283. margin: 20rpx 0 0;
  284. padding-bottom: 30rpx;
  285. border-bottom: 1rpx solid #ececec;
  286. .pv-ollect {
  287. display: flex;
  288. align-items: center;
  289. width: 40%;
  290. justify-content: space-between;
  291. image {
  292. width: 22rpx;
  293. height: 21rpx;
  294. margin-right: 10rpx;
  295. }
  296. .pv {
  297. height: 16rpx;
  298. }
  299. }
  300. }
  301. }
  302. }
  303. }
  304. </style>