keyCompany.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  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. });
  187. }),
  188. // 公司综述报告请
  189. goArticle(id) {
  190. uni.navigateTo({ url: "/pageMy/reportDetail/reportDetail?id=" + id });
  191. },
  192. // 判断一个还是多个
  193. industry(item) {
  194. if (item.length > 1) {
  195. this.list = item;
  196. this.areacodeShow = true;
  197. } else if (item.length > 0 || item.length == 1) {
  198. uni.navigateTo({
  199. url: "/reportPages/IndustryReport/IndustryReport?id=" + item[0].IndustrialManagementId,
  200. });
  201. }
  202. },
  203. // 选择后的事件
  204. industryDetitle(item) {
  205. uni.navigateTo({
  206. url: "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId,
  207. });
  208. this.areacodeShow = false;
  209. },
  210. // 选择的取消
  211. cancel() {
  212. this.areacodeShow = false;
  213. },
  214. /* 无权限申请开通权限 */
  215. applyAuth() {
  216. this.hasPermission === 4
  217. ? uni.navigateTo({
  218. url: "/pageMy/applyTrial/applyTrial?tryType=ReportSelection&detailId=" + this.id,
  219. })
  220. : uni.showModal({
  221. title: "",
  222. content: "您已经提交过申请了,请耐心等待",
  223. showCancel: false,
  224. confirmColor: "#365595",
  225. success: function (res) {
  226. uni.navigateBack({
  227. fail() {
  228. uni.switchTab({
  229. url: "/pages/index/index",
  230. });
  231. },
  232. });
  233. },
  234. });
  235. },
  236. // 上传阅读时长的记录
  237. async postStopTime(type) {
  238. const res = await Mine.report_selectionAddStopTime({
  239. ArticleId: this.reportDetail.ArticleId,
  240. StopTime: this.readTiem,
  241. OutType: type,
  242. Source: 1,
  243. });
  244. },
  245. // 跳转往期汇总
  246. goSecret() {
  247. uni.navigateTo({
  248. url: "/reportPages/companyTabulation/companyTabulation",
  249. });
  250. },
  251. applicationHandel(item) {
  252. uni.showModal({
  253. content: "路演申请会提交至您的对口销售,确定要申请吗?",
  254. confirmColor: "#376cbb",
  255. cancelColor: "#606266",
  256. success: async (res) => {
  257. if (res.confirm) {
  258. const res = await Reports.report_selection_logApply({ ArticleId: this.reportDetail.ArticleId, SubjectName: item.SubjectName });
  259. if (res.Ret === 200) {
  260. uni.showToast({
  261. title: "申请成功",
  262. duration: 2000,
  263. });
  264. }
  265. } else {
  266. uni.showToast({
  267. title: "取消申请",
  268. icon: "none",
  269. duration: 2000,
  270. });
  271. }
  272. },
  273. });
  274. },
  275. },
  276. onLoad(option) {
  277. this.reportSelectionDetail(option);
  278. },
  279. onShow() {
  280. this.readTiem = 0;
  281. this.setIntervalTiem = setInterval(() => {
  282. this.readTiem++;
  283. }, 1000);
  284. this.$store.commit("setRouterReport", "重点公司");
  285. },
  286. onPageScroll(e) {
  287. this.isShowBackTop = e.scrollTop > 180 ? true : false;
  288. },
  289. onShareAppMessage() {
  290. return {
  291. title: "重点公司",
  292. path: "/reportPages/keyCompany/keyCompany",
  293. };
  294. },
  295. // 页面隐藏/切入后台时触发
  296. async onHide() {
  297. clearInterval(this.setIntervalTiem);
  298. this.postStopTime(2);
  299. },
  300. // 页面卸载时触发
  301. async onUnload() {
  302. clearInterval(this.setIntervalTiem);
  303. this.postStopTime(1);
  304. },
  305. };
  306. </script>
  307. <style lang="scss" scoped>
  308. .content-conmpany {
  309. padding: 30rpx 34rpx;
  310. color: #333;
  311. font-size: 28rpx;
  312. .author-time {
  313. display: flex;
  314. justify-content: space-between;
  315. line-height: 39rpx;
  316. margin: 25rpx 0 35rpx;
  317. }
  318. .content-statement {
  319. display: flex;
  320. color: #707070;
  321. justify-content: space-between;
  322. .statement {
  323. margin-left: 10rpx;
  324. color: $uni-color-new;
  325. }
  326. }
  327. .content-abstract {
  328. margin-top: 30rpx;
  329. :first-child {
  330. float: left;
  331. font-weight: 500;
  332. }
  333. }
  334. .description {
  335. color: #666666;
  336. .detailed {
  337. display: flex;
  338. justify-content: flex-end;
  339. color: $uni-color-new;
  340. margin: 20rpx 0;
  341. :first-child {
  342. float: left;
  343. margin-right: 10rpx;
  344. color: #333333;
  345. font-weight: 500;
  346. }
  347. }
  348. }
  349. .industry-ul {
  350. margin-bottom: 20rpx;
  351. .industry-li {
  352. display: flex;
  353. margin-bottom: 10rpx;
  354. .industry-name {
  355. width: 42rpx;
  356. display: flex;
  357. justify-content: center;
  358. align-items: center;
  359. background: $uni-color-new;
  360. color: #fff;
  361. writing-mode: tb-rl;
  362. }
  363. .industry-subject {
  364. flex: 1;
  365. display: flex;
  366. flex-wrap: wrap;
  367. .subject-item {
  368. position: relative;
  369. width: 213rpx;
  370. height: 80rpx;
  371. display: flex;
  372. justify-content: center;
  373. align-items: center;
  374. line-height: 39rpx;
  375. border-bottom: 2rpx solid #ececec;
  376. border-top: 2rpx solid #ececec;
  377. border-right: 2rpx solid #ececec;
  378. text-decoration: underline;
  379. margin-top: -2rpx;
  380. .icon_subject {
  381. position: absolute;
  382. top: 0;
  383. left: 0;
  384. width: 48rpx;
  385. height: 48rpx;
  386. }
  387. }
  388. }
  389. .industry-top-border {
  390. border-top: none !important;
  391. }
  392. .subject-item-top-border {
  393. border-top: 1px solid #ececec;
  394. }
  395. }
  396. }
  397. .back-top {
  398. position: fixed;
  399. z-index: 99;
  400. bottom: 200rpx;
  401. right: 50rpx;
  402. width: 100rpx;
  403. height: 100rpx;
  404. image {
  405. width: 100%;
  406. height: 100%;
  407. }
  408. }
  409. .content-ul {
  410. .content-li {
  411. margin-top: 30rpx;
  412. padding-bottom: 20rpx;
  413. border-bottom: 2rpx dashed #e2e2e2;
  414. font-size: 28rpx;
  415. .content-title {
  416. display: flex;
  417. justify-content: center;
  418. align-items: center;
  419. width: 195rpx;
  420. padding: 3rpx 0;
  421. border-radius: 0rpx 50rpx 50rpx 0rpx;
  422. background-color: $uni-color-new;
  423. color: #fff;
  424. margin-bottom: 20rpx;
  425. font-size: 32rpx;
  426. image {
  427. width: 32rpx;
  428. height: 34rpx;
  429. margin-right: 15rpx;
  430. }
  431. }
  432. .li-list {
  433. margin-top: 20rpx;
  434. .li-subject {
  435. padding: 20rpx;
  436. margin-bottom: 20rpx;
  437. background: #f2f2f2;
  438. .item-name {
  439. display: inline-block;
  440. font-size: 34rpx;
  441. margin-right: 27rpx;
  442. line-height: 60rpx;
  443. }
  444. .itel-label {
  445. font-size: 30rpx;
  446. display: inline-block;
  447. margin-right: 27rpx;
  448. color: $uni-color-new;
  449. line-height: 60rpx;
  450. vertical-align: middle;
  451. font-weight: 500;
  452. }
  453. image {
  454. width: 60rpx;
  455. height: 30rpx;
  456. vertical-align: middle;
  457. margin-left: 10rpx;
  458. }
  459. }
  460. .li-item {
  461. margin-top: 20rpx;
  462. margin-bottom: 80rpx;
  463. }
  464. }
  465. }
  466. .subject-detali {
  467. text-align: right;
  468. margin-top: 20rpx;
  469. }
  470. }
  471. .macro-strategy {
  472. display: flex;
  473. align-items: center;
  474. width: 230rpx;
  475. height: 50rpx;
  476. padding-left: 35rpx;
  477. background-color: $uni-color-new;
  478. color: #fff;
  479. border-radius: 0rpx 50rpx 50rpx 0rpx;
  480. margin: 30rpx 0;
  481. image {
  482. width: 36rpx;
  483. height: 36rpx;
  484. margin-right: 10rpx;
  485. }
  486. }
  487. .nodata-tip {
  488. color: #999;
  489. font-size: 30rpx;
  490. }
  491. .content-bottom {
  492. margin: 50rpx 0 30rpx;
  493. .make-outbound {
  494. margin: 0 auto;
  495. width: 368rpx;
  496. height: 80rpx;
  497. background: linear-gradient(268deg, #2ddbff 0%, #1599ff 49%, #005eff 100%);
  498. opacity: 1;
  499. border-radius: 4rpx;
  500. color: #ffffff;
  501. font-size: 34rpx;
  502. line-height: 80rpx;
  503. text-align: center;
  504. }
  505. .make-generation {
  506. padding-top: 0rpx !important;
  507. line-height: 76rpx;
  508. }
  509. .make-conference {
  510. margin: 30rpx auto;
  511. width: 368rpx;
  512. height: 80rpx;
  513. border: 2px solid #2c83ff;
  514. opacity: 1;
  515. border-radius: 4rpx;
  516. padding-top: 5rpx;
  517. text-align: center;
  518. color: #2c83ff;
  519. font-size: 30rpx;
  520. text {
  521. font-size: 16rpx;
  522. }
  523. }
  524. }
  525. }
  526. .noauth-cont {
  527. padding-top: 150rpx;
  528. text-align: center;
  529. font-size: 28rpx;
  530. .noauth-ico {
  531. width: 365rpx;
  532. height: 229rpx;
  533. margin-bottom: 70rpx;
  534. }
  535. .tip {
  536. width: 532rpx;
  537. margin: 0 auto 100rpx;
  538. .contract {
  539. padding: 40rpx 90rpx 0;
  540. line-height: 44rpx;
  541. text {
  542. display: inline-block;
  543. }
  544. }
  545. }
  546. .btn-cont {
  547. width: 500rpx;
  548. height: 52rpx;
  549. background: $uni-color-new;
  550. color: #fff;
  551. font-size: 24rpx;
  552. font-weight: 600;
  553. border-radius: 8rpx;
  554. margin: 0 auto;
  555. text-align: center;
  556. line-height: 52rpx;
  557. &.back-btn {
  558. background: #e5efff !important;
  559. color: $uni-color-new;
  560. margin-top: 30rpx;
  561. }
  562. .btn_bg {
  563. width: 100%;
  564. height: 80rpx;
  565. position: absolute;
  566. left: 0;
  567. top: 0;
  568. }
  569. .btn-txt {
  570. width: 100%;
  571. position: absolute;
  572. z-index: 1;
  573. }
  574. }
  575. }
  576. .item-application {
  577. margin: 0 auto 120rpx;
  578. width: 368rpx;
  579. height: 80rpx;
  580. font-size: 34rpx;
  581. line-height: 80rpx;
  582. text-align: center;
  583. color: #ffffff;
  584. background: linear-gradient(268deg, #2ddbff 0%, #1599ff 49%, #005eff 100%);
  585. opacity: 1;
  586. border-radius: 4rpx;
  587. }
  588. </style>