keyCompany.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. <template>
  2. <block>
  3. <block>
  4. <view id="keyconmpany" class="container content-conmpany" v-if="haveData">
  5. <block v-if="Object.keys(reportDetail).length > 0">
  6. <view class="report-content-title global_title">{{ reportDetail.Title }}</view>
  7. <view class="author-time">
  8. <text>{{ reportDetail.Department }}</text>
  9. <text>{{ reportDetail.PublishDate }}</text>
  10. </view>
  11. <view class="content-statement">
  12. <view style="display: flex"> <text>注:请务必阅读</text> <text class="statement" @click="isShowStatement = true">免责声明 </text>   </view>
  13. <text class="statement" @click="goSecret">往期汇总>> </text>
  14. </view>
  15. <view class="content-abstract">
  16. <text>产品说明:</text>
  17. <text>{{ reportDetail.ProductDescription }} </text>
  18. </view>
  19. <view class="macro-strategy">
  20. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/macro-strategy.png"></image>
  21. 宏观策略
  22. </view>
  23. <view class="description">
  24. <mp-html :content="strFontSize(reportDetail.MarketStrategy)" />
  25. <view class="detailed">
  26. <text>详细策略报告请</text>
  27. <text @click="reportDetailLink">点击查看</text>
  28. </view>
  29. </view>
  30. <block v-if="isUserBindingPhoneNumber">
  31. <view class="industry-ul">
  32. <view class="industry-li" v-for="(item, index) in dataListSubject" :key="index">
  33. <view class="industry-name">{{ item.PermissionName }}</view>
  34. <view :class="['industry-subject', item.ListSubject.length < 3 && 'industry-top-border']">
  35. <view
  36. :class="['subject-item', 'text_oneLine', item.ListSubject.length < 3 && 'subject-item-top-border']"
  37. @click="positionSubject(key)"
  38. v-for="key in item.ListSubject"
  39. :key="key.Md5String"
  40. >
  41. {{ key.SubjectName }}
  42. <image v-if="key.IsNew" class="icon_subject" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_subject.png"></image>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="content-ul">
  48. <view class="content-li" v-for="item in dataList" :key="item.PermissionName">
  49. <view class="content-title">
  50. <image :src="item.IcoLink"></image>
  51. {{ item.PermissionName }}
  52. </view>
  53. <mp-html :content="strFontSize(item.BodyChartSummary)" />
  54. <view class="li-list">
  55. <view class="li-item" v-for="key in item.List" :key="key.IndustrialSubjectId">
  56. <view :id="'subject' + key.Md5String" class="li-subject">
  57. <view class="item-name">
  58. <text style="display: inline-block; vertical-align: middle; font-weight: 600">{{ key.ShowName }}</text>
  59. <image v-if="key.IsNew" src="https://hzstatic.hzinsights.com/cygx/icon/new_report.png"></image>
  60. </view>
  61. <text class="itel-label" v-for="val in key.CompanyLabel" :key="val"># {{ val }}</text>
  62. </view>
  63. <mp-html :content="strFontSize(key.Body)" />
  64. <view :style="{ 'margin-bottom': key.IsShowApplyButton ? '50rpx' : '120rpx' }" v-if="key.OverviewArticleId > 0 || key.List">
  65. <view class="subject-detali" v-if="key.OverviewArticleId > 0">
  66. <text style="display: inline-block">公司综述报告请</text>
  67. <text style="color: #376cbb; margin-left: 10rpx; display: inline-block" @click="goArticle(key.OverviewArticleId)">点击查看</text>
  68. </view>
  69. <view class="subject-detali" v-if="key.List">
  70. <text style="display: inline-block">相关调研纪要、深度报告请</text>
  71. <text style="color: #376cbb; margin-left: 10rpx; display: inline-block" @click="industry(key.List)">点击查看</text>
  72. </view>
  73. </view>
  74. <view v-if="key.IsShowApplyButton" class="item-application" @click="applicationHandel(key)"> 申请路演</view>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <view class="back-top" v-if="isShowBackTop" @click="goBackTop">
  80. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/back_top.png"></image>
  81. </view>
  82. <statement :show="isShowStatement" />
  83. <view class="select-box">
  84. <u-popup v-model="areacodeShow" mode="bottom" @close="cancel">
  85. <view class="box" style="color: #2c83ff" v-for="item in list" :key="item.IndustrialManagementId" @click="industryDetitle(item)"> {{ item.IndustryName }}</view>
  86. <view class="box box-bottom" style="color: #a9afb8" @click="cancel">取消</view>
  87. </u-popup>
  88. </view>
  89. </block>
  90. <view class="content-bottom" v-else>
  91. <view class="make-outbound" @click="pleaseGoLogin"> 请登录后报名 </view>
  92. </view>
  93. </block>
  94. </view>
  95. <view class="nodata" v-else>
  96. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/report_loading_icon.png" class="nodata_img"></image>
  97. <view class="nodata-tip">正在努力编辑中,请耐心等待...</view>
  98. </view>
  99. </block>
  100. <!-- <not-have-login v-else /> -->
  101. <Loading />
  102. </block>
  103. </template>
  104. <script>
  105. import { Reports, Mine } from "@/config/api.js";
  106. import statement from "@/reportPages/components/statement.vue";
  107. import { Throttle } from "@/config/util.js";
  108. import NotHaveLogin from "../../components/notHaveLogin.vue";
  109. export default {
  110. data() {
  111. return {
  112. list: [],
  113. dataList: [],
  114. dataListSubject: [],
  115. reportDetail: {},
  116. isShowBackTop: false,
  117. isShowStatement: false,
  118. areacodeShow: false,
  119. haveData: true,
  120. hasPermission: "",
  121. readTiem: 0,
  122. setIntervalTiem: null,
  123. };
  124. },
  125. components: { statement, NotHaveLogin },
  126. methods: {
  127. // 返回top
  128. goBackTop() {
  129. wx.pageScrollTo({
  130. selector: ".industry-ul",
  131. duration: 300,
  132. });
  133. },
  134. async reportSelectionDetail(option) {
  135. const res = await Reports.reportSelectionDetail({
  136. IsBestNew: option.id ? "" : true,
  137. ActivityId: Number(option.id) || 0,
  138. });
  139. if (res.Ret === 200) {
  140. this.hasPermission = res.Data.HasPermission;
  141. this.reportDetail = res.Data.Detail;
  142. this.haveData = this.reportDetail ? true : false;
  143. this.dataList = res.Data.List;
  144. this.dataListSubject = res.Data.ListPermissionSubject;
  145. } else {
  146. this.haveData = false;
  147. }
  148. },
  149. // 详细策略报告请
  150. reportDetailLink() {
  151. if (this.reportDetail.CeLueArticleId > 0) {
  152. uni.navigateTo({ url: "/pageMy/reportDetail/reportDetail?id=" + this.reportDetail.CeLueArticleId });
  153. } else {
  154. uni.showToast({
  155. title: "文章ID有误",
  156. icon: "error",
  157. duration: 2000,
  158. });
  159. }
  160. },
  161. // 锚点
  162. positionSubject: Throttle(function (item) {
  163. let className = `#subject${item.Md5String}`;
  164. uni
  165. .createSelectorQuery()
  166. .select(className)
  167. .boundingClientRect((con) => {
  168. uni
  169. .createSelectorQuery()
  170. .select("#keyconmpany")
  171. .boundingClientRect((res) => {
  172. // 获取根元素要滑动的元素
  173. uni.pageScrollTo({
  174. selector: "#keyconmpany", // 滑动的元素
  175. duration: 300,
  176. scrollTop: con.top - res.top, //到达距离顶部的top值
  177. });
  178. })
  179. .exec();
  180. })
  181. .exec();
  182. const res = Reports.reportClickHistory({
  183. ArticleId: this.reportDetail.ArticleId,
  184. IndustrialSubjectId: item.IndustrialSubjectId,
  185. IndustrialManagementId: item.IndustrialManagementId,
  186. ThirdId: item.ThirdId,
  187. });
  188. }),
  189. // 公司综述报告请
  190. goArticle(id) {
  191. uni.navigateTo({ url: "/pageMy/reportDetail/reportDetail?id=" + id });
  192. },
  193. // 判断一个还是多个
  194. industry(item) {
  195. if (item.length > 1) {
  196. this.list = item;
  197. this.areacodeShow = true;
  198. } else if (item.length > 0 || item.length == 1) {
  199. uni.navigateTo({
  200. url: "/reportPages/IndustryReport/IndustryReport?id=" + item[0].IndustrialManagementId,
  201. });
  202. }
  203. },
  204. // 选择后的事件
  205. industryDetitle(item) {
  206. uni.navigateTo({
  207. url: "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId,
  208. });
  209. this.areacodeShow = false;
  210. },
  211. // 选择的取消
  212. cancel() {
  213. this.areacodeShow = false;
  214. },
  215. /* 无权限申请开通权限 */
  216. applyAuth() {
  217. this.hasPermission === 4
  218. ? uni.navigateTo({
  219. url: "/pageMy/applyTrial/applyTrial?tryType=ReportSelection&detailId=" + this.id,
  220. })
  221. : uni.showModal({
  222. title: "",
  223. content: "您已经提交过申请了,请耐心等待",
  224. showCancel: false,
  225. confirmColor: "#365595",
  226. success: function (res) {
  227. uni.navigateBack({
  228. fail() {
  229. uni.switchTab({
  230. url: "/pages/index/index",
  231. });
  232. },
  233. });
  234. },
  235. });
  236. },
  237. // 上传阅读时长的记录
  238. async postStopTime(type) {
  239. const res = await Mine.report_selectionAddStopTime({
  240. ArticleId: this.reportDetail.ArticleId,
  241. StopTime: this.readTiem,
  242. OutType: type,
  243. Source: 1,
  244. });
  245. },
  246. // 跳转往期汇总
  247. goSecret() {
  248. uni.navigateTo({
  249. url: "/reportPages/companyTabulation/companyTabulation",
  250. });
  251. },
  252. applicationHandel(item) {
  253. uni.showModal({
  254. content: "路演申请会提交至您的对口销售,确定要申请吗?",
  255. confirmColor: "#376cbb",
  256. cancelColor: "#606266",
  257. success: async (res) => {
  258. if (res.confirm) {
  259. const res = await Reports.report_selection_logApply({ ArticleId: this.reportDetail.ArticleId, SubjectName: item.SubjectName });
  260. if (res.Ret === 200) {
  261. uni.showToast({
  262. title: "申请成功",
  263. duration: 2000,
  264. });
  265. }
  266. } else {
  267. uni.showToast({
  268. title: "取消申请",
  269. icon: "none",
  270. duration: 2000,
  271. });
  272. }
  273. },
  274. });
  275. },
  276. },
  277. onLoad(option) {
  278. this.reportSelectionDetail(option);
  279. },
  280. onShow() {
  281. this.readTiem = 0;
  282. this.setIntervalTiem = setInterval(() => {
  283. this.readTiem++;
  284. }, 1000);
  285. this.$store.commit("setRouterReport", "重点公司");
  286. },
  287. onPageScroll(e) {
  288. this.isShowBackTop = e.scrollTop > 180 ? true : false;
  289. },
  290. onShareAppMessage() {
  291. return {
  292. title: "重点公司",
  293. path: "/reportPages/keyCompany/keyCompany",
  294. };
  295. },
  296. // 页面隐藏/切入后台时触发
  297. async onHide() {
  298. clearInterval(this.setIntervalTiem);
  299. this.postStopTime(2);
  300. },
  301. // 页面卸载时触发
  302. async onUnload() {
  303. clearInterval(this.setIntervalTiem);
  304. this.postStopTime(1);
  305. },
  306. };
  307. </script>
  308. <style lang="scss" scoped>
  309. .content-conmpany {
  310. padding: 30rpx 34rpx;
  311. color: #333;
  312. font-size: 28rpx;
  313. .author-time {
  314. display: flex;
  315. justify-content: space-between;
  316. line-height: 39rpx;
  317. margin: 25rpx 0 35rpx;
  318. }
  319. .content-statement {
  320. display: flex;
  321. color: #707070;
  322. justify-content: space-between;
  323. .statement {
  324. margin-left: 10rpx;
  325. color: $uni-color-new;
  326. }
  327. }
  328. .content-abstract {
  329. margin-top: 30rpx;
  330. :first-child {
  331. float: left;
  332. font-weight: 500;
  333. }
  334. }
  335. .description {
  336. color: #666666;
  337. .detailed {
  338. display: flex;
  339. justify-content: flex-end;
  340. color: $uni-color-new;
  341. margin: 20rpx 0;
  342. :first-child {
  343. float: left;
  344. margin-right: 10rpx;
  345. color: #333333;
  346. font-weight: 500;
  347. }
  348. }
  349. }
  350. .industry-ul {
  351. margin-bottom: 20rpx;
  352. .industry-li {
  353. display: flex;
  354. margin-bottom: 10rpx;
  355. .industry-name {
  356. width: 42rpx;
  357. display: flex;
  358. justify-content: center;
  359. align-items: center;
  360. background: $uni-color-new;
  361. color: #fff;
  362. writing-mode: tb-rl;
  363. }
  364. .industry-subject {
  365. flex: 1;
  366. display: flex;
  367. flex-wrap: wrap;
  368. .subject-item {
  369. position: relative;
  370. width: 213rpx;
  371. height: 80rpx;
  372. display: flex;
  373. justify-content: center;
  374. align-items: center;
  375. line-height: 39rpx;
  376. border-bottom: 2rpx solid #ececec;
  377. border-top: 2rpx solid #ececec;
  378. border-right: 2rpx solid #ececec;
  379. text-decoration: underline;
  380. margin-top: -2rpx;
  381. .icon_subject {
  382. position: absolute;
  383. top: 0;
  384. left: 0;
  385. width: 48rpx;
  386. height: 48rpx;
  387. }
  388. }
  389. }
  390. .industry-top-border {
  391. border-top: none !important;
  392. }
  393. .subject-item-top-border {
  394. border-top: 1px solid #ececec;
  395. }
  396. }
  397. }
  398. .back-top {
  399. position: fixed;
  400. z-index: 99;
  401. bottom: 200rpx;
  402. right: 50rpx;
  403. width: 100rpx;
  404. height: 100rpx;
  405. image {
  406. width: 100%;
  407. height: 100%;
  408. }
  409. }
  410. .content-ul {
  411. .content-li {
  412. margin-top: 30rpx;
  413. padding-bottom: 20rpx;
  414. border-bottom: 2rpx dashed #e2e2e2;
  415. font-size: 28rpx;
  416. .content-title {
  417. display: flex;
  418. justify-content: center;
  419. align-items: center;
  420. width: 195rpx;
  421. padding: 3rpx 0;
  422. border-radius: 0rpx 50rpx 50rpx 0rpx;
  423. background-color: $uni-color-new;
  424. color: #fff;
  425. margin-bottom: 20rpx;
  426. font-size: 32rpx;
  427. image {
  428. width: 32rpx;
  429. height: 34rpx;
  430. margin-right: 15rpx;
  431. }
  432. }
  433. .li-list {
  434. margin-top: 20rpx;
  435. .li-subject {
  436. padding: 20rpx;
  437. margin-bottom: 20rpx;
  438. background: #f2f2f2;
  439. .item-name {
  440. display: inline-block;
  441. font-size: 34rpx;
  442. margin-right: 27rpx;
  443. line-height: 60rpx;
  444. }
  445. .itel-label {
  446. font-size: 30rpx;
  447. display: inline-block;
  448. margin-right: 27rpx;
  449. color: $uni-color-new;
  450. line-height: 60rpx;
  451. vertical-align: middle;
  452. font-weight: 500;
  453. }
  454. image {
  455. width: 60rpx;
  456. height: 30rpx;
  457. vertical-align: middle;
  458. margin-left: 10rpx;
  459. }
  460. }
  461. .li-item {
  462. margin-top: 20rpx;
  463. margin-bottom: 80rpx;
  464. }
  465. }
  466. }
  467. .subject-detali {
  468. text-align: right;
  469. margin-top: 20rpx;
  470. }
  471. }
  472. .macro-strategy {
  473. display: flex;
  474. align-items: center;
  475. width: 230rpx;
  476. height: 50rpx;
  477. padding-left: 35rpx;
  478. background-color: $uni-color-new;
  479. color: #fff;
  480. border-radius: 0rpx 50rpx 50rpx 0rpx;
  481. margin: 30rpx 0;
  482. image {
  483. width: 36rpx;
  484. height: 36rpx;
  485. margin-right: 10rpx;
  486. }
  487. }
  488. .nodata-tip {
  489. color: #999;
  490. font-size: 30rpx;
  491. }
  492. .content-bottom {
  493. margin: 50rpx 0 30rpx;
  494. .make-outbound {
  495. margin: 0 auto;
  496. width: 368rpx;
  497. height: 80rpx;
  498. background: linear-gradient(268deg, #2ddbff 0%, #1599ff 49%, #005eff 100%);
  499. opacity: 1;
  500. border-radius: 4rpx;
  501. color: #ffffff;
  502. font-size: 34rpx;
  503. line-height: 80rpx;
  504. text-align: center;
  505. }
  506. .make-generation {
  507. padding-top: 0rpx !important;
  508. line-height: 76rpx;
  509. }
  510. .make-conference {
  511. margin: 30rpx auto;
  512. width: 368rpx;
  513. height: 80rpx;
  514. border: 2px solid #2c83ff;
  515. opacity: 1;
  516. border-radius: 4rpx;
  517. padding-top: 5rpx;
  518. text-align: center;
  519. color: #2c83ff;
  520. font-size: 30rpx;
  521. text {
  522. font-size: 16rpx;
  523. }
  524. }
  525. }
  526. }
  527. .noauth-cont {
  528. padding-top: 150rpx;
  529. text-align: center;
  530. font-size: 28rpx;
  531. .noauth-ico {
  532. width: 365rpx;
  533. height: 229rpx;
  534. margin-bottom: 70rpx;
  535. }
  536. .tip {
  537. width: 532rpx;
  538. margin: 0 auto 100rpx;
  539. .contract {
  540. padding: 40rpx 90rpx 0;
  541. line-height: 44rpx;
  542. text {
  543. display: inline-block;
  544. }
  545. }
  546. }
  547. .btn-cont {
  548. width: 500rpx;
  549. height: 52rpx;
  550. background: $uni-color-new;
  551. color: #fff;
  552. font-size: 24rpx;
  553. font-weight: 600;
  554. border-radius: 8rpx;
  555. margin: 0 auto;
  556. text-align: center;
  557. line-height: 52rpx;
  558. &.back-btn {
  559. background: #e5efff !important;
  560. color: $uni-color-new;
  561. margin-top: 30rpx;
  562. }
  563. .btn_bg {
  564. width: 100%;
  565. height: 80rpx;
  566. position: absolute;
  567. left: 0;
  568. top: 0;
  569. }
  570. .btn-txt {
  571. width: 100%;
  572. position: absolute;
  573. z-index: 1;
  574. }
  575. }
  576. }
  577. .item-application {
  578. margin: 0 auto 120rpx;
  579. width: 368rpx;
  580. height: 80rpx;
  581. font-size: 34rpx;
  582. line-height: 80rpx;
  583. text-align: center;
  584. color: #ffffff;
  585. background: linear-gradient(268deg, #2ddbff 0%, #1599ff 49%, #005eff 100%);
  586. opacity: 1;
  587. border-radius: 4rpx;
  588. }
  589. </style>