wjdetails.vue 3.0 KB

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