FinancialServiceEvaluationPdfDetails.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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: 'FinancialServiceProjectEvaluation' }">{{$t('common.ProjectAppraisal')}}</el-breadcrumb-item>
  9. <el-breadcrumb-item :to="{ path: 'FinancialServiceProjectEvaluation' }">{{init.projectReportName}}</el-breadcrumb-item>
  10. </el-breadcrumb>
  11. </div>
  12. <div style="margin-top: 60px;padding: 0 100px;text-align: center;" v-if="havePdf == false">{{$t('common.NoFile')}}</div>
  13. <div style="margin-top: 60px;padding: 0 100px;text-align: center;" v-if="havePdf == true">
  14. <img src="@/assets/img/financialService/header1.png" alt="" style="width: 100%;height: 280px">
  15. <!-- <div style="min-width: 500px;max-height: 800px">-->
  16. <img :src="'api/file/pub/'+ pdfDetails.fileAddress + '\\' + pdfParams.pageNo +'.png'" alt="" style="width:100%;height:100%;margin: 0;">
  17. <!-- </div>-->
  18. <!-- <iframe width="100%" id="pdflist" height="1100px" :src="'api/file/pub/'+showPdfDeta.attachmentSavePath" frameborder="0"></iframe>-->
  19. <div class="footerSty">
  20. <div style="line-height: 20px">
  21. <span style="display: block;">{{$t('common.GEIDcpTitle')}}</span>
  22. <span style="display: block">{{$t('common.mail')}}:geidcp-info@geidco.org</span>
  23. <span style="display: block">{{$t('common.tel')}}:010-66598554</span>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. <!-- 分页 -->
  29. <div style="width: 100%;position: relative;height: 100px;">
  30. <el-pagination
  31. type="index"
  32. style="height: 80px;position: absolute;left: 50%;top: 80px;transform: translate(-50%,-50%);"
  33. background
  34. :index="indexMethod"
  35. layout="prev, pager, next"
  36. :page-size="1"
  37. :total="pdfNum-0"
  38. @current-change="handleCurrentChange"
  39. ></el-pagination>
  40. </div>
  41. </div>
  42. </template>
  43. <script>
  44. import {sysAttachmentInfos} from '@/api/cooperation/baseCooperationUnit';
  45. import {getBaseProjectEvaluationReportInfos} from "../../api/financialService/baseProjectEvaluationReportInfo";
  46. import {gateResearchResultFileById} from "../../api/research/baseResearchResultView";
  47. export default {
  48. name:'FinancialServiceEvaluationPdfDetails.vue',
  49. data(){
  50. return{
  51. init:'',
  52. pdfDetails:'',
  53. showPdfDeta:{},
  54. havePdf:false,
  55. params:{
  56. pageSize:"5",
  57. pageNo:"1",
  58. language:'',
  59. baseEntityId:'',
  60. statusDict:'2'
  61. },
  62. isLogin:false,
  63. pdfNum:0,
  64. pdfParams:{
  65. pageNo:1,
  66. pageSize:1,
  67. language:'',
  68. researchResultFileId:''
  69. },
  70. }
  71. },
  72. mounted() {
  73. this.getData();
  74. this.confLogin();
  75. },
  76. watch:{
  77. '$i18n.locale'(){
  78. this.getData();
  79. this.confLogin();
  80. }
  81. },
  82. methods:{
  83. getData(){
  84. const that = this;
  85. this.params.language = this.$i18n.locale.toUpperCase();
  86. this.params.baseEntityId = this.$route.query.key.baseEntityId;
  87. getBaseProjectEvaluationReportInfos(this.params).then((res)=>{
  88. this.init = res.data.baseProjectEvaluationReportInfos[0];
  89. this.getPdfList();
  90. // // 获取iframe中的pdf
  91. // let list={
  92. // attachmentBusinessId: this.init.id,
  93. // attachmentBusinessType:'base_investment_guide'
  94. // };
  95. // sysAttachmentInfos(list).then((res)=>{
  96. // debugger
  97. // if(res.data){
  98. // this.showPdfDeta = res.data.attachmentInfos[0];
  99. // }
  100. //
  101. // })
  102. })
  103. },
  104. getPdfList(){
  105. this.pdfParams.language = this.$i18n.locale.toUpperCase();
  106. this.pdfParams.researchResultFileId = this.init.pdfToPictureFileIds;
  107. gateResearchResultFileById(this.pdfParams).then((res)=>{
  108. let newData = res.data.baseResearchResultFile;
  109. if (newData == '无数据' || newData == null){
  110. debugger
  111. this.havePdf = false;
  112. }else{
  113. this.havePdf = true;
  114. this.pdfDetails = res.data.baseResearchResultFile;
  115. this.pdfNum =this.pdfDetails.filePages;
  116. }
  117. })
  118. },
  119. //分页索引接着上一页的索引
  120. indexMethod(index){
  121. return (this.page-1)*10+index+1;
  122. },
  123. // 分页
  124. handleCurrentChange(val){
  125. this.pdfParams.pageNo=val
  126. this.getData();
  127. },
  128. confLogin(){
  129. if (!this.$Cookies.get('token')) {
  130. this.isLogin=false
  131. }else{
  132. this.isLogin= true
  133. }
  134. },
  135. confLogin(){
  136. if (!this.$Cookies.get('token')) {
  137. this.isLogin=false
  138. }else{
  139. this.isLogin= true
  140. }
  141. },
  142. toView(router, json) {
  143. console.log(router,json)
  144. this.$router.push({
  145. name: router,
  146. query:{
  147. key:json,
  148. }
  149. })
  150. },
  151. }
  152. }
  153. </script>
  154. <style scoped>
  155. .box {
  156. margin-top: 10px;
  157. background: #fff;
  158. /* height: 500px; */
  159. padding: 20px 0;
  160. }
  161. .crumbs {
  162. margin-left: 20px;
  163. }
  164. body {
  165. margin: 0;
  166. }
  167. .footerSty{
  168. width: 100%;
  169. height: 60px;
  170. margin: 0;
  171. text-align: center;
  172. font-size: 14px;
  173. color: #fff;
  174. padding: 20px 0;
  175. background-image: url("../../assets/img/financialService/footer2.png");
  176. }
  177. </style>