evaluationPdfDetsils.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <view class="rf-category">
  3. <view class="icoStyle">
  4. <u-navbar :back-text-style="backStyle" back-icon-color="#fff" title-color="#fff"
  5. :title="i18n('ReportDetails')" :background="background">
  6. </u-navbar>
  7. </view>
  8. <view>
  9. <image src="../../../static/img/finance/header1.png" mode="" style="width: 100%;height: 214upx;"></image>
  10. </view>
  11. <view style="text-align: center;" v-for="item in pdfCtrl">
  12. <img :src="websiteUrl + initdata.fileAddress+'\\'+ (++item)+'.png'" mode="" style="width: 100%;"></img>
  13. </view>
  14. <view style="text-align: center;" v-if="pdfnum<1">
  15. {{$t('common.NoFile')}}
  16. </view>
  17. <view class="footerBox">
  18. <image src="../../../static/img/finance/footer2.png" mode=""
  19. style="width: 100%;height: 214upx; position: absolute;"></image>
  20. <view class="footerText">
  21. <text>{{$t('common.GEIDcpTitle')}}</text>
  22. <text class="footerName">{{$t('common.mail')}}:geidcp-info@geidco.org</text>
  23. <text class="footerName">{{$t('common.tel')}}:010-66598554</text>
  24. </view>
  25. </view>
  26. <rf-back-top :scrollTop="scrollTop1"></rf-back-top>
  27. </view>
  28. </template>
  29. <script>
  30. import rfSearchBar from '@/components/rf-search-bar';
  31. import {
  32. gateResearchResultFileById
  33. } from "@/api/research/baseResearchResultView";
  34. import {
  35. getBaseProjectEvaluationReportInfos
  36. } from "@/api/financialService/baseProjectEvaluationReportInfo";
  37. export default {
  38. components: {
  39. rfSearchBar,
  40. },
  41. data() {
  42. return {
  43. baseEntityId: null,
  44. projectData: '',
  45. initdata: '',
  46. // scrollTop:0,
  47. // old:{
  48. // scrollTop:0
  49. // },
  50. status: 'loadmore',
  51. pdfCtrl: [],
  52. listNum: 0,
  53. scrollTop1: 0,
  54. background: {
  55. backgroundImage: 'linear-gradient(270deg, #4BC0E2 0%, #538BE7 100%)',
  56. },
  57. backStyle: {
  58. color: '#fff'
  59. },
  60. pdfnum: 0,
  61. }
  62. },
  63. onLoad(data) {
  64. this.baseEntityId = data.key;
  65. },
  66. onShow() {
  67. this.getproject();
  68. },
  69. onPageScroll(e) {
  70. this.scrollTop1 = e.scrollTop;
  71. },
  72. methods: {
  73. back() {
  74. uni.navigateBack();
  75. },
  76. //获取项目详情
  77. async getproject() {
  78. let params = {
  79. language: this.$i18n.locale.toUpperCase(),
  80. baseEntityId: this.baseEntityId,
  81. statusDict: '2'
  82. }
  83. const res = await this.$myRequest({
  84. url: '/project/baseProjectEvaluationReportInfos/',
  85. data: {
  86. ...params
  87. }
  88. });
  89. if (res.data) {
  90. this.projectData = res.data.baseProjectEvaluationReportInfos[0];
  91. this.getInitdata()
  92. }
  93. },
  94. //获取pdf详情
  95. async getInitdata() {
  96. let dataPrams = {
  97. pageNo: 1,
  98. pageSize: 1,
  99. language: this.$i18n.locale.toUpperCase(),
  100. researchResultFileId: this.projectData.pdfToPictureFileIds
  101. }
  102. const res = await this.$myRequest({
  103. url: '/resourceshare/baseResearchResultViews/gateResearchResultFile',
  104. data: {
  105. ...dataPrams
  106. }
  107. });
  108. // let res = await gateResearchResultFileById(dataPrams);
  109. if (res.data.baseResearchResultFile !== "无数据") {
  110. this.initdata = res.data.baseResearchResultFile;
  111. this.listNum = this.initdata.filePages;
  112. this.goForpage()
  113. } else {
  114. this.initdata = {}
  115. }
  116. },
  117. goForpage() {
  118. this.pdfCtrl = [];
  119. for (let i = 0; i < this.initdata.filePages; i++) {
  120. this.pdfCtrl.push(i)
  121. }
  122. this.pdfnum = this.pdfCtrl.length;
  123. },
  124. i18n(data) {
  125. return this.$t('common.' + data);
  126. },
  127. //滚动到底的时候执行,实现加载更多
  128. // lower(e){
  129. // this.status='loading';
  130. // setTimeout(()=>{
  131. // this.status='loadmore';
  132. // },2000)
  133. // console.log(e)
  134. // },
  135. }
  136. }
  137. </script>
  138. <style lang="scss" scoped>
  139. uni-page-body {
  140. height: 100%;
  141. margin: 0;
  142. padding: 0;
  143. }
  144. .rf-category {
  145. background-color: $color-white;
  146. // height: 100%;
  147. position: relative;
  148. /* #ifdef APP-PLUS */
  149. // margin-top: calc(20upx + var(--status-bar-height));
  150. /* #endif */
  151. .icoStyle {
  152. display: flex;
  153. align-items: center;
  154. .leftArrow {
  155. width: 36upx;
  156. height: 36upx;
  157. position: fixed;
  158. z-index: 99;
  159. /* #ifdef APP-PLUS */
  160. padding-top: calc(20upx + var(--status-bar-height));
  161. /* #endif */
  162. }
  163. }
  164. .dataList {
  165. position: absolute;
  166. height: 99%;
  167. background-color: #fff;
  168. padding: 020upx;
  169. }
  170. .loademore {
  171. position: fixed;
  172. bottom: 0;
  173. z-index: 999;
  174. margin: 0 auto;
  175. width: 100%;
  176. height: 80upx;
  177. line-height: 80upx;
  178. background-color: #fff;
  179. }
  180. .footerBox {
  181. width: 100%;
  182. .footerText {
  183. z-index: 99;
  184. width: 100%;
  185. text-align: center;
  186. color: #fff;
  187. position: absolute;
  188. left: 50%;
  189. transform: translate(-50%, 20%);
  190. .footerName {
  191. overflow: hidden;
  192. text-overflow: ellipsis;
  193. white-space: nowrap;
  194. display: block;
  195. }
  196. }
  197. }
  198. .backTop {
  199. bottom: 120px !important;
  200. }
  201. }
  202. </style>