keyCompany.vue 9.5 KB

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