keyCompany.vue 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  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="IndustryReport(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. this.$store.dispatch("checkHandle", "/pageMy/reportDetail/reportDetail?id=" + this.reportDetail.CeLueArticleId);
  120. },
  121. // 锚点
  122. positionSubject(item) {
  123. let className = `#subject${item.IndustrialSubjectId}`;
  124. uni
  125. .createSelectorQuery()
  126. .select(className)
  127. .boundingClientRect((con) => {
  128. uni
  129. .createSelectorQuery()
  130. .select("#keyconmpany")
  131. .boundingClientRect((res) => {
  132. // 获取根元素要滑动的元素
  133. uni.pageScrollTo({
  134. selector: "#keyconmpany", // 滑动的元素
  135. duration: 300,
  136. scrollTop: con.top - res.top, //到达距离顶部的top值
  137. });
  138. })
  139. .exec();
  140. })
  141. .exec();
  142. },
  143. // 公司综述报告请
  144. IndustryReport(id) {
  145. this.$store.dispatch("checkHandle", "/reportPages/IndustryReport/IndustryReport?id=" + id);
  146. },
  147. // 判断一个还是多个
  148. industry(item) {
  149. if (item.length > 1) {
  150. this.list = item;
  151. this.areacodeShow = true;
  152. } else if (item.length > 0 || item.length == 1) {
  153. uni.navigateTo({
  154. url: "/reportPages/IndustryReport/IndustryReport?id=" + item[0].IndustrialManagementId,
  155. });
  156. }
  157. },
  158. // 选择后的事件
  159. industryDetitle(item) {
  160. uni.navigateTo({
  161. url: "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId,
  162. });
  163. this.areacodeShow = false;
  164. },
  165. // 选择的取消
  166. cancel() {
  167. this.areacodeShow = false;
  168. },
  169. },
  170. onLoad() {
  171. this.reportSelectionDetail();
  172. },
  173. onShow() {
  174. this.$store.commit("setRouterReport", "重点公司");
  175. },
  176. onPageScroll(e) {
  177. this.isShowBackTop = e.scrollTop > 180 ? true : false;
  178. },
  179. };
  180. </script>
  181. <style lang="scss" scoped>
  182. .content-conmpany {
  183. padding: 30rpx 34rpx;
  184. color: #333;
  185. font-size: 28rpx;
  186. .title {
  187. font-weight: 500;
  188. font-size: 34rpx;
  189. line-height: 48rpx;
  190. }
  191. .author-time {
  192. display: flex;
  193. justify-content: space-between;
  194. line-height: 39rpx;
  195. margin: 25rpx 0 35rpx;
  196. }
  197. .content-statement {
  198. display: flex;
  199. color: #707070;
  200. .statement {
  201. margin-left: 10rpx;
  202. color: #3385ff;
  203. }
  204. }
  205. .content-abstract {
  206. margin: 30rpx 0 20rpx;
  207. :first-child {
  208. float: left;
  209. font-weight: 500;
  210. }
  211. }
  212. .description {
  213. color: #666666;
  214. .detailed {
  215. display: flex;
  216. justify-content: flex-end;
  217. color: #3385ff;
  218. margin: 20rpx 0;
  219. :first-child {
  220. float: left;
  221. margin-right: 10rpx;
  222. color: #333333;
  223. font-weight: 500;
  224. }
  225. }
  226. }
  227. .industry-ul {
  228. margin-bottom: 20rpx;
  229. .industry-li {
  230. display: flex;
  231. margin-bottom: 10rpx;
  232. .industry-name {
  233. width: 42rpx;
  234. display: flex;
  235. justify-content: center;
  236. background: #3385ff;
  237. color: #fff;
  238. writing-mode: tb-rl;
  239. }
  240. .industry-subject {
  241. border-top: 1px solid #ececec;
  242. flex: 1;
  243. display: flex;
  244. flex-wrap: wrap;
  245. .subject-item {
  246. position: relative;
  247. width: 213rpx;
  248. height: 63rpx;
  249. display: flex;
  250. justify-content: center;
  251. align-items: center;
  252. line-height: 39rpx;
  253. border-bottom: 1px solid #ececec;
  254. border-right: 1px solid #ececec;
  255. .icon_subject {
  256. position: absolute;
  257. top: 0;
  258. left: 0;
  259. width: 48rpx;
  260. height: 48rpx;
  261. }
  262. }
  263. }
  264. .industry-top-border {
  265. border-top: none !important;
  266. }
  267. .subject-item-top-border {
  268. border-top: 1px solid #ececec;
  269. }
  270. }
  271. }
  272. .back-top {
  273. position: fixed;
  274. z-index: 99;
  275. bottom: 200rpx;
  276. right: 50rpx;
  277. width: 100rpx;
  278. height: 100rpx;
  279. image {
  280. width: 100%;
  281. height: 100%;
  282. }
  283. }
  284. .content-ul {
  285. .content-li {
  286. margin-top: 30rpx;
  287. padding-bottom: 20rpx;
  288. border-bottom: 2rpx dashed #e2e2e2;
  289. .content-title {
  290. display: flex;
  291. justify-content: center;
  292. align-items: center;
  293. width: 195rpx;
  294. padding: 3rpx 0;
  295. border-radius: 0rpx 50rpx 50rpx 0rpx;
  296. background-color: #3385ff;
  297. color: #fff;
  298. margin-bottom: 20rpx;
  299. image {
  300. width: 32rpx;
  301. height: 34rpx;
  302. margin-right: 15rpx;
  303. }
  304. }
  305. .li-list {
  306. margin-top: 20rpx;
  307. .li-subject {
  308. padding: 20rpx;
  309. margin-bottom: 20rpx;
  310. background: #f2f2f2;
  311. .item-name {
  312. display: inline-block;
  313. margin-right: 27rpx;
  314. line-height: 60rpx;
  315. }
  316. .itel-label {
  317. display: inline-block;
  318. margin-right: 27rpx;
  319. color: #3385ff;
  320. line-height: 60rpx;
  321. vertical-align: middle;
  322. }
  323. image {
  324. width: 60rpx;
  325. height: 30rpx;
  326. vertical-align: middle;
  327. margin-left: 10rpx;
  328. }
  329. }
  330. .li-item {
  331. margin-top: 20rpx;
  332. }
  333. }
  334. }
  335. .subject-detali {
  336. text-align: right;
  337. margin-top: 20rpx;
  338. }
  339. }
  340. }
  341. </style>