ReportDetail.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. <script setup>
  2. import moment from 'moment'
  3. import {ref,onMounted} from 'vue'
  4. import { useRoute } from 'vue-router'
  5. import { useStore } from 'vuex';
  6. import useHZRouter from '@/hooks/useHZRouter'
  7. const route=useRoute()
  8. const HZRouter=useHZRouter()
  9. const store=useStore()
  10. moment.locale('zh-cn')
  11. import {apiGetReportDetail} from '@/api/activity'
  12. let info=ref(null)
  13. const getInfo=async ()=>{
  14. const res=await apiGetReportDetail({research_report_id:Number(route.query.research_report_id)})
  15. if(res.code===200){
  16. info.value=res.data
  17. if(['day','week'].includes(res.data.research_report_info.type)){
  18. store.commit('modifyBreadCrumb',res.data.research_report_info.type=='day'?'晨报':'周报')
  19. }
  20. }
  21. }
  22. getInfo()
  23. // 设置tag颜色
  24. const getTagColor=(str)=>{
  25. if( str.includes('多')||str.includes('强')||str.includes('反弹') ){
  26. return "#DF6051";
  27. }else if( str.includes('空')||str.includes('调整') ){
  28. return "#6FC5B4";
  29. }else{
  30. return "#009fe6";
  31. }
  32. }
  33. let preViewImgs=ref([])
  34. let preViewImgIndex=ref(0)
  35. let showPreViewImg=ref(false)
  36. onMounted(()=>{
  37. $(document).on('click', '.content-wrap img',function(event) {
  38. let imgArray = [];
  39. let curImageSrc = $(this).attr('src');
  40. let oParent = $(this).parent();
  41. if (curImageSrc && !oParent.attr('href')) {
  42. if(preViewImgs.value.length===0){
  43. $('.content-wrap img').each(function(index, el) {
  44. let itemSrc = $(this).attr('src');
  45. imgArray.push(itemSrc);
  46. });
  47. preViewImgs.value=imgArray
  48. }
  49. preViewImgIndex.value=preViewImgs.value.indexOf(curImageSrc)||0
  50. showPreViewImg.value=true
  51. }
  52. })
  53. })
  54. // 跳转章节详情
  55. const goChapterDetail=(item)=>{
  56. HZRouter.push({
  57. path:'/activity/chapterdetail',
  58. query:{
  59. research_report_type_id:item.ResearchReportTypeId,
  60. research_report_id:route.query.research_report_id
  61. }
  62. })
  63. }
  64. let showDisclaimers=ref(false)
  65. </script>
  66. <template>
  67. <div class="report-detail-page" v-if="info">
  68. <!-- 晨报、周报类型 -->
  69. <div class="list-type-wrap" v-if="['day','week'].includes(info.research_report_info.type)">
  70. <div :class="['section top-box',info.research_report_info.type=='day'?'top-box-day':'top-box-week']">
  71. <div class="title">{{info.research_report_info.type=='day'?'晨报':'周报'}}</div>
  72. <div class="sub-title">{{info.research_report_info.researchReportName.substring(info.research_report_info.researchReportName.indexOf('】')+1)}}</div>
  73. <div class="flex right-box">
  74. <div class="day">{{moment(info.research_report_info.researchReportDate).format('DD')}}</div>
  75. <div style="font-size:14px">
  76. <div>{{moment(info.research_report_info.researchReportDate).format('ddd')}}</div>
  77. <div>{{moment(info.research_report_info.researchReportDate).format('YYYY-MM')}}</div>
  78. </div>
  79. </div>
  80. </div>
  81. <div class="section list-wrap">
  82. <ul class="list">
  83. <li class="flex item" v-for="item in info.research_report_type_list" :key="item.ResearchReportTypeId" @click="goChapterDetail(item)">
  84. <div class="flex img-box">
  85. <el-image
  86. class="img"
  87. :src="item.BannerUrl"
  88. fit="cover"
  89. ></el-image>
  90. </div>
  91. <div class="content-box">
  92. <div class="flex title">
  93. <h2>{{item.ReportChapterTypeName}}</h2>
  94. <div v-if="item.Trend" style="margin-left:10px">
  95. <span
  96. class="tag"
  97. v-for="tag in item.Trend.split('&')"
  98. :key="tag"
  99. :style="{backgroundColor:getTagColor(tag)}"
  100. >{{tag}}</span>
  101. </div>
  102. </div>
  103. <div class="sub-title">
  104. <p>{{item.ResearchReportTypeTitle}}</p>
  105. </div>
  106. <div class="update-time">更新至:{{moment(item.LastUpdatedTime).format('YYYY-MM-DD')}}</div>
  107. </div>
  108. </li>
  109. </ul>
  110. </div>
  111. </div>
  112. <!-- 其他类型 -->
  113. <div class="other-type-wrap" v-else>
  114. <div class="section top-box">
  115. <span class="title">【第{{info.research_report_info.periods}}期 | {{info.research_report_info.reportVariety}}】</span>
  116. <div class="flex author">
  117. <span>FICC团队</span>
  118. <span class="time">{{moment(info.research_report_info.researchReportDate).format('YYYY-MM-DD HH:mm:ss')}}</span>
  119. </div>
  120. <div class="tips">
  121. <span>注:请务必阅读</span>
  122. <span style="color:#F3A52F;margin-left:20px;cursor: pointer;" @click="showDisclaimers=true">免责声明</span>
  123. </div>
  124. <div class="sub-title">摘要:{{info.research_report_info.researchReportName.substring(info.research_report_info.researchReportName.indexOf('】')+1)}}</div>
  125. </div>
  126. <div class="section content-wrap">
  127. <div class="item" v-for="item in info.ResearchReportTypeContentList" :key="item.sort">
  128. <h2 class="content-title">{{item.content_type?item.content_type:'核心观点'}}</h2>
  129. <div v-html="item.content" class="content-text" @click="clickContent"></div>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. <el-image-viewer
  135. v-if="showPreViewImg"
  136. :initial-index="preViewImgIndex"
  137. @close="showPreViewImg=false"
  138. :url-list="preViewImgs"
  139. />
  140. <!-- 免责申明 -->
  141. <el-dialog v-model="showDisclaimers" title="免责声明" center draggable width="40%">
  142. <div class="disclaimers-box">
  143. <div style="margin-bottom:10px">1、本报告仅供弘则弥道(上海)投资咨询有限公司正式签约的机构客户使用,不会仅因接收人/接受机构收到本报告而将其视为客户。</div>
  144. <div style="margin-bottom:10px">2、本报告根据国际和行业通行的准则,以合法渠道获得这些信息,尽可能保证可靠、准确和完整,但并不保证报告所述信息的准确性和完整性,也不保证本报告所包含的信息或建议在本报告发出后不会发生任何变更。本报告中所提供的信息仅供参考。</div>
  145. <div style="margin-bottom:10px">3、报告中的内容不对投资者做出的最终操作建议做任何的担保,也没有任何形式的分享投资收益或者分担投资损失的书面或口头承诺。不作为客户在投资、法律、会计或税务等方面的最终操作建议,也不作为道义的、责任的和法律的依据或者凭证,无论是否已经明示或者暗示。</div>
  146. <div style="margin-bottom:10px">4、在任何情况下,本公司不对客户/接受人/接受机构因使用报告中内容所引致的一切损失负责任,客户/接受人/接受机构需自行承担全部风险。</div>
  147. </div>
  148. </el-dialog>
  149. </template>
  150. <style lang="scss" scoped>
  151. .report-detail-page{
  152. .section{
  153. padding: 20px;
  154. }
  155. }
  156. .list-type-wrap{
  157. .top-box{
  158. height: 140px;
  159. background-size: cover;
  160. background-repeat: no-repeat;
  161. color: #fff;
  162. position: relative;
  163. margin-bottom: 20px;
  164. padding: 39px 34px 20px 34px;
  165. color: #fff;
  166. .title{
  167. font-size: 25px;
  168. font-weight: 600;
  169. }
  170. .sub-title{
  171. margin-top: 8px;
  172. }
  173. .right-box{
  174. position: absolute;
  175. right: 29px;
  176. bottom: 10px;
  177. align-items: center;
  178. .day{
  179. padding-right: 5px;
  180. font-size: 23px;
  181. font-weight: 600;
  182. border-right: 1px solid #fff;
  183. margin-right: 5px;
  184. }
  185. }
  186. }
  187. .top-box-day{
  188. background-image: url('https://hzstatic.hzinsights.com/static/yb_wx/report_banner_day.jpg');
  189. }
  190. .top-box-week{
  191. background-image: url('https://hzstatic.hzinsights.com/static/yb_wx/report_banner_week.jpg');
  192. }
  193. .list-wrap{
  194. padding-left: 0;
  195. padding-right: 0;
  196. .item{
  197. margin-bottom: 20px;
  198. .img-box{
  199. width: 55px;
  200. height: 55px;
  201. border: 1px solid #EBEBEB;
  202. align-items: center;
  203. justify-content: center;
  204. border-radius: 4px;
  205. margin-right: 20px;
  206. flex-shrink: 0;
  207. .img{
  208. width: 32px;
  209. height: 32px;
  210. }
  211. }
  212. .content-box{
  213. flex: 1;
  214. position: relative;
  215. .title{
  216. h2{
  217. margin: 0;
  218. font-size: 16px;
  219. cursor: pointer;
  220. }
  221. .tag{
  222. display: inline-block;
  223. background-color: #009fe6;
  224. color: #fff;
  225. font-size: 12px;
  226. padding: 4px 8px;
  227. line-height: 1;
  228. border-radius: 4px;
  229. margin-right: 5px;
  230. }
  231. }
  232. .sub-title{
  233. margin-bottom: 0;
  234. margin-top: 8px;
  235. }
  236. .update-time{
  237. position: absolute;
  238. top: 0;
  239. right: 0;
  240. color: #999;
  241. font-size: 14px;
  242. }
  243. }
  244. }
  245. }
  246. }
  247. .other-type-wrap{
  248. .top-box{
  249. .title{
  250. font-size: 24px;
  251. font-weight: bold;
  252. margin-left: -13px;
  253. }
  254. .author{
  255. margin-top: 20px;
  256. color: #666;
  257. justify-content: space-between;
  258. }
  259. .tips{
  260. margin-top: 20px;
  261. font-size: 18px;
  262. margin-bottom: 30px;
  263. &::before{
  264. content: '';
  265. width: 6px;
  266. height: 28px;
  267. display: inline-block;
  268. background-color: #F3A52F;
  269. margin-right: 10px;
  270. position: relative;
  271. top: 8px;
  272. }
  273. }
  274. .sub-title{
  275. margin-top: 30px;
  276. font-size: 18px;
  277. &::before{
  278. content: '';
  279. display: inline-block;
  280. width: 6px;
  281. height: 28px;
  282. background: #F3A52F;
  283. margin-right: 6px;
  284. position: relative;
  285. top: 8px;
  286. }
  287. }
  288. }
  289. .content-wrap{
  290. .item{
  291. .content-title{
  292. font-size: 20px;
  293. color: #000;
  294. &::before{
  295. content: '';
  296. display: inline-block;
  297. margin-right: 5px;
  298. position: relative;
  299. top: 7px;
  300. width: 6px;
  301. height: 28px;
  302. background: #F3A52F;
  303. }
  304. }
  305. .content-text{
  306. font-size: 18px;
  307. line-height: 1.8;
  308. :deep(img){
  309. max-width: 100%;
  310. margin-left: auto;
  311. margin-right: auto;
  312. display: block;
  313. }
  314. }
  315. }
  316. }
  317. }
  318. .disclaimers-wrap{
  319. border-top: 1px dashed #EBEBEB;
  320. padding: 20px;
  321. h2{
  322. margin: 0;
  323. text-align: center;
  324. font-size: 16px;
  325. }
  326. }
  327. </style>