wjdetails.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  19. export default{
  20. components:{},
  21. data(){
  22. return{
  23. hrimg:require('@/work/static/images/hrimg.png'),
  24. filico:require('@/work/static/images/filico.png'),
  25. tabval:0,
  26. tabList:[{tit:"客户上传",val:0},{tit:"平台上传",val:1}],
  27. filelist:[{name:"安徽嘉欣医疗用品有限公司0403委托担保申请书.pdf"},{name:"安徽嘉欣医疗用品有限公司0403委托担保申请书.pdf"},]
  28. }
  29. },
  30. methods:{
  31. checkPermi, checkRole,
  32. getTab(val){
  33. this.tabval=val
  34. },
  35. getDown(e){
  36. uni.showLoading({
  37. title: '加载中'
  38. });
  39. var url=baseUrl+e;
  40. uni.downloadFile({
  41. url: url,//文件的下载路径
  42. success(result) {
  43. uni.hideLoading()
  44. var filePath = result.tempFilePath;
  45. uni.openDocument({
  46. filePath: filePath,
  47. showMenu: true,
  48. success: function (res) {
  49. // console.log('打开文档成功');
  50. }
  51. });
  52. },
  53. fail(res) {uni.hideLoading()}
  54. })
  55. },
  56. }
  57. }
  58. </script>
  59. <style>
  60. page{background:#ffffff;}
  61. </style>
  62. <style lang="scss" scoped>
  63. .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;
  64. .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;
  65. &.act{color: #00A9F0;font-weight: bold;
  66. &::after{width: 100%;background: #00A9F0;position: absolute;left: 0;bottom: 0;
  67. border-radius: 2rpx;height: 4rpx;content: '';}
  68. }
  69. }
  70. }
  71. .wjlists{
  72. padding: 120rpx 0 40rpx;
  73. // 附件
  74. .fjlists {display: flex;align-items: flex-start;justify-content: space-between;margin-top: 60rpx;padding: 0 36rpx;
  75. &:last-child{margin-bottom: 0;}
  76. .imgl{width: 40rpx;height: 40rpx;display: flex;align-items: center;flex: 0 0 auto;
  77. image{width: 26rpx;height: 24rpx;}
  78. }
  79. .tit{font-size: 26rpx;color: #222327;font-weight: 500;margin-top: 4rpx;}
  80. .delimg{width: 40rpx;height:40rpx;margin-left: 16rpx;display: flex;align-items: center;justify-content: center;flex: 0 0 auto;
  81. image{width: 24rpx;height: 24rpx;}
  82. }
  83. .txta{color: #28C529;font-weight: 500;line-height: 40rpx;flex: 0 0 auto;margin-left: 18rpx;padding: 0 6rpx;}
  84. }
  85. }
  86. </style>