FinancialServicesGuideDetails.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  1. <template>
  2. <div>
  3. <div class="autoBox box" >
  4. <div class="crumbs">
  5. <el-breadcrumb separator="/">
  6. <el-breadcrumb-item :to="{ path: 'home' }">{{$t('common.Home')}}</el-breadcrumb-item>
  7. <el-breadcrumb-item :to="{ path: 'financialServices' }">{{$t('common.FinancialServices')}}</el-breadcrumb-item>
  8. <el-breadcrumb-item :to="{ path: 'FinancialServiceInvestmentGuide' }">{{$t('common.InvestmentGuide')}}</el-breadcrumb-item>
  9. <el-breadcrumb-item>{{guideList.name}}</el-breadcrumb-item>
  10. </el-breadcrumb>
  11. </div>
  12. <div class="projectBox">
  13. <div class="content">
  14. <div class="title">
  15. <p style="font-size: 26px;font-weight: 600;color: #666666;margin-top: 0;color: #666666">{{guideList.name}}</p>
  16. <div style="font-size: 14px;border-bottom: 1px solid #cccccc;line-height: 40px">
  17. <span style="float: left">{{$t('common.ReleaseTime')}}:{{formatDate(guideList.publishDate)}}</span>
  18. <div style="float: right;color: #666666">
  19. <!-- <span style="margin-right: 10px;cursor: pointer;color: #666666;" @click="download(pdfList.attachmentSavePath)">{{$t('common.Print')}}</span>-->
  20. <!-- <span style="margin-right: 10px;">|</span>-->
  21. <span
  22. :style="ifcommon?'color: #66b1ff;':'color: #666666;'"
  23. style="margin-right: 10px;cursor: pointer"
  24. @click="shareChange()">
  25. <!-- <i class="el-icon-star-off" :style="ifcommon?'color: #66b1ff;':'color: #000;'"></i>-->
  26. {{ifcommon?$t('common.Collected'):$t('common.Collection')}}
  27. </span>
  28. <!-- <span style="margin-right: 10px;">|</span>-->
  29. <!-- <span style="margin-right:10px;cursor: pointer;color: #666666;">{{$t('common.Share')}}</span>-->
  30. </div>
  31. <div style="clear: both"></div>
  32. </div>
  33. </div>
  34. <div class="preview" :class="isLogin==false?'content1':''">
  35. <div v-show="!pdfIsOn" style="font-size: 18px;">
  36. <span>{{$t('common.NoFile')}}</span>
  37. </div>
  38. <!-- pdf展示-->
  39. <iframe v-show="pdfSrc" id="iframe_id" width="100%" height="1160px" :src="pdfSrc + '#toolbar=0'" frameborder="0"></iframe>
  40. </div>
  41. </div>
  42. <!-- <div class="relevan">-->
  43. <!--其他区域投资指引-->
  44. <!-- <div class="relevanInformation">-->
  45. <!-- <div class="informationTitle">{{$t('common.OtherRelated')}}</div>-->
  46. <!-- <div class="informationList">-->
  47. <!-- <ul>-->
  48. <!-- <li v-for="(AreaItem,index) in otherArea" >-->
  49. <!-- <div style="width: 4px;height: 4px;background: #666666;border-radius: 50%;float: left;margin-top: 18px"></div>-->
  50. <!-- <div class="list" @click="toDetails('FinancialServicesGuideDetails',AreaItem.baseEntityId)">-->
  51. <!-- {{AreaItem.name}}-->
  52. <!-- </div>-->
  53. <!-- <div style="clear: both"></div>-->
  54. <!-- </li>-->
  55. <!-- </ul>-->
  56. <!-- </div>-->
  57. <!-- <div style="clear: both"></div>-->
  58. <!-- </div>-->
  59. <!--其他机构相关研究报告-->
  60. <!-- <div class="relevanInformation">-->
  61. <!-- <div class="informationTitle">{{$t('common.RelevantInstitutions')}}</div>-->
  62. <!-- <div class="informationList">-->
  63. <!-- <ul>-->
  64. <!-- <li v-for="(reportItem,index) in reportList" @click="toInformationList1(reportItem)">-->
  65. <!-- <div style="width: 4px;height:4px;background: #666666;border-radius: 50%;float: left;margin-top: 18px"></div>-->
  66. <!-- <div class="list">-->
  67. <!-- {{reportItem.name}}-->
  68. <!-- </div>-->
  69. <!-- <div style="clear: both"></div>-->
  70. <!-- </li>-->
  71. <!-- </ul>-->
  72. <!-- </div>-->
  73. <!-- </div>-->
  74. <!--投融资会议及活动-->
  75. <!-- <div class="relevanInformation">-->
  76. <!-- <div class="informationTitle">{{$t('common.MeetingsAndEvents')}}</div>-->
  77. <!-- <div class="informationList">-->
  78. <!-- <ul>-->
  79. <!-- <li v-for="(InvestItem,index) in InvestmentList" @click="toDetails('ConferenceResult',InvestItem.id)">-->
  80. <!-- <div style="width:4px;height: 4px;background: #666666;border-radius: 50%;float: left;margin-top: 18px"></div>-->
  81. <!-- <div class="list">-->
  82. <!-- {{$i18n.locale=='en'?InvestItem.meetingNameEn: InvestItem.meetingName}}-->
  83. <!-- </div>-->
  84. <!-- <div style="clear: both"></div>-->
  85. <!-- </li>-->
  86. <!-- <div style="margin-top: 20px"></div>-->
  87. <!-- <li v-for="(activeItem,index) in activityList" @click="toDetails('cooperationExchangeListDetails',activeItem.baseActivityEntityId)">-->
  88. <!-- <div style="width: 4px;height: 4px;background: #666666;border-radius: 50%;float: left;margin-top: 18px"></div>-->
  89. <!-- <div class="list">-->
  90. <!-- {{activeItem.activityName}}-->
  91. <!-- </div>-->
  92. <!-- <div style="clear: both"></div>-->
  93. <!-- </li>-->
  94. <!-- </ul>-->
  95. <!-- </div>-->
  96. <!-- </div>-->
  97. <!-- </div>-->
  98. <div style="clear: both;"></div>
  99. </div>
  100. </div>
  101. <el-dialog
  102. :title="$i18n.locale=='zh'?'提示':'Reminder'"
  103. :visible.sync="toViewLogin"
  104. :width="$i18n.locale=='zh'?'500px':'750px'"
  105. :height="$i18n.locale=='zh'?'300px':'386px'"
  106. :before-close="toViewLoginChange"
  107. >
  108. <div style="width: 100%;height: 100%;">
  109. <img src="@/assets/img/loginTips.png" alt="" style="width: 180px;height: 180px;margin-left: 20px;">
  110. <div style="float: right;margin-right: 20px;" :style="$i18n.locale=='zh'?'width: 49%;margin-top: 10px;':'width: 453px;margin-top: -25px;'">
  111. <div style="font-size: 20px;font-weight: normal;color: #333333;
  112. font-family: HiraginoSansGB-W3, HiraginoSansGB;
  113. line-height: 40px;">
  114. {{$t('common.ReminderFirst')}}
  115. </div>
  116. <div style="font-size: 16px;font-family: HiraginoSansGB-W3, HiraginoSansGB;
  117. font-weight: normal;color: #666666;line-height: 30px;">
  118. {{$t('common.ReminderSecond')}} <span style="color: #0091FF;font-size: 18px;">{{num}}</span> {{$t('common.ReminderThird')}}
  119. </div>
  120. <div style="font-size: 14px;font-family: HiraginoSansGB-W3, HiraginoSansGB;
  121. font-weight: normal;color: #666666;line-height: 30px;">
  122. {{$t('common.ReminderForth')}}
  123. </div>
  124. <div style="font-size: 14px;font-family: HiraginoSansGB-W3, HiraginoSansGB;
  125. height:33px;line-height:60px;font-weight: normal;color: #0091FF;">
  126. <span style="margin-left: 40px;" class="cursor" @click="toView('login')">
  127. {{$t('common.ReminderFifth')}}
  128. </span>
  129. <span style="margin-left: 10px;" class="cursor" @click="toView('Register')">
  130. {{$t('common.ReminderSixth')}}
  131. </span>
  132. </div>
  133. </div>
  134. </div>
  135. </el-dialog>
  136. </div>
  137. </template>
  138. <script>
  139. import Base from "@/views/base/Base";
  140. import moment from "moment";
  141. import {getFollowModeNumlByModelIdAndUserId} from "../../api/operation/basePortalModelFollowInfo";
  142. import {getBaseInvestmentGuidelinesInfos} from '@/api/financialService/baseInvestmentGuidelinesInfo';
  143. import { saveFollowModel } from "@/api/operation/basePortalModelFollowInfo";
  144. import {getToken } from "@/utils/auth";
  145. import {activityInfos, sysAttachmentInfos} from "../../api/cooperation/baseCooperationUnit";
  146. import {getConfrences} from "../../api/meeting/meetingOutInfo";
  147. import { getBaseResearchResultViews,gateResearchResultViewById,gateResearchResultFileById } from "@/api/research/baseResearchResultView";
  148. export default {
  149. name: "FinancialServicesGuideDetails",
  150. components: { moment },
  151. extends: Base,
  152. data() {
  153. return {
  154. index: 0,
  155. imgIndex:1,
  156. loading: true,
  157. maxNum:0,
  158. num:5,
  159. pdfIsOn:'',
  160. isLoding:true,
  161. projectFaIcon:2,
  162. showPdf:false,
  163. toViewLogin:false,
  164. ifcommon:false,
  165. InvestmentList:[],
  166. activityList:[],
  167. reportList:[],
  168. currentPage:1,
  169. showPdfDeta:{},
  170. pdfSrc:null,
  171. pdfNum:0,
  172. pdfParams:{
  173. pageNo:1,
  174. pageSize:1,
  175. language:'',
  176. researchResultFileId:''
  177. },
  178. pdfList:'',
  179. guideList:'',
  180. params:{
  181. pageSize:"10",
  182. pageNo:"1",
  183. language:'',
  184. baseEntityId:'',
  185. statusDict:'2'
  186. },
  187. isLogin:false,
  188. otherArea:[],
  189. informationList:[],
  190. clickNum:{},
  191. dict: {},
  192. Initials:'',
  193. informationNumMap:{},
  194. };
  195. },
  196. mounted() {
  197. this.getData()
  198. this.confLogin();
  199. this.getOtherArea();
  200. // this.getPdfList();
  201. this.getMeetingAndActive();
  202. this.getactivityStatusDict();
  203. this.getreportList();
  204. this.$store.commit('modify', 'FinancialServices');
  205. window.localStorage.setItem('router', 'FinancialServices');
  206. },
  207. watch: {
  208. '$i18n.locale'(){
  209. this.getData();
  210. this.getOtherArea();
  211. this.confLogin();
  212. this.getMeetingAndActive();
  213. this.getactivityStatusDict();
  214. this.getreportList();
  215. // this.getPdfList();
  216. },
  217. "toViewLogin"(){
  218. if(this.toViewLogin==true){
  219. this.loginTipsChange();
  220. }
  221. },
  222. },
  223. methods: {
  224. // 未登录跳转
  225. loginTipsChange(){
  226. const that=this;
  227. this.num =5;
  228. clearInterval(this.timer);
  229. this.timer = setInterval(function() {
  230. if (that.num > 0) {
  231. that.num--;
  232. } else {
  233. if(that.toViewLogin==true){
  234. clearInterval(that.timer);
  235. that.toView('login');
  236. }else {
  237. clearInterval(that.timer);
  238. }
  239. }
  240. }, 1000)
  241. },
  242. // 判断未登录跳转是否关闭
  243. toViewLoginChange(done){
  244. this.toViewLogin=false;
  245. this.num=5;
  246. clearInterval(this.timer);
  247. },
  248. getIconImg(url) {
  249. return require("@/assets/img/financialService/" + url);
  250. },
  251. getOtherArea(){
  252. let otherList = {
  253. pageSize:"6",
  254. pageNo:"1",
  255. language:this.$i18n.locale.toUpperCase(),
  256. statusDict:'2',
  257. showable:'y'
  258. }
  259. getBaseInvestmentGuidelinesInfos(otherList).then((res)=>{
  260. let dataList=[];
  261. dataList = res.data.baseInvestmentGuidelinesInfos;
  262. this.otherArea = [];
  263. for(let i=0;i<dataList.length;i++){
  264. if(dataList[i].name !== this.guideList.name){
  265. this.otherArea.push(dataList[i])
  266. }
  267. }
  268. // this.otherArea = res.data.baseInvestmentGuidelinesInfos;
  269. })
  270. },
  271. toView(router, json) {
  272. clearInterval(this.timer);
  273. console.log(router,json)
  274. this.$router.push({
  275. name: router,
  276. query:{
  277. key:json,
  278. }
  279. })
  280. },
  281. toInformationList1(ele){
  282. let params = {
  283. entityId:ele.entityId,
  284. // researchResultFileId:ele.researchResultFileId,
  285. }
  286. this.toViewInformationList('resourceSharingDetails',params)
  287. },
  288. toViewInformationList(router, json) {
  289. clearInterval(this.timer);
  290. const {href} = this.$router.resolve({
  291. name: router,
  292. query: {
  293. key:JSON.stringify(json),
  294. }
  295. });
  296. window.open(href, '_blank');
  297. },
  298. confLogin(){
  299. if (!this.$Cookies.get('token')) {
  300. this.isLogin=false
  301. }else{
  302. this.isLogin= true
  303. }
  304. },
  305. getData(){
  306. const that =this;
  307. this.params.language = this.$i18n.locale.toUpperCase();
  308. this.params.baseEntityId = this.$route.query.key;
  309. getBaseInvestmentGuidelinesInfos(this.params).then((res)=>{
  310. this.guideList = res.data.baseInvestmentGuidelinesInfos[0];
  311. this.getMyCollecModel();
  312. if(this.guideList.pdfToPictureFileIds){
  313. this.getPdf();
  314. this.pdfIsOn = true;
  315. }else{
  316. this.pdfIsOn = false;
  317. }
  318. let list={
  319. attachmentBusinessId: this.guideList.id,
  320. attachmentBusinessType:'base_investment_guide'
  321. };
  322. sysAttachmentInfos(list).then((res)=>{
  323. this.showPdfDeta = res.data.attachmentInfos[0];
  324. this.pdfSrc = 'api/file/pub/' + this.showPdfDeta.attachmentSavePath;
  325. console.log(this.showPdfDeta)
  326. });
  327. })
  328. this.getOtherArea()
  329. },
  330. // 项目收藏改变
  331. shareChange() {
  332. if (this.ifcommon) {
  333. this.Collection("unfollow");
  334. }else{
  335. this.Collection("follow");
  336. }
  337. console.log(this.ifcommon)
  338. },
  339. Collection: function (collectType) {
  340. let user = window.localStorage.getItem("user");
  341. if (!this.$Cookies.get('token')) {
  342. this.toViewLogin = true;
  343. } else {
  344. var users = JSON.parse(user);
  345. var token = "" + getToken();
  346. var userId = users.userId;
  347. var modelId =this.guideList.baseEntityId;
  348. // 接口逻辑
  349. this.submitHandler((token) => {
  350. saveFollowModel(modelId, "investmentGuidelines", userId, collectType, token)
  351. .then((result) => {
  352. if(result.status==200) {
  353. if (!this.ifcommon) {
  354. this.$message({
  355. message: this.$i18n.locale == 'zh' ? "已收藏" : "Already collected",
  356. type: 'success'
  357. });
  358. } else{
  359. this.$message({
  360. message: this.$i18n.locale == 'zh' ? "取消收藏" : "Cancel coilection",
  361. type: 'success'
  362. });
  363. }
  364. }
  365. this.ifcommon = !this.ifcommon;
  366. this.resetToken();
  367. })
  368. .catch((error) => {
  369. this.$message({
  370. message: result.data,
  371. type: "failed",
  372. });
  373. });
  374. });
  375. }
  376. },
  377. getMyCollecModel(){
  378. const that= this;
  379. let user = window.localStorage.getItem("user");
  380. if (this.$Cookies.get('token')) {
  381. var users = JSON.parse(user);
  382. var token = "" + getToken();
  383. var baseEntityId = this.guideList.baseEntityId;
  384. this.userId = users.userId;
  385. getFollowModeNumlByModelIdAndUserId(
  386. baseEntityId,
  387. "investmentGuidelines",
  388. this.userId
  389. ).then((res) => {
  390. this.ifcommon = res.data;
  391. console.log(
  392. res.data,
  393. "---------------------------------------------------------------------------"
  394. );
  395. });
  396. }
  397. },
  398. download(url){
  399. const href ="api/file/pub/" + this.showPdfDeta.attachmentSavePath;
  400. window.open(href, '_blank');
  401. // a.click();
  402. },
  403. // getMeetingAndActive(){
  404. // // 获取会议
  405. // getConfrences().then((res)=>{
  406. // if(res.data.meetingBasicInfos){
  407. // let meetingLength = res.data.meetingBasicInfos.length;
  408. // this.InvestmentList = [];
  409. // for(let i=0;i<meetingLength;i++){
  410. // if(i<3){
  411. // this.InvestmentList.push(res.data.meetingBasicInfos[i])
  412. // }
  413. // }
  414. // }
  415. // });
  416. // },
  417. getactivityStatusDict(){
  418. let list={
  419. pageSize:9,
  420. pageNo:1,
  421. language:this.$i18n.locale.toUpperCase(),
  422. activityStatusDict:1, // 活动类型
  423. activityArea:"",// 大洲
  424. }
  425. activityInfos(list).then(res=>{
  426. if(JSON.stringify(res.data)!=='{}'){
  427. let activityLength = res.data.activityInfos.length;
  428. this.activityList = [];
  429. for(let i=0;i<activityLength;i++){
  430. if(i<2){
  431. this.activityList.push(res.data.activityInfos[i])
  432. }
  433. }
  434. }
  435. })
  436. },
  437. // getreportList(){
  438. // const that = this;
  439. // let reportParams = {
  440. // pageSize: 5,
  441. // pageNo: 1,
  442. // language:this.$i18n.locale.toUpperCase(),
  443. // totalPage:'',
  444. // descStatus:0
  445. // };
  446. // getBaseResearchResultViews(reportParams).then((res)=>{
  447. // this.reportList = res.data.baseResearchResultViews;
  448. // })
  449. // },
  450. toDetails(router,json){
  451. // this.$store.commit('modify', router);
  452. window.localStorage.setItem('router', router);
  453. localStorage.setItem('conferenceId', json);
  454. const {href} = this.$router.resolve({
  455. name: router,
  456. query: {
  457. key: json
  458. }
  459. });
  460. window.open(href, '_blank');
  461. // this.getData()
  462. },
  463. // getPdf(){
  464. // this.pdfParams.language = this.$i18n.locale.toUpperCase();
  465. // this.pdfParams.researchResultFileId = this.guideList.pdfToPictureFileIds;
  466. // gateResearchResultFileById(this.pdfParams).then((res)=>{
  467. // this.pdfList = res.data.baseResearchResultFile;
  468. //
  469. // if( this.isLogin==true){
  470. // this.pdfNum =this.pdfList.filePages;
  471. //
  472. // }else{
  473. // this.pdfNum = 2;
  474. // }
  475. // })
  476. // },
  477. // setTimeout(isLodingchange,3000)
  478. //分页索引接着上一页的索引
  479. indexMethod(index){
  480. return (this.page-1)*10+index+1;
  481. },
  482. // 分页
  483. handleCurrentChange(val){
  484. this.pdfParams.pageNo=val
  485. this.getData();
  486. },
  487. getIframe(){
  488. var x=document.getElementById("")
  489. }
  490. }
  491. };
  492. </script>
  493. <!-- Add "scoped" attribute to limit CSS to this component only -->
  494. <style scoped>
  495. .box {
  496. margin-top: 10px;
  497. background: #fff;
  498. /* height: 500px; */
  499. padding: 20px 0;
  500. }
  501. .crumbs {
  502. margin-left: 20px;
  503. }
  504. body {
  505. margin: 0;
  506. }
  507. li {
  508. display: inline-block;
  509. color: #1251a7;
  510. }
  511. .projectBox{
  512. width: 100%;
  513. margin-top: 40px;
  514. }
  515. .content {
  516. /*float: left;*/
  517. width: 70%;
  518. margin: auto;
  519. }
  520. .content .preview{
  521. width: 100%;
  522. margin: 10px 0;
  523. text-align: center;
  524. }
  525. .content .title{
  526. width:95%;
  527. padding: 0 20px;
  528. text-align: center;
  529. }
  530. .content .toLogin{
  531. width: 100%;
  532. height: 30px;
  533. text-align: center;
  534. }
  535. .content .toLogin p{
  536. line-height: 30px;
  537. font-size: 18px;
  538. font-weight:600;
  539. }
  540. .relevan{
  541. width:30%;
  542. float:right;
  543. }
  544. .relevanInformation{
  545. min-height: 200px;
  546. max-height: 400px;
  547. padding: 0 20px;
  548. overflow: hidden;
  549. line-height: 34px;
  550. }
  551. .relevanMeeting{
  552. padding: 0 20px;
  553. overflow: hidden;
  554. line-height: 24px;
  555. }
  556. .informationList{
  557. width: 100%;
  558. font-size: 14px;
  559. /*padding-left: 15px;*/
  560. }
  561. .informationTitle{
  562. font-size: 20px;
  563. color: #666666;
  564. border-bottom: 1px solid #2C558A;
  565. padding: 0 0 10px 0;
  566. font-weight: 600;
  567. opacity: 0.9;
  568. color: #2C558A;
  569. }
  570. .informationList ul{
  571. margin-top: 14px;
  572. font-size: 14px;
  573. /*list-style-type:disc;*/
  574. padding: 0 30px 0 0;
  575. box-sizing: border-box;
  576. }
  577. .informationList ul li{
  578. width: 100%;
  579. height: 34px;
  580. line-height: 34px;
  581. margin-bottom: 12px;
  582. color: #666666;
  583. cursor: pointer;
  584. /*margin-top: 10px;*/
  585. list-style: disc inside;
  586. }
  587. .informationList ul li .list{
  588. width: 96%;
  589. float: right;
  590. display: inline-block;
  591. overflow: hidden;
  592. line-height: 34px;
  593. text-overflow: ellipsis;
  594. display:-webkit-box;
  595. -webkit-box-orient:vertical;
  596. -webkit-line-clamp:2;
  597. }
  598. .content1{
  599. /*max-height: 850px;*/
  600. overflow: hidden;
  601. }
  602. .meetingImg{
  603. width: 100%;
  604. height: 160px;
  605. cursor: pointer;
  606. }
  607. </style>