report.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  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">
  21. <!-- <text class="text-box text_oneLine" v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId">
  22. {{ val.SubjectName }}
  23. </text> -->
  24. <view class="industry-video-item" @click.stop="handelVideoPlay(item)" :style="{ 'background-image': 'url(' + item.IndustryVideo.BackgroundImg + ')' }" v-if="item.IndustryVideo">
  25. 5min
  26. <br />
  27. 逻辑解析
  28. <view class="industry-video-icon">
  29. <image src="https://hzstatic.hzinsights.com/cygx/video-right-top-icon.svg"></image>
  30. </view>
  31. </view>
  32. <block v-if="item.IndustrialSubjectList">
  33. <view v-if="item.IndustryVideo" style="display: flex; flex-wrap: wrap; width: 420rpx">
  34. <view v-for="val in item.IndustrialSubjectList.slice(0, 4)" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  35. {{ val.SubjectName }}
  36. </view>
  37. </view>
  38. <block v-if="item.IndustryVideo && item.IndustrialSubjectList.length > 4">
  39. <view v-for="val in item.IndustrialSubjectList.slice(4)" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  40. {{ val.SubjectName }}
  41. </view>
  42. </block>
  43. <block v-if="!item.IndustryVideo">
  44. <view v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  45. {{ val.SubjectName }}
  46. </view>
  47. </block>
  48. </block>
  49. </view>
  50. </view>
  51. </block>
  52. <block v-if="reportPageData.ListYxResource.length">
  53. <view class="resource">
  54. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/zybico.jpg"></image>
  55. <text>买方研选主题</text>
  56. </view>
  57. <text style="height: 1rpx; background: #ececec"></text>
  58. <view class="list-ui" v-for="item in reportPageData.ListYxResource" :key="item.IndustrialManagementId" @click="themeDetails(item)">
  59. <view class="item-title">
  60. <text>
  61. {{ item.IndustryName }}
  62. </text>
  63. <view class="publish">
  64. {{ item.PublishDate }}更新
  65. <u-icon name="arrow-right" color="#BDBDBD" size="34"></u-icon>
  66. </view>
  67. </view>
  68. <view class="read-more" v-if="item.IndustrialSubjectList">
  69. <text class="text-box text_oneLine" v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId">
  70. {{ val.SubjectName }}
  71. </text>
  72. <!-- <view class="industry-video-item" @click.stop="handelVideoPlay(item)"
  73. :style="{'background-image':'url('+item.IndustryVideo.BackgroundImg+ ')'}" v-if="item.IndustryVideo">
  74. 5min
  75. <br />
  76. 逻辑解析
  77. <view class="industry-video-icon">
  78. <image src="https://hzstatic.hzinsights.com/cygx/video-right-top-icon.svg"></image>
  79. </view>
  80. </view>
  81. <view v-if="item.IndustryVideo" style="display: flex;flex-wrap: wrap;width: 420rpx;">
  82. <view v-for="val in item.IndustrialSubjectList.slice(0,4)" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  83. {{ val.SubjectName }}
  84. </view>
  85. </view>
  86. <block v-if="item.IndustryVideo && item.IndustrialSubjectList.length>4">
  87. <view v-for="val in item.IndustrialSubjectList.slice(4)" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  88. {{ val.SubjectName }}
  89. </view>
  90. </block>
  91. <block v-if="!item.IndustryVideo">
  92. <view v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  93. {{ val.SubjectName }}
  94. </view>
  95. </block> -->
  96. </view>
  97. </view>
  98. </block>
  99. </view>
  100. <view class="content-report">
  101. <block v-if="reportPageData.ListYxReport.length">
  102. <view class="resource">
  103. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/report_Yx.png"></image>
  104. <text>买方研选报告</text>
  105. </view>
  106. <text style="height: 1rpx; background: #ececec"></text>
  107. <view class="content-item" v-for="item in reportPageData.ListYxReport" :key="item.ArticleId">
  108. <view class="item-user">
  109. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/user_report.png"></image>
  110. <text> {{ item.NickName }}</text>
  111. </view>
  112. <view class="item-title">
  113. <text style="display: inline; margin-right: 10rpx" @click="goDetailReport(item)">{{ item.Title }} </text>
  114. <text class="item-industry" v-for="key in item.List" :key="key.IndustrialManagementId" @click="themeDetails(key)">#{{ key.IndustryName }}&nbsp;&nbsp;&nbsp;</text>
  115. </view>
  116. <view class="item-more">
  117. <text>{{ item.PublishDate }}</text>
  118. <view class="pv-ollect">
  119. <view>
  120. <image class="pv" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png"></image>
  121. {{ item.Pv }}
  122. </view>
  123. <view @click="collectClick(item)">
  124. <image v-if="item.IsCollect" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_act.png"></image>
  125. <image v-else src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_ico.png"></image>
  126. {{ item.CollectNum }}人收藏
  127. </view>
  128. </view>
  129. </view>
  130. </view>
  131. </block>
  132. <block v-if="reportPageData.ListHzReport.length">
  133. <view class="resource">
  134. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/report_Hz.png"></image>
  135. <text>弘则报告</text>
  136. </view>
  137. <text style="height: 1rpx; background: #ececec"></text>
  138. <view class="content-item" v-for="item in reportPageData.ListHzReport" :key="item.ArticleId">
  139. <view class="item-title">
  140. <text style="display: inline; margin-right: 10rpx" @click="goDetailReport(item)"> {{ item.Title }} </text>
  141. <text class="item-industry" v-for="key in item.List" :key="key.IndustrialManagementId" @click="themeDetails(key)">#{{ key.IndustryName }}&nbsp;&nbsp;&nbsp;</text>
  142. </view>
  143. <view class="item-more">
  144. <text>{{ item.PublishDate }}</text>
  145. </view>
  146. </view>
  147. </block>
  148. </view>
  149. <u-modal
  150. v-model="goFollowShow"
  151. :content-style="{ fontSize: '32rpx' }"
  152. @confirm="goFollowShowBtn"
  153. :show-cancel-button="isCancelBtn"
  154. :confirm-text="confirmText"
  155. @cancel="isCancelBtn = false"
  156. :show-title="false"
  157. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  158. :confirm-style="{ fontWeight: '700' }"
  159. >
  160. <view class="slot-content">
  161. <rich-text :nodes="accounts"></rich-text>
  162. </view>
  163. </u-modal>
  164. <!-- 视频模块 -->
  165. <videoModule :showVideoPop="showVideoPop" :videoPopList="videoPopList" class="industry-video-module" />
  166. <!-- 权限弹窗 -->
  167. <modalDialog :isShowhasPermission="isShowhasPermission" :applyForIsShow="applyForIsShow" :jurisdictionList="jurisdictionList" :hasPermission="hasPermission" />
  168. </view>
  169. </template>
  170. <script>
  171. import { Report } from "@/config/api";
  172. import videoModule from "@/components/videoModule/index";
  173. import modalDialog from "@/components/modalDialog.vue";
  174. export default {
  175. components: { videoModule, modalDialog },
  176. props: {
  177. reportPageData: {
  178. type: Object,
  179. },
  180. },
  181. data() {
  182. return {
  183. goFollowShow: false,
  184. confirmText: "知道了",
  185. isCancelBtn: false,
  186. accounts: "",
  187. showVideoPop: false, //视频弹窗显示控制
  188. videoPopList: {}, // 视频信息
  189. isShowhasPermission: false, // 联系销售的提交申请
  190. applyForIsShow: false, // 提交申请
  191. jurisdictionList: {},
  192. hasPermission: "", //权限
  193. };
  194. },
  195. watch: {},
  196. methods: {
  197. //去往文章详情页面
  198. goDetailReport(item) {
  199. this.$store.dispatch("checkHandle", "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId);
  200. },
  201. /* 进入详情 校验是否有该品种权限 */
  202. goDetail(item) {
  203. uni.navigateTo({
  204. url: "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId,
  205. });
  206. },
  207. //去往主题详情
  208. themeDetails(item) {
  209. if (item.Source === 1) {
  210. //非严选
  211. this.$store.dispatch("checkHandle", "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId);
  212. } else {
  213. //严选
  214. this.$store.dispatch("checkHandle", "/reportPages/researchTheme/researchTheme?id=" + item.IndustrialManagementId);
  215. }
  216. },
  217. //收藏
  218. async collectClick(item) {
  219. const res = await Report.collectRpt({ ArticleId: item.ArticleId });
  220. if (res.Ret === 200) {
  221. item.IsCollect = !item.IsCollect;
  222. item.IsCollect
  223. ? (item.CollectNum += 1) &&
  224. uni.showToast({
  225. title: "收藏成功",
  226. icon: "none",
  227. duration: 2000,
  228. })
  229. : (item.CollectNum -= 1);
  230. !item.IsCollect &&
  231. uni.showToast({
  232. title: "已取消收藏",
  233. icon: "none",
  234. duration: 2000,
  235. });
  236. }
  237. },
  238. //点击了去关注
  239. goFollowShowBtn() {
  240. if (this.confirmText == "去关注") {
  241. uni.navigateTo({
  242. url: "/activityPages/accountsOfficial/accountsOfficial",
  243. });
  244. }
  245. this.goFollowShow = false;
  246. },
  247. // 播放权限判断
  248. handelVideoPlay(item) {
  249. if (!this.$store.state.isAuth && !this.$store.state.isBind) {
  250. if (item.AuthInfo.HasPermission == 1) {
  251. this.playVideo(item);
  252. } else {
  253. this.hasPermission = item.AuthInfo.HasPermission;
  254. this.jurisdictionList.ActivityId = item.IndustryVideo.Id;
  255. // 产业视频
  256. this.jurisdictionList.isAudioVideo = 3;
  257. if (this.hasPermission == 2) {
  258. this.jurisdictionList.SellerMobile = item.AuthInfo.SellerMobile;
  259. this.jurisdictionList.SellerName = item.AuthInfo.SellerName;
  260. this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
  261. this.isShowhasPermission = true;
  262. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  263. this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
  264. this.applyForIsShow = true;
  265. }
  266. }
  267. } else {
  268. this.$store.dispatch("checkHandle");
  269. }
  270. },
  271. playVideo(item) {
  272. let params = {
  273. Id: item.IndustryVideo.Id,
  274. ResourceUrl: item.IndustryVideo.ResourceUrl,
  275. BackgroundImg: item.IndustryVideo.BackgroundImg,
  276. Title: `5min【${item.IndustryName}】逻辑解析`,
  277. };
  278. if (this.$store.state.videoPlay.playVideoId != item.Id) {
  279. this.$store.commit("videoPlay/palyTimeUpdate", 0);
  280. this.$store.commit("videoPlay/playVideo", item.Id);
  281. }
  282. this.globalBgAudioManager.stop();
  283. this.videoPopList = params;
  284. this.showVideoPop = true;
  285. },
  286. },
  287. };
  288. </script>
  289. <style scoped lang="scss">
  290. .container-report-page {
  291. background-color: #f5f6fa;
  292. .content-list {
  293. .list-ui {
  294. background-color: #fff;
  295. margin-top: 2rpx;
  296. }
  297. .item-title {
  298. display: flex;
  299. align-items: center;
  300. justify-content: space-between;
  301. height: 100rpx;
  302. border-bottom: 1px solid #f6f6f6;
  303. padding: 0 30rpx;
  304. background-color: #fff;
  305. .publish {
  306. display: flex;
  307. align-items: center;
  308. color: #999999;
  309. font-style: 26rpx;
  310. }
  311. }
  312. .read-more {
  313. margin-top: 20rpx;
  314. display: flex;
  315. flex-wrap: wrap;
  316. margin-left: 80rpx;
  317. .industry-video-item {
  318. height: 126rpx;
  319. width: 170rpx;
  320. // width: 216rpx;
  321. margin: 0 40rpx 30rpx 0;
  322. // margin: 0 15rpx 30rpx 0;
  323. border-radius: 8rpx;
  324. background-size: cover;
  325. background-position: center;
  326. background-repeat: no-repeat;
  327. font-weight: 500;
  328. font-size: 32rpx;
  329. color: white;
  330. line-height: 45rpx;
  331. padding: 20rpx;
  332. position: relative;
  333. overflow: hidden;
  334. .industry-video-icon {
  335. height: 0rpx;
  336. width: 0rpx;
  337. border-style: solid;
  338. border-color: #3385ff #3385ff transparent transparent;
  339. border-width: 28rpx;
  340. position: absolute;
  341. right: 0;
  342. top: 0;
  343. image {
  344. position: absolute;
  345. right: -24rpx;
  346. bottom: 0;
  347. height: 20rpx;
  348. width: 20rpx;
  349. }
  350. }
  351. }
  352. .text-box {
  353. margin-bottom: 30rpx;
  354. margin-right: 40rpx;
  355. padding: 0;
  356. font-size: 24rpx;
  357. color: #408fff;
  358. width: 170rpx;
  359. height: 46rpx;
  360. line-height: 46rpx;
  361. text-align: center !important;
  362. background: url(~@/static/img/report_bg.png) no-repeat;
  363. background-size: 100% 100%;
  364. text-indent: 0em;
  365. }
  366. }
  367. }
  368. .resource {
  369. padding: 0 30rpx;
  370. background-color: #fff;
  371. margin-top: 4rpx;
  372. height: 91rpx;
  373. width: 100%;
  374. display: flex;
  375. align-items: center;
  376. justify-content: center;
  377. color: #333333;
  378. font-size: 30rpx;
  379. margin-top: 20rpx;
  380. image {
  381. width: 34rpx;
  382. height: 36rpx;
  383. margin-right: 10rpx;
  384. }
  385. }
  386. .content-report {
  387. .content-item {
  388. background-color: #fff;
  389. padding: 35rpx 20rpx 0;
  390. .item-title {
  391. font-weight: 500;
  392. .item-industry {
  393. margin-right: 10rpx;
  394. color: #3385ff;
  395. display: inline-block;
  396. }
  397. }
  398. .item-user {
  399. display: flex;
  400. align-items: center;
  401. color: #999999;
  402. font-size: 28rpx;
  403. margin-bottom: 20rpx;
  404. image {
  405. width: 23rpx;
  406. height: 26rpx;
  407. margin-right: 20rpx;
  408. }
  409. }
  410. .item-more {
  411. display: flex;
  412. justify-content: space-between;
  413. color: #cecece;
  414. margin: 20rpx 0 0;
  415. padding-bottom: 30rpx;
  416. border-bottom: 1rpx solid #ececec;
  417. .pv-ollect {
  418. display: flex;
  419. align-items: center;
  420. width: 40%;
  421. justify-content: space-between;
  422. image {
  423. width: 22rpx;
  424. height: 21rpx;
  425. margin-right: 10rpx;
  426. }
  427. .pv {
  428. height: 16rpx;
  429. }
  430. }
  431. }
  432. }
  433. }
  434. }
  435. </style>