word.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view class="m-20">
  3. <view class="row-c r-20 sys-background-fff m-b20" v-for="(item,index) in stageList" :key="index">
  4. <view class="file-box r-20" @click="openDocument(item.attachmentAddress)">
  5. <view class="file-data">
  6. <view class="file-icon" v-if="item.attachmentFormat==='docx'">
  7. <image class="wh-45 " src="/page_task/static/img/task-details/icon-word.png" mode="aspectFill"></image>
  8. </view>
  9. <view class="file-icon file-icon-excel" v-if="item.attachmentFormat==='xlsx'">
  10. <image class="wh-45 " src="/page_task/static/img/task-details/icon-excel.png" mode="aspectFill"></image>
  11. </view>
  12. <view class="file-icon file-icon-pdf" v-if="item.attachmentFormat==='pdf'">
  13. <image class="wh-45 " src="/page_task/static/img/task-details/icon-pdf.png" mode="aspectFill"></image>
  14. </view>
  15. <view>
  16. <view>{{item.attachmentName}}</view>
  17. <view class="size-26 text-color-333 m-t10"><text>{{item.attachmentFormat}}</text>•<text>{{(item.attachmentSize/1024/1024).toFixed(2)}}MB</text></view>
  18. </view>
  19. </view>
  20. <view>
  21. <uni-icons type="right" size="20"></uni-icons>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. name:'entities',
  30. props: {
  31. businessId:{
  32. default:0
  33. }
  34. },
  35. data() {
  36. return {
  37. stageList: []
  38. }
  39. },
  40. watch:{
  41. 'businessId':function () {
  42. // this.getStageList()
  43. }
  44. },
  45. mounted() {
  46. this.getStageList()
  47. },
  48. methods: {
  49. openDocument(url){
  50. uni.openDocument({
  51. filePath: url,
  52. showMenu: true,
  53. success: function (res) {
  54. console.log('打开文档成功');
  55. }
  56. });
  57. },
  58. getStageList() {
  59. this.stageList=[
  60. {'attachmentName':'拍卖裁定书.docx','attachmentFormat':'docx','attachmentSize':465445,'attachmentAddress':'https://storage.jd.com/auction.gateway/5EB379EF1ADA205F9525D1BFA9DC1D4D20250616121557808.docx'},
  61. {'attachmentName':'通知书(定向询价).pdf','attachmentFormat':'pdf','attachmentSize':284577,'attachmentAddress':'https://storage.jd.com/auction.gateway/2CC6F971D5CA2A11B829D01956446F3920250418151753793.pdf'},
  62. {'attachmentName':'评估报告1.pdf','attachmentFormat':'pdf','attachmentSize':3276836,'attachmentAddress':'https://storage.jd.com/auction.gateway/7F7226679C6E76620D9381906217543920250612120816112.pdf'},
  63. ]
  64. },
  65. },
  66. }
  67. </script>
  68. <style lang="scss" scoped>
  69. .file-box{
  70. box-shadow: 0 2rpx 6rpx 0 #0000001a, 0 2rpx 2px -2rpx #0000001a;
  71. width: 100%;
  72. padding: 32rpx;
  73. display: flex;
  74. align-items: center;
  75. justify-content: space-between;
  76. .file-data{
  77. display: flex;
  78. justify-content: flex-start;
  79. .file-icon{
  80. display: flex;
  81. justify-content: center;
  82. align-items: center;
  83. width: 96rpx;
  84. height: 96rpx;
  85. border-radius: 20rpx;
  86. background-color:#f8f9ff;
  87. margin-right: 32rpx;
  88. }
  89. .file-icon-pdf{
  90. background-color: #fff8f8;
  91. }
  92. .file-icon-excel{
  93. background-color:#f6fffb;
  94. }
  95. }
  96. }
  97. .steps-item:last-child {
  98. margin-bottom: 0;
  99. }
  100. .steps-line {
  101. width: 2rpx;
  102. background-color: #D9D9D9;
  103. height: 90rpx;
  104. }
  105. </style>