keyCompany.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. <template>
  2. <view id="keyconmpany" class="container content-conmpany" v-if="haveData">
  3. <view class="title">{{ reportDetail.Title }}</view>
  4. <view class="author-time">
  5. <text>{{ reportDetail.Department }}</text>
  6. <text>{{ reportDetail.PublishDate }}</text>
  7. </view>
  8. <view class="content-statement">
  9. <text>注:请务必阅读</text>
  10. <text class="statement" @click="isShowStatement = true">免责声明 </text>
  11. </view>
  12. <view class="content-abstract">
  13. <text>产品说明:</text>
  14. <text>{{ reportDetail.ProductDescription }} </text>
  15. </view>
  16. <view class="description">
  17. <mp-html :content="reportDetail.MarketStrategy" />
  18. <view class="detailed">
  19. <text>详细策略报告请</text>
  20. <text @click="reportDetailLink">点击查看</text>
  21. </view>
  22. </view>
  23. <view class="industry-ul">
  24. <view class="industry-li" v-for="(item, index) in dataListSubject" :key="index">
  25. <view class="industry-name">{{ item.PermissionName }}</view>
  26. <view :class="['industry-subject', item.ListSubject.length < 3 && 'industry-top-border']">
  27. <view
  28. :class="['subject-item', 'text_oneLine', item.ListSubject.length < 3 && 'subject-item-top-border']"
  29. class=""
  30. @click="positionSubject(key)"
  31. v-for="key in item.ListSubject"
  32. :key="key.IndustrialSubjectId"
  33. >
  34. {{ key.SubjectName }}
  35. <image v-if="key.IsNew" class="icon_subject" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_subject.png"></image>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="content-ul">
  41. <view class="content-li" v-for="item in dataList" :key="item.PermissionName">
  42. <view class="content-title">
  43. <image :src="item.IcoLink"></image>
  44. {{ item.PermissionName }}
  45. </view>
  46. <mp-html :content="item.BodyChartSummary" />
  47. <view class="li-list">
  48. <view class="li-item" v-for="key in item.List" :key="key.IndustrialSubjectId">
  49. <view :id="'subject' + key.IndustrialSubjectId" class="li-subject">
  50. <view class="item-name">
  51. <text style="display: inline-block; vertical-align: middle">{{ key.SubjectName }}</text>
  52. <image v-if="key.IsNew" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_report.png"></image>
  53. </view>
  54. <text class="itel-label" v-for="val in key.CompanyLabel" :key="val"># {{ val }}</text>
  55. </view>
  56. <mp-html :content="key.Body" />
  57. <view class="subject-detali" v-if="key.OverviewArticleId > 0">
  58. <text style="display: inline-block">公司综述报告请</text>
  59. <text style="color: #3385ff; margin-left: 10rpx; display: inline-block" @click="goArticle(key.OverviewArticleId)">点击查看</text>
  60. </view>
  61. <view class="subject-detali" v-if="key.List">
  62. <text style="display: inline-block">相关调研纪要、深度报告请</text>
  63. <text style="color: #3385ff; margin-left: 10rpx; display: inline-block" @click="industry(key.List)">点击查看</text>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="back-top" v-if="isShowBackTop" @click="goBackTop">
  70. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/back_top.png"></image>
  71. </view>
  72. <statement :show="isShowStatement" />
  73. <view class="select-box">
  74. <u-popup v-model="areacodeShow" mode="bottom" @close="cancel">
  75. <view class="box" style="color: #2c83ff" v-for="item in list" :key="item.IndustrialManagementId" @click="industryDetitle(item)"> {{ item.IndustryName }}</view>
  76. <view class="box box-bottom" style="color: #a9afb8" @click="cancel">取消</view>
  77. </u-popup>
  78. </view>
  79. </view>
  80. </template>
  81. <script>
  82. import { Reports } from "@/config/api.js";
  83. import statement from "@/reportPages/components/statement.vue";
  84. export default {
  85. data() {
  86. return {
  87. list: [],
  88. dataList: [],
  89. dataListSubject: [],
  90. reportDetail: {},
  91. isShowBackTop: false,
  92. isShowStatement: false,
  93. areacodeShow: false,
  94. haveData: false,
  95. };
  96. },
  97. components: { statement },
  98. methods: {
  99. // 返回top
  100. goBackTop() {
  101. wx.pageScrollTo({
  102. scrollTop: 0,
  103. duration: 300,
  104. });
  105. },
  106. async reportSelectionDetail() {
  107. const res = await Reports.reportSelectionDetail({
  108. IsBestNew: true,
  109. });
  110. if (res.Ret === 200) {
  111. this.reportDetail = res.Data.Detail;
  112. this.haveData = true;
  113. this.dataList = res.Data.List;
  114. this.dataListSubject = res.Data.ListPermissionSubject;
  115. }
  116. },
  117. // 详细策略报告请
  118. reportDetailLink() {
  119. if (this.reportDetail.CeLueArticleId > 0) {
  120. this.$store.dispatch("checkHandle", "/pageMy/reportDetail/reportDetail?id=" + this.reportDetail.CeLueArticleId);
  121. } else {
  122. uni.showToast({
  123. title: "文章ID有误",
  124. icon: "error",
  125. duration: 2000,
  126. });
  127. }
  128. },
  129. // 锚点
  130. positionSubject(item) {
  131. let className = `#subject${item.IndustrialSubjectId}`;
  132. uni
  133. .createSelectorQuery()
  134. .select(className)
  135. .boundingClientRect((con) => {
  136. uni
  137. .createSelectorQuery()
  138. .select("#keyconmpany")
  139. .boundingClientRect((res) => {
  140. // 获取根元素要滑动的元素
  141. uni.pageScrollTo({
  142. selector: "#keyconmpany", // 滑动的元素
  143. duration: 300,
  144. scrollTop: con.top - res.top, //到达距离顶部的top值
  145. });
  146. })
  147. .exec();
  148. })
  149. .exec();
  150. },
  151. // 公司综述报告请
  152. goArticle(id) {
  153. this.$store.dispatch("checkHandle", "/pageMy/reportDetail/reportDetail?id=" + id);
  154. },
  155. // 判断一个还是多个
  156. industry(item) {
  157. if (item.length > 1) {
  158. this.list = item;
  159. this.areacodeShow = true;
  160. } else if (item.length > 0 || item.length == 1) {
  161. uni.navigateTo({
  162. url: "/reportPages/IndustryReport/IndustryReport?id=" + item[0].IndustrialManagementId,
  163. });
  164. }
  165. },
  166. // 选择后的事件
  167. industryDetitle(item) {
  168. uni.navigateTo({
  169. url: "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId,
  170. });
  171. this.areacodeShow = false;
  172. },
  173. // 选择的取消
  174. cancel() {
  175. this.areacodeShow = false;
  176. },
  177. },
  178. onLoad() {
  179. this.reportSelectionDetail();
  180. },
  181. onShow() {
  182. this.$store.commit("setRouterReport", "重点公司");
  183. },
  184. onPageScroll(e) {
  185. this.isShowBackTop = e.scrollTop > 180 ? true : false;
  186. },
  187. };
  188. </script>
  189. <style lang="scss" scoped>
  190. .content-conmpany {
  191. padding: 30rpx 34rpx;
  192. color: #333;
  193. font-size: 28rpx;
  194. .title {
  195. font-weight: 500;
  196. font-size: 34rpx;
  197. line-height: 48rpx;
  198. }
  199. .author-time {
  200. display: flex;
  201. justify-content: space-between;
  202. line-height: 39rpx;
  203. margin: 25rpx 0 35rpx;
  204. }
  205. .content-statement {
  206. display: flex;
  207. color: #707070;
  208. .statement {
  209. margin-left: 10rpx;
  210. color: #3385ff;
  211. }
  212. }
  213. .content-abstract {
  214. margin: 30rpx 0 20rpx;
  215. :first-child {
  216. float: left;
  217. font-weight: 500;
  218. }
  219. }
  220. .description {
  221. color: #666666;
  222. .detailed {
  223. display: flex;
  224. justify-content: flex-end;
  225. color: #3385ff;
  226. margin: 20rpx 0;
  227. :first-child {
  228. float: left;
  229. margin-right: 10rpx;
  230. color: #333333;
  231. font-weight: 500;
  232. }
  233. }
  234. }
  235. .industry-ul {
  236. margin-bottom: 20rpx;
  237. .industry-li {
  238. display: flex;
  239. margin-bottom: 10rpx;
  240. .industry-name {
  241. width: 42rpx;
  242. display: flex;
  243. justify-content: center;
  244. background: #3385ff;
  245. color: #fff;
  246. writing-mode: tb-rl;
  247. }
  248. .industry-subject {
  249. border-top: 1px solid #ececec;
  250. flex: 1;
  251. display: flex;
  252. flex-wrap: wrap;
  253. .subject-item {
  254. position: relative;
  255. width: 213rpx;
  256. height: 63rpx;
  257. display: flex;
  258. justify-content: center;
  259. align-items: center;
  260. line-height: 39rpx;
  261. border-bottom: 1px solid #ececec;
  262. border-right: 1px solid #ececec;
  263. .icon_subject {
  264. position: absolute;
  265. top: 0;
  266. left: 0;
  267. width: 48rpx;
  268. height: 48rpx;
  269. }
  270. }
  271. }
  272. .industry-top-border {
  273. border-top: none !important;
  274. }
  275. .subject-item-top-border {
  276. border-top: 1px solid #ececec;
  277. }
  278. }
  279. }
  280. .back-top {
  281. position: fixed;
  282. z-index: 99;
  283. bottom: 200rpx;
  284. right: 50rpx;
  285. width: 100rpx;
  286. height: 100rpx;
  287. image {
  288. width: 100%;
  289. height: 100%;
  290. }
  291. }
  292. .content-ul {
  293. .content-li {
  294. margin-top: 30rpx;
  295. padding-bottom: 20rpx;
  296. border-bottom: 2rpx dashed #e2e2e2;
  297. .content-title {
  298. display: flex;
  299. justify-content: center;
  300. align-items: center;
  301. width: 195rpx;
  302. padding: 3rpx 0;
  303. border-radius: 0rpx 50rpx 50rpx 0rpx;
  304. background-color: #3385ff;
  305. color: #fff;
  306. margin-bottom: 20rpx;
  307. image {
  308. width: 32rpx;
  309. height: 34rpx;
  310. margin-right: 15rpx;
  311. }
  312. }
  313. .li-list {
  314. margin-top: 20rpx;
  315. .li-subject {
  316. padding: 20rpx;
  317. margin-bottom: 20rpx;
  318. background: #f2f2f2;
  319. .item-name {
  320. display: inline-block;
  321. margin-right: 27rpx;
  322. line-height: 60rpx;
  323. }
  324. .itel-label {
  325. display: inline-block;
  326. margin-right: 27rpx;
  327. color: #3385ff;
  328. line-height: 60rpx;
  329. vertical-align: middle;
  330. }
  331. image {
  332. width: 60rpx;
  333. height: 30rpx;
  334. vertical-align: middle;
  335. margin-left: 10rpx;
  336. }
  337. }
  338. .li-item {
  339. margin-top: 20rpx;
  340. }
  341. }
  342. }
  343. .subject-detali {
  344. text-align: right;
  345. margin-top: 20rpx;
  346. }
  347. }
  348. }
  349. </style>