report.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  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.Resource == 3) {
  198. uni.navigateTo({ url: "/pages-ficc/reportDetail/reportDetail?id=" + item.ReportId });
  199. return;
  200. }
  201. if (item.SpecialType > 0) {
  202. uni.navigateTo({ url: "/pages-purchaser/noteAndViewpoint/noteAndViewpoint?id=" + item.ArticleId });
  203. return;
  204. }
  205. uni.navigateTo({ url: "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId });
  206. },
  207. /* 进入详情 校验是否有该品种权限 */
  208. goDetail(item) {
  209. uni.navigateTo({
  210. url: "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId,
  211. });
  212. },
  213. //去往主题详情
  214. themeDetails(item, val) {
  215. if (item.SpecialType > 0) return;
  216. let id = item.IndustrialManagementId > 0 ? item.IndustrialManagementId : val.IndustrialManagementId;
  217. if (item.Source === 1) {
  218. //非严选
  219. uni.navigateTo({ url: "/reportPages/IndustryReport/IndustryReport?id=" + id });
  220. } else {
  221. //严选
  222. uni.navigateTo({ url: "/reportPages/researchTheme/researchTheme?id=" + id });
  223. }
  224. },
  225. //收藏
  226. async collectClick(item, type) {
  227. // if () {
  228. // uni.navigateTo({ url: "/pages-purchaser/noteAndViewpoint/noteAndViewpoint?id=" + item.ArticleId });
  229. // return;
  230. // }
  231. const res =
  232. item.SpecialType > 0
  233. ? await purchaserApi.yanxuanSpecialCollect({
  234. Id: item.ArticleId,
  235. Status: item.IsCollect ? 2 : 1,
  236. })
  237. : await Report.collectRpt({ ArticleId: item.ArticleId, PageRouter: this.$store.state.pageRouterReport });
  238. if (res.Ret === 200) {
  239. this.$parent.reportPageData[type].forEach((_) => {
  240. if (item.ArticleId === _.ArticleId) {
  241. _.IsCollect = !_.IsCollect;
  242. _.IsCollect
  243. ? (_.CollectNum += 1) &&
  244. uni.showToast({
  245. title: "收藏成功",
  246. icon: "none",
  247. duration: 2000,
  248. })
  249. : (_.CollectNum -= 1);
  250. !_.IsCollect &&
  251. uni.showToast({
  252. title: "已取消收藏",
  253. icon: "none",
  254. duration: 2000,
  255. });
  256. }
  257. });
  258. }
  259. },
  260. //点击关注的图标
  261. reportFllow(id, type) {
  262. if (!this.$store.state.isAuth && !this.$store.state.isBind) {
  263. Reports.reportFllow({
  264. IndustrialManagementId: id,
  265. PageRouter: "搜索关注",
  266. }).then((res) => {
  267. if (res.Ret === 200) {
  268. if (res.Data.Status == 1) {
  269. this.goFollowShow = true;
  270. this.confirmText = res.Data.GoFollow ? "去关注" : "知道了";
  271. if (res.Data.GoFollow) {
  272. this.accounts = `产业关注成功 <br> 想要及时获取该产业内容的更新推送,请关注【查研观向小助手】公众号`;
  273. this.isCancelBtn = true;
  274. } else {
  275. this.accounts = "产业关注成功<br>请关注【查研观向小助手】公众号,及时获取产业报告更新提醒";
  276. }
  277. }
  278. this.$emit("updateFllow", id, type);
  279. }
  280. });
  281. } else if (this.$store.state.isAuth) {
  282. //未授权
  283. uni.navigateTo({
  284. url: "/pageMy/authGuide/authGuide",
  285. });
  286. } else if (!this.$store.state.isAuth && this.$store.state.isBind) {
  287. //已授权未绑定
  288. uni.navigateTo({
  289. url: "/pageMy/login/login",
  290. });
  291. }
  292. },
  293. //点击了去关注
  294. goFollowShowBtn() {
  295. if (this.confirmText == "去关注") {
  296. uni.navigateTo({
  297. url: "/activityPages/accountsOfficial/accountsOfficial",
  298. });
  299. }
  300. this.goFollowShow = false;
  301. },
  302. // 播放权限判断
  303. async handelVideoPlay(item) {
  304. await this.$store.dispatch("showLoginModal");
  305. if (item.AuthInfo.HasPermission == 1) {
  306. this.playVideo(item);
  307. } else {
  308. this.hasPermission = item.AuthInfo.HasPermission;
  309. this.jurisdictionList.ActivityId = item.IndustryVideo.Id;
  310. // 产业视频
  311. this.jurisdictionList.isAudioVideo = 3;
  312. if (this.hasPermission == 2) {
  313. this.jurisdictionList.SellerMobile = item.AuthInfo.SellerMobile;
  314. this.jurisdictionList.SellerName = item.AuthInfo.SellerName;
  315. this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
  316. this.isShowhasPermission = true;
  317. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  318. this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
  319. this.applyForIsShow = true;
  320. }
  321. }
  322. },
  323. playVideo(item) {
  324. let params = {
  325. Id: item.IndustryVideo.Id,
  326. ResourceUrl: item.IndustryVideo.ResourceUrl,
  327. BackgroundImg: item.IndustryVideo.BackgroundImg,
  328. Title: `5min【${item.IndustryName}】逻辑解析`,
  329. };
  330. if (this.$store.state.videoPlay.playVideoId != item.Id) {
  331. this.$store.commit("videoPlay/palyTimeUpdate", 0);
  332. this.$store.commit("videoPlay/playVideo", item.Id);
  333. }
  334. this.globalBgAudioManager.stop();
  335. this.videoPopList = params;
  336. this.showVideoPop = true;
  337. },
  338. },
  339. };
  340. </script>
  341. <style scoped lang="scss">
  342. .container-report-page {
  343. background-color: $uni-bg-color;
  344. padding: 0 24rpx;
  345. .content-list {
  346. .list-ui {
  347. background-color: #fff;
  348. margin-top: 2rpx;
  349. margin-bottom: 20rpx;
  350. }
  351. .item-title {
  352. display: flex;
  353. align-items: center;
  354. justify-content: space-between;
  355. height: 100rpx;
  356. border-bottom: 1px solid #f6f6f6;
  357. padding: 0 30rpx;
  358. background-color: #fff;
  359. image {
  360. margin-left: 10rpx;
  361. width: 60rpx;
  362. height: 30rpx;
  363. }
  364. }
  365. .read-more {
  366. display: flex;
  367. flex-wrap: wrap;
  368. .industry-video-item {
  369. height: 106rpx;
  370. width: 150rpx;
  371. margin: 0 10rpx 10rpx 0;
  372. border-radius: 8rpx;
  373. background-size: cover;
  374. background-position: center;
  375. background-repeat: no-repeat;
  376. font-weight: 500;
  377. font-size: 24rpx;
  378. color: white;
  379. line-height: 45rpx;
  380. padding: 20rpx;
  381. position: relative;
  382. overflow: hidden;
  383. .industry-video-icon {
  384. height: 0rpx;
  385. width: 0rpx;
  386. border-style: solid;
  387. border-color: #376cbb #376cbb transparent transparent;
  388. border-width: 28rpx;
  389. position: absolute;
  390. right: 0;
  391. top: 0;
  392. image {
  393. position: absolute;
  394. right: -24rpx;
  395. bottom: 0;
  396. height: 20rpx;
  397. width: 20rpx;
  398. }
  399. }
  400. }
  401. .text-box {
  402. padding: 0;
  403. margin: 0 10rpx 10rpx 0;
  404. font-size: 24rpx;
  405. color: $uni-color-new;
  406. width: 150rpx;
  407. height: 48rpx;
  408. text-indent: 0em;
  409. line-height: 48rpx;
  410. text-align: center;
  411. background-color: #f8f8fa;
  412. border-radius: 200rpx;
  413. }
  414. }
  415. }
  416. .resource {
  417. display: flex;
  418. align-items: center;
  419. height: 66rpx;
  420. width: 100%;
  421. image {
  422. width: 34rpx;
  423. height: 36rpx;
  424. margin-right: 10rpx;
  425. }
  426. }
  427. .content-report {
  428. .content-item {
  429. background-color: #fff;
  430. padding: 20rpx;
  431. margin-bottom: 20rpx;
  432. border-top: 4rpx solid #376cbb;
  433. .item-title {
  434. font-weight: 500;
  435. position: relative;
  436. .item-industry {
  437. text-indent: 0;
  438. margin-right: 10rpx;
  439. color: #376cbb;
  440. display: inline-block;
  441. }
  442. }
  443. .item-user {
  444. display: flex;
  445. align-items: center;
  446. color: #999999;
  447. font-size: 24rpx;
  448. margin-bottom: 10rpx;
  449. margin-top: -10rpx;
  450. image {
  451. width: 24rpx;
  452. height: 24rpx;
  453. margin-right: 20rpx;
  454. }
  455. }
  456. .item-more {
  457. display: flex;
  458. justify-content: space-between;
  459. color: #cecece;
  460. margin-top: 20rpx;
  461. }
  462. }
  463. }
  464. .industry-content {
  465. display: flex;
  466. align-items: center;
  467. justify-content: space-between;
  468. margin-bottom: 15rpx;
  469. .industry-box-left {
  470. display: flex;
  471. align-items: center;
  472. .follw {
  473. color: #fff;
  474. border-radius: 4rpx;
  475. font-size: 24rpx;
  476. width: 110rpx;
  477. height: 42rpx;
  478. margin-right: 10rpx;
  479. background-color: $uni-color-new;
  480. }
  481. }
  482. .ndustry-box-tiem {
  483. font-size: 24rpx;
  484. color: #999;
  485. .read {
  486. width: 14rpx;
  487. height: 14rpx;
  488. background-color: #ff0000;
  489. border-radius: 50%;
  490. margin-right: 10rpx;
  491. }
  492. .ndustry-box-text {
  493. margin: 0 10rpx;
  494. }
  495. }
  496. }
  497. .follw-image {
  498. width: 32rpx;
  499. height: 32rpx;
  500. margin-right: 10rpx;
  501. }
  502. .title-content-box {
  503. display: flex;
  504. .tag {
  505. width: 126rpx;
  506. height: 42rpx;
  507. color: #928563;
  508. font-size: 24rpx;
  509. font-weight: 500;
  510. border-radius: 38rpx;
  511. background-color: #f2e8cc;
  512. flex-shrink: 0;
  513. margin-right: 10rpx;
  514. }
  515. }
  516. }
  517. </style>