wjdetails.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="wjlists">
  3. <view class="tabs">
  4. <view class="tab" :class="tabval==ite.val?'act':''" v-for="(ite,idx) in tabList" :key="idx" @click="getTab(ite.val)">{{ite.tit}}</view>
  5. </view>
  6. <view class="fjlists" v-for="(fite,fidx) in filelist" :key='fidx'>
  7. <view class="flext" @click="getDown(fite.url)">
  8. <view class="imgl"><image :src="filico" ></image></view>
  9. <view class="tit">{{fite.name}}</view>
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. import config from '@/config'
  16. const baseUrl = config.baseUrl
  17. import {uploadmore} from '@/utils/common.js'
  18. import {getApplicationDet} from "@/api/mine/work.js"
  19. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  20. export default{
  21. components:{},
  22. data(){
  23. return{
  24. hrimg:require('@/work/static/images/hrimg.png'),
  25. filico:require('@/work/static/images/filico.png'),
  26. tabval:0,
  27. // tabList:[{tit:"客户上传",val:0},{tit:"平台上传",val:1}],
  28. tabList:[{tit:"客户上传",val:0},{tit:"申报附件",val:1},{tit:"文件出具",val:2},{tit:"其他附件",val:3}],
  29. filelist:[{name:"安徽嘉欣医疗用品有限公司0403委托担保申请书.pdf"},{name:"安徽嘉欣医疗用品有限公司0403委托担保申请书.pdf"},],
  30. id:'',
  31. }
  32. },
  33. onLoad(e) {
  34. this.id=e.id;
  35. this.getDetail()
  36. },
  37. methods:{
  38. checkPermi, checkRole,
  39. getTab(val){
  40. this.tabval=val
  41. },
  42. getDetail(){
  43. getApplicationDet(this.id).then(res=>{
  44. if(res.code==200){
  45. this.datainfo=res.data;
  46. if(res.data.sysUserEnterprise){
  47. this.qyinfo=res.data.sysUserEnterprise
  48. }
  49. this.stepval=res.data.loanSchedule||0;
  50. // if(res.data.shareholderFjLis){
  51. // this.gdlists=res.data.shareholderFjLis
  52. // }
  53. if(res.data.basicFj){
  54. this.basicFj=res.data.basicFj;
  55. }
  56. // this.declareFj=res.data.declareFj;
  57. // 附件信息
  58. // this.otherFj=res.data.otherFj||[]
  59. }
  60. })
  61. },
  62. getDown(e){
  63. uni.showLoading({
  64. title: '加载中'
  65. });
  66. var url=baseUrl+e;
  67. let index1 = e.lastIndexOf("."); // 得到一个索引值
  68. let index2 = e.length;
  69. let type = e.substring(index1, index2);
  70. if ((type.indexOf('jpg') > -1 || type.indexOf('jpeg') > -1 || type.indexOf('png') > -1)) {
  71. uni.previewImage({
  72. current: 0,
  73. urls: [url],
  74. // background: '#ffffff'
  75. });
  76. uni.hideLoading();
  77. } else {
  78. uni.downloadFile({
  79. url: url,//文件的下载路径
  80. success(result) {
  81. uni.hideLoading()
  82. var filePath = result.tempFilePath;
  83. uni.openDocument({
  84. filePath: filePath,
  85. showMenu: true,
  86. success: function (res) {
  87. // console.log('打开文档成功');
  88. }
  89. });
  90. },
  91. fail(res) {uni.hideLoading()}
  92. })
  93. }
  94. },
  95. }
  96. }
  97. </script>
  98. <style>
  99. page{background:#ffffff;}
  100. </style>
  101. <style lang="scss" scoped>
  102. .tabs{padding: 0 6rpx 0 36rpx;display: flex;flex-wrap: nowrap;overflow: auto;flex: 0 0 auto;border-bottom: 2rpx solid #E6E6E6;position: fixed;left: 0;top: 0;right: 0;z-index: 2;
  103. .tab{font-weight: 500;font-size: 26rpx;color: #666666;height: 116rpx;display: flex;align-items: center;margin-right:180rpx;flex: 0 0 auto;position: relative;
  104. &.act{color: #00A9F0;font-weight: bold;
  105. &::after{width: 100%;background: #00A9F0;position: absolute;left: 0;bottom: 0;
  106. border-radius: 2rpx;height: 4rpx;content: '';}
  107. }
  108. }
  109. }
  110. .wjlists{
  111. padding: 120rpx 0 40rpx;
  112. // 附件
  113. .fjlists {display: flex;align-items: flex-start;justify-content: space-between;margin-top: 60rpx;padding: 0 36rpx;
  114. &:last-child{margin-bottom: 0;}
  115. .imgl{width: 40rpx;height: 40rpx;display: flex;align-items: center;flex: 0 0 auto;
  116. image{width: 26rpx;height: 24rpx;}
  117. }
  118. .tit{font-size: 26rpx;color: #222327;font-weight: 500;margin-top: 4rpx;}
  119. .delimg{width: 40rpx;height:40rpx;margin-left: 16rpx;display: flex;align-items: center;justify-content: center;flex: 0 0 auto;
  120. image{width: 24rpx;height: 24rpx;}
  121. }
  122. .txta{color: #28C529;font-weight: 500;line-height: 40rpx;flex: 0 0 auto;margin-left: 18rpx;padding: 0 6rpx;}
  123. }
  124. }
  125. </style>