keyCompany.vue 17 KB

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