keyCompany.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  1. <template>
  2. <block>
  3. <block v-if="isUserBindingPhoneNumber">
  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">{{ 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. <text>注:请务必阅读</text>
  13. <text class="statement" @click="isShowStatement = true">免责声明 </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. <view class="industry-ul">
  31. <view class="industry-li" v-for="(item, index) in dataListSubject" :key="index">
  32. <view class="industry-name">{{ item.PermissionName }}</view>
  33. <view :class="['industry-subject', item.ListSubject.length < 3 && 'industry-top-border']">
  34. <view
  35. :class="['subject-item', 'text_oneLine', item.ListSubject.length < 3 && 'subject-item-top-border']"
  36. @click="positionSubject(key)"
  37. v-for="key in item.ListSubject"
  38. :key="key.IndustrialSubjectId"
  39. >
  40. {{ key.SubjectName }}
  41. <image v-if="key.IsNew" class="icon_subject" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_subject.png"></image>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="content-ul">
  47. <view class="content-li" v-for="item in dataList" :key="item.PermissionName">
  48. <view class="content-title">
  49. <image :src="item.IcoLink"></image>
  50. {{ item.PermissionName }}
  51. </view>
  52. <mp-html :content="strFontSize(item.BodyChartSummary)" />
  53. <view class="li-list">
  54. <view class="li-item" v-for="key in item.List" :key="key.IndustrialSubjectId">
  55. <view :id="'subject' + key.IndustrialSubjectId" class="li-subject">
  56. <view class="item-name">
  57. <text style="display: inline-block; vertical-align: middle; font-weight: 600">{{ key.SubjectName }}</text>
  58. <image v-if="key.IsNew" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_report.png"></image>
  59. </view>
  60. <text class="itel-label" v-for="val in key.CompanyLabel" :key="val"># {{ val }}</text>
  61. </view>
  62. <mp-html :content="strFontSize(key.Body)" />
  63. <view style="margin-bottom: 120rpx" v-if="key.OverviewArticleId > 0 || key.List">
  64. <view class="subject-detali" v-if="key.OverviewArticleId > 0">
  65. <text style="display: inline-block">公司综述报告请</text>
  66. <text style="color: #3385ff; margin-left: 10rpx; display: inline-block" @click="goArticle(key.OverviewArticleId)"
  67. >点击查看</text
  68. >
  69. </view>
  70. <view class="subject-detali" v-if="key.List">
  71. <text style="display: inline-block">相关调研纪要、深度报告请</text>
  72. <text style="color: #3385ff; margin-left: 10rpx; display: inline-block" @click="industry(key.List)">点击查看</text>
  73. </view>
  74. </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)">
  86. {{ item.IndustryName }}</view
  87. >
  88. <view class="box box-bottom" style="color: #a9afb8" @click="cancel">取消</view>
  89. </u-popup>
  90. </view>
  91. </block>
  92. </view>
  93. <view class="nodata" v-else>
  94. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/report_loading_icon.png" class="nodata_img"></image>
  95. <view class="nodata-tip">正在努力编辑中,请耐心等待...</view>
  96. </view>
  97. </block>
  98. <not-have-login v-else />
  99. </block>
  100. </template>
  101. <script>
  102. import { Reports } from "@/config/api.js";
  103. import statement from "@/reportPages/components/statement.vue";
  104. import { Throttle } from "@/config/util.js";
  105. import NotHaveLogin from "../../components/notHaveLogin.vue";
  106. export default {
  107. data() {
  108. return {
  109. list: [],
  110. dataList: [],
  111. dataListSubject: [],
  112. reportDetail: {},
  113. isShowBackTop: false,
  114. isShowStatement: false,
  115. areacodeShow: false,
  116. haveData: true,
  117. hasPermission: "",
  118. };
  119. },
  120. components: { statement, NotHaveLogin },
  121. methods: {
  122. // 返回top
  123. goBackTop() {
  124. wx.pageScrollTo({
  125. selector: ".industry-ul",
  126. duration: 300,
  127. });
  128. },
  129. async reportSelectionDetail() {
  130. const res = await Reports.reportSelectionDetail({
  131. IsBestNew: true,
  132. });
  133. if (res.Ret === 200) {
  134. this.hasPermission = res.Data.HasPermission;
  135. this.reportDetail = res.Data.Detail;
  136. this.haveData = this.reportDetail ? true : false;
  137. this.dataList = res.Data.List;
  138. this.dataListSubject = res.Data.ListPermissionSubject;
  139. } else {
  140. this.haveData = false;
  141. }
  142. },
  143. // 详细策略报告请
  144. reportDetailLink() {
  145. if (this.reportDetail.CeLueArticleId > 0) {
  146. uni.navigateTo({ url: "/pageMy/reportDetail/reportDetail?id=" + this.reportDetail.CeLueArticleId });
  147. } else {
  148. uni.showToast({
  149. title: "文章ID有误",
  150. icon: "error",
  151. duration: 2000,
  152. });
  153. }
  154. },
  155. // 锚点
  156. positionSubject: Throttle(function (item) {
  157. let className = `#subject${item.IndustrialSubjectId}`;
  158. uni
  159. .createSelectorQuery()
  160. .select(className)
  161. .boundingClientRect((con) => {
  162. uni
  163. .createSelectorQuery()
  164. .select("#keyconmpany")
  165. .boundingClientRect((res) => {
  166. // 获取根元素要滑动的元素
  167. uni.pageScrollTo({
  168. selector: "#keyconmpany", // 滑动的元素
  169. duration: 300,
  170. scrollTop: con.top - res.top, //到达距离顶部的top值
  171. });
  172. })
  173. .exec();
  174. })
  175. .exec();
  176. const res = Reports.reportClickHistory({
  177. ArticleId: this.reportDetail.ArticleId,
  178. IndustrialSubjectId: item.IndustrialSubjectId,
  179. });
  180. }),
  181. // 公司综述报告请
  182. goArticle(id) {
  183. uni.navigateTo({ url: "/pageMy/reportDetail/reportDetail?id=" + id });
  184. },
  185. // 判断一个还是多个
  186. industry(item) {
  187. if (item.length > 1) {
  188. this.list = item;
  189. this.areacodeShow = true;
  190. } else if (item.length > 0 || item.length == 1) {
  191. uni.navigateTo({
  192. url: "/reportPages/IndustryReport/IndustryReport?id=" + item[0].IndustrialManagementId,
  193. });
  194. }
  195. },
  196. // 选择后的事件
  197. industryDetitle(item) {
  198. uni.navigateTo({
  199. url: "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId,
  200. });
  201. this.areacodeShow = false;
  202. },
  203. // 选择的取消
  204. cancel() {
  205. this.areacodeShow = false;
  206. },
  207. /* 无权限申请开通权限 */
  208. applyAuth() {
  209. this.hasPermission === 4
  210. ? uni.navigateTo({
  211. url: "/pageMy/applyTrial/applyTrial?tryType=ReportSelection&detailId=" + this.id,
  212. })
  213. : uni.showModal({
  214. title: "",
  215. content: "您已经提交过申请了,请耐心等待",
  216. showCancel: false,
  217. confirmColor: "#365595",
  218. success: function (res) {
  219. uni.navigateBack({
  220. fail() {
  221. uni.switchTab({
  222. url: "/pages/index/index",
  223. });
  224. },
  225. });
  226. },
  227. });
  228. },
  229. },
  230. onLoad() {},
  231. onShow() {
  232. if (!this.$store.state.isAuth && !this.$store.state.isBind) this.reportSelectionDetail();
  233. this.$store.commit("setRouterReport", "重点公司");
  234. },
  235. onPageScroll(e) {
  236. this.isShowBackTop = e.scrollTop > 180 ? true : false;
  237. },
  238. onShareAppMessage() {
  239. return {
  240. title: "重点公司",
  241. path: "/reportPages/keyCompany/keyCompany",
  242. };
  243. },
  244. };
  245. </script>
  246. <style lang="scss" scoped>
  247. .content-conmpany {
  248. padding: 30rpx 34rpx;
  249. color: #333;
  250. font-size: 28rpx;
  251. .author-time {
  252. display: flex;
  253. justify-content: space-between;
  254. line-height: 39rpx;
  255. margin: 25rpx 0 35rpx;
  256. }
  257. .content-statement {
  258. display: flex;
  259. color: #707070;
  260. .statement {
  261. margin-left: 10rpx;
  262. color: #3385ff;
  263. }
  264. }
  265. .content-abstract {
  266. margin-top: 30rpx;
  267. :first-child {
  268. float: left;
  269. font-weight: 500;
  270. }
  271. }
  272. .description {
  273. color: #666666;
  274. .detailed {
  275. display: flex;
  276. justify-content: flex-end;
  277. color: #3385ff;
  278. margin: 20rpx 0;
  279. :first-child {
  280. float: left;
  281. margin-right: 10rpx;
  282. color: #333333;
  283. font-weight: 500;
  284. }
  285. }
  286. }
  287. .industry-ul {
  288. margin-bottom: 20rpx;
  289. .industry-li {
  290. display: flex;
  291. margin-bottom: 10rpx;
  292. .industry-name {
  293. width: 42rpx;
  294. display: flex;
  295. justify-content: center;
  296. align-items: center;
  297. background: #3385ff;
  298. color: #fff;
  299. writing-mode: tb-rl;
  300. }
  301. .industry-subject {
  302. flex: 1;
  303. display: flex;
  304. flex-wrap: wrap;
  305. .subject-item {
  306. position: relative;
  307. width: 213rpx;
  308. height: 80rpx;
  309. display: flex;
  310. justify-content: center;
  311. align-items: center;
  312. line-height: 39rpx;
  313. border-bottom: 2rpx solid #ececec;
  314. border-top: 2rpx solid #ececec;
  315. border-right: 2rpx solid #ececec;
  316. text-decoration: underline;
  317. margin-top: -2rpx;
  318. .icon_subject {
  319. position: absolute;
  320. top: 0;
  321. left: 0;
  322. width: 48rpx;
  323. height: 48rpx;
  324. }
  325. }
  326. }
  327. .industry-top-border {
  328. border-top: none !important;
  329. }
  330. .subject-item-top-border {
  331. border-top: 1px solid #ececec;
  332. }
  333. }
  334. }
  335. .back-top {
  336. position: fixed;
  337. z-index: 99;
  338. bottom: 200rpx;
  339. right: 50rpx;
  340. width: 100rpx;
  341. height: 100rpx;
  342. image {
  343. width: 100%;
  344. height: 100%;
  345. }
  346. }
  347. .content-ul {
  348. .content-li {
  349. margin-top: 30rpx;
  350. padding-bottom: 20rpx;
  351. border-bottom: 2rpx dashed #e2e2e2;
  352. font-size: 28rpx;
  353. .content-title {
  354. display: flex;
  355. justify-content: center;
  356. align-items: center;
  357. width: 195rpx;
  358. padding: 3rpx 0;
  359. border-radius: 0rpx 50rpx 50rpx 0rpx;
  360. background-color: #3385ff;
  361. color: #fff;
  362. margin-bottom: 20rpx;
  363. font-size: 32rpx;
  364. image {
  365. width: 32rpx;
  366. height: 34rpx;
  367. margin-right: 15rpx;
  368. }
  369. }
  370. .li-list {
  371. margin-top: 20rpx;
  372. .li-subject {
  373. padding: 20rpx;
  374. margin-bottom: 20rpx;
  375. background: #f2f2f2;
  376. .item-name {
  377. display: inline-block;
  378. font-size: 34rpx;
  379. margin-right: 27rpx;
  380. line-height: 60rpx;
  381. }
  382. .itel-label {
  383. font-size: 30rpx;
  384. display: inline-block;
  385. margin-right: 27rpx;
  386. color: #3385ff;
  387. line-height: 60rpx;
  388. vertical-align: middle;
  389. font-weight: 500;
  390. }
  391. image {
  392. width: 60rpx;
  393. height: 30rpx;
  394. vertical-align: middle;
  395. margin-left: 10rpx;
  396. }
  397. }
  398. .li-item {
  399. margin-top: 20rpx;
  400. margin-bottom: 80rpx;
  401. }
  402. }
  403. }
  404. .subject-detali {
  405. text-align: right;
  406. margin-top: 20rpx;
  407. }
  408. }
  409. .macro-strategy {
  410. display: flex;
  411. align-items: center;
  412. width: 230rpx;
  413. height: 50rpx;
  414. padding-left: 35rpx;
  415. background-color: #3385ff;
  416. color: #fff;
  417. border-radius: 0rpx 50rpx 50rpx 0rpx;
  418. margin: 30rpx 0;
  419. image {
  420. width: 36rpx;
  421. height: 36rpx;
  422. margin-right: 10rpx;
  423. }
  424. }
  425. .nodata-tip {
  426. color: #999;
  427. font-size: 30rpx;
  428. }
  429. }
  430. .noauth-cont {
  431. padding-top: 150rpx;
  432. text-align: center;
  433. font-size: 28rpx;
  434. .noauth-ico {
  435. width: 365rpx;
  436. height: 229rpx;
  437. margin-bottom: 70rpx;
  438. }
  439. .tip {
  440. width: 532rpx;
  441. margin: 0 auto 100rpx;
  442. .contract {
  443. padding: 40rpx 90rpx 0;
  444. line-height: 44rpx;
  445. text {
  446. display: inline-block;
  447. }
  448. }
  449. }
  450. .btn-cont {
  451. width: 368rpx;
  452. height: 80rpx;
  453. // position: relative;
  454. background: linear-gradient(268deg, #2ddbff 0%, #1599ff 49%, #005eff 100%);
  455. color: #fff;
  456. font-size: 34rpx;
  457. margin: 0 auto;
  458. text-align: center;
  459. line-height: 80rpx;
  460. &.back-btn {
  461. background: #fff !important;
  462. color: #2c83ff;
  463. border: 1px solid #2c83ff;
  464. margin-top: 30rpx;
  465. }
  466. .btn_bg {
  467. width: 100%;
  468. height: 80rpx;
  469. position: absolute;
  470. left: 0;
  471. top: 0;
  472. }
  473. .btn-txt {
  474. width: 100%;
  475. position: absolute;
  476. z-index: 1;
  477. }
  478. }
  479. }
  480. </style>