report.vue 19 KB

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